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:v1"
90 const apiName = "metastore"
91 const apiVersion = "v1"
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.MetadataImports = NewProjectsLocationsServicesMetadataImportsService(s)
209 return rs
210 }
211
212 type ProjectsLocationsServicesService struct {
213 s *APIService
214
215 Backups *ProjectsLocationsServicesBackupsService
216
217 MetadataImports *ProjectsLocationsServicesMetadataImportsService
218 }
219
220 func NewProjectsLocationsServicesBackupsService(s *APIService) *ProjectsLocationsServicesBackupsService {
221 rs := &ProjectsLocationsServicesBackupsService{s: s}
222 return rs
223 }
224
225 type ProjectsLocationsServicesBackupsService struct {
226 s *APIService
227 }
228
229 func NewProjectsLocationsServicesMetadataImportsService(s *APIService) *ProjectsLocationsServicesMetadataImportsService {
230 rs := &ProjectsLocationsServicesMetadataImportsService{s: s}
231 return rs
232 }
233
234 type ProjectsLocationsServicesMetadataImportsService struct {
235 s *APIService
236 }
237
238
239
240 type AlterMetadataResourceLocationRequest struct {
241
242 LocationUri string `json:"locationUri,omitempty"`
243
244
245
246 ResourceName string `json:"resourceName,omitempty"`
247
248
249
250
251
252 ForceSendFields []string `json:"-"`
253
254
255
256
257 NullFields []string `json:"-"`
258 }
259
260 func (s *AlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) {
261 type NoMethod AlterMetadataResourceLocationRequest
262 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
263 }
264
265
266
267 type AlterMetadataResourceLocationResponse struct {
268 }
269
270
271
272 type AlterTablePropertiesRequest struct {
273
274
275
276
277 Properties map[string]string `json:"properties,omitempty"`
278
279
280 TableName string `json:"tableName,omitempty"`
281
282
283
284
285
286
287
288 UpdateMask string `json:"updateMask,omitempty"`
289
290
291
292
293
294 ForceSendFields []string `json:"-"`
295
296
297
298
299 NullFields []string `json:"-"`
300 }
301
302 func (s *AlterTablePropertiesRequest) MarshalJSON() ([]byte, error) {
303 type NoMethod AlterTablePropertiesRequest
304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
305 }
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323 type AuditConfig struct {
324
325 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
326
327
328
329 Service string `json:"service,omitempty"`
330
331
332
333
334
335 ForceSendFields []string `json:"-"`
336
337
338
339
340 NullFields []string `json:"-"`
341 }
342
343 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
344 type NoMethod AuditConfig
345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
346 }
347
348
349
350
351
352
353 type AuditLogConfig struct {
354
355
356 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
357
358
359
360
361
362
363
364 LogType string `json:"logType,omitempty"`
365
366
367
368
369
370 ForceSendFields []string `json:"-"`
371
372
373
374
375 NullFields []string `json:"-"`
376 }
377
378 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
379 type NoMethod AuditLogConfig
380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
381 }
382
383
384
385 type AuxiliaryVersionConfig struct {
386
387
388
389
390
391 ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
392
393
394 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
395
396
397 Version string `json:"version,omitempty"`
398
399
400
401
402
403 ForceSendFields []string `json:"-"`
404
405
406
407
408 NullFields []string `json:"-"`
409 }
410
411 func (s *AuxiliaryVersionConfig) MarshalJSON() ([]byte, error) {
412 type NoMethod AuxiliaryVersionConfig
413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
414 }
415
416
417 type BackendMetastore struct {
418
419
420
421
422
423
424 MetastoreType string `json:"metastoreType,omitempty"`
425
426
427
428
429 Name string `json:"name,omitempty"`
430
431
432
433
434
435 ForceSendFields []string `json:"-"`
436
437
438
439
440 NullFields []string `json:"-"`
441 }
442
443 func (s *BackendMetastore) MarshalJSON() ([]byte, error) {
444 type NoMethod BackendMetastore
445 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
446 }
447
448
449 type Backup struct {
450
451 CreateTime string `json:"createTime,omitempty"`
452
453 Description string `json:"description,omitempty"`
454
455 EndTime string `json:"endTime,omitempty"`
456
457
458
459 Name string `json:"name,omitempty"`
460
461 RestoringServices []string `json:"restoringServices,omitempty"`
462
463
464 ServiceRevision *Service `json:"serviceRevision,omitempty"`
465
466
467
468
469
470
471
472
473
474 State string `json:"state,omitempty"`
475
476
477 googleapi.ServerResponse `json:"-"`
478
479
480
481
482
483 ForceSendFields []string `json:"-"`
484
485
486
487
488 NullFields []string `json:"-"`
489 }
490
491 func (s *Backup) MarshalJSON() ([]byte, error) {
492 type NoMethod Backup
493 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
494 }
495
496
497 type Binding struct {
498
499
500
501
502
503
504
505
506 Condition *Expr `json:"condition,omitempty"`
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566 Members []string `json:"members,omitempty"`
567
568
569
570
571
572
573 Role string `json:"role,omitempty"`
574
575
576
577
578
579 ForceSendFields []string `json:"-"`
580
581
582
583
584 NullFields []string `json:"-"`
585 }
586
587 func (s *Binding) MarshalJSON() ([]byte, error) {
588 type NoMethod Binding
589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
590 }
591
592
593 type CancelOperationRequest struct {
594 }
595
596
597 type Consumer struct {
598
599
600 EndpointLocation string `json:"endpointLocation,omitempty"`
601
602
603 EndpointUri string `json:"endpointUri,omitempty"`
604
605
606
607
608
609
610
611
612 Subnetwork string `json:"subnetwork,omitempty"`
613
614
615
616
617
618 ForceSendFields []string `json:"-"`
619
620
621
622
623 NullFields []string `json:"-"`
624 }
625
626 func (s *Consumer) MarshalJSON() ([]byte, error) {
627 type NoMethod Consumer
628 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
629 }
630
631
632
633 type DataCatalogConfig struct {
634
635
636
637 Enabled bool `json:"enabled,omitempty"`
638
639
640
641
642
643 ForceSendFields []string `json:"-"`
644
645
646
647
648 NullFields []string `json:"-"`
649 }
650
651 func (s *DataCatalogConfig) MarshalJSON() ([]byte, error) {
652 type NoMethod DataCatalogConfig
653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
654 }
655
656
657
658 type DatabaseDump struct {
659
660
661
662
663
664 DatabaseType string `json:"databaseType,omitempty"`
665
666
667 GcsUri string `json:"gcsUri,omitempty"`
668
669 SourceDatabase string `json:"sourceDatabase,omitempty"`
670
671
672
673
674
675
676
677 Type string `json:"type,omitempty"`
678
679
680
681
682
683 ForceSendFields []string `json:"-"`
684
685
686
687
688 NullFields []string `json:"-"`
689 }
690
691 func (s *DatabaseDump) MarshalJSON() ([]byte, error) {
692 type NoMethod DatabaseDump
693 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
694 }
695
696
697
698
699
700 type Empty struct {
701
702 googleapi.ServerResponse `json:"-"`
703 }
704
705
706 type EncryptionConfig struct {
707
708
709
710
711 KmsKey string `json:"kmsKey,omitempty"`
712
713
714
715
716
717 ForceSendFields []string `json:"-"`
718
719
720
721
722 NullFields []string `json:"-"`
723 }
724
725 func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
726 type NoMethod EncryptionConfig
727 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
728 }
729
730
731
732 type ErrorDetails struct {
733
734
735 Details map[string]string `json:"details,omitempty"`
736
737
738
739
740
741 ForceSendFields []string `json:"-"`
742
743
744
745
746 NullFields []string `json:"-"`
747 }
748
749 func (s *ErrorDetails) MarshalJSON() ([]byte, error) {
750 type NoMethod ErrorDetails
751 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
752 }
753
754
755 type ExportMetadataRequest struct {
756
757
758
759
760
761
762
763 DatabaseDumpType string `json:"databaseDumpType,omitempty"`
764
765
766 DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"`
767
768
769
770
771
772
773
774
775
776 RequestId string `json:"requestId,omitempty"`
777
778
779
780
781
782 ForceSendFields []string `json:"-"`
783
784
785
786
787 NullFields []string `json:"-"`
788 }
789
790 func (s *ExportMetadataRequest) MarshalJSON() ([]byte, error) {
791 type NoMethod ExportMetadataRequest
792 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
793 }
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811 type Expr struct {
812
813
814 Description string `json:"description,omitempty"`
815
816
817 Expression string `json:"expression,omitempty"`
818
819
820 Location string `json:"location,omitempty"`
821
822
823
824 Title string `json:"title,omitempty"`
825
826
827
828
829
830 ForceSendFields []string `json:"-"`
831
832
833
834
835 NullFields []string `json:"-"`
836 }
837
838 func (s *Expr) MarshalJSON() ([]byte, error) {
839 type NoMethod Expr
840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
841 }
842
843
844 type Federation struct {
845
846
847
848
849
850
851 BackendMetastores map[string]BackendMetastore `json:"backendMetastores,omitempty"`
852
853 CreateTime string `json:"createTime,omitempty"`
854
855 EndpointUri string `json:"endpointUri,omitempty"`
856
857 Labels map[string]string `json:"labels,omitempty"`
858
859
860
861 Name string `json:"name,omitempty"`
862
863
864
865
866
867
868
869
870
871
872
873
874 State string `json:"state,omitempty"`
875
876
877 StateMessage string `json:"stateMessage,omitempty"`
878
879
880 Uid string `json:"uid,omitempty"`
881
882
883 UpdateTime string `json:"updateTime,omitempty"`
884
885
886 Version string `json:"version,omitempty"`
887
888
889 googleapi.ServerResponse `json:"-"`
890
891
892
893
894
895 ForceSendFields []string `json:"-"`
896
897
898
899
900 NullFields []string `json:"-"`
901 }
902
903 func (s *Federation) MarshalJSON() ([]byte, error) {
904 type NoMethod Federation
905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
906 }
907
908
909
910 type HiveMetastoreConfig struct {
911
912
913
914
915
916
917
918
919 AuxiliaryVersions map[string]AuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"`
920
921
922
923
924
925 ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
926
927
928
929
930
931
932
933
934
935 EndpointProtocol string `json:"endpointProtocol,omitempty"`
936
937
938
939
940
941 KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"`
942
943 Version string `json:"version,omitempty"`
944
945
946
947
948
949 ForceSendFields []string `json:"-"`
950
951
952
953
954 NullFields []string `json:"-"`
955 }
956
957 func (s *HiveMetastoreConfig) MarshalJSON() ([]byte, error) {
958 type NoMethod HiveMetastoreConfig
959 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
960 }
961
962
963
964 type HiveMetastoreVersion struct {
965
966
967 IsDefault bool `json:"isDefault,omitempty"`
968
969 Version string `json:"version,omitempty"`
970
971
972
973
974
975 ForceSendFields []string `json:"-"`
976
977
978
979
980 NullFields []string `json:"-"`
981 }
982
983 func (s *HiveMetastoreVersion) MarshalJSON() ([]byte, error) {
984 type NoMethod HiveMetastoreVersion
985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
986 }
987
988
989 type KerberosConfig struct {
990
991
992 Keytab *Secret `json:"keytab,omitempty"`
993
994
995
996 Krb5ConfigGcsUri string `json:"krb5ConfigGcsUri,omitempty"`
997
998
999
1000 Principal string `json:"principal,omitempty"`
1001
1002
1003
1004
1005
1006 ForceSendFields []string `json:"-"`
1007
1008
1009
1010
1011 NullFields []string `json:"-"`
1012 }
1013
1014 func (s *KerberosConfig) MarshalJSON() ([]byte, error) {
1015 type NoMethod KerberosConfig
1016 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1017 }
1018
1019
1020 type LatestBackup struct {
1021
1022
1023 BackupId string `json:"backupId,omitempty"`
1024
1025 Duration string `json:"duration,omitempty"`
1026
1027 StartTime string `json:"startTime,omitempty"`
1028
1029
1030
1031
1032
1033
1034
1035 State string `json:"state,omitempty"`
1036
1037
1038
1039
1040
1041 ForceSendFields []string `json:"-"`
1042
1043
1044
1045
1046 NullFields []string `json:"-"`
1047 }
1048
1049 func (s *LatestBackup) MarshalJSON() ([]byte, error) {
1050 type NoMethod LatestBackup
1051 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1052 }
1053
1054
1055 type ListBackupsResponse struct {
1056
1057 Backups []*Backup `json:"backups,omitempty"`
1058
1059
1060 NextPageToken string `json:"nextPageToken,omitempty"`
1061
1062 Unreachable []string `json:"unreachable,omitempty"`
1063
1064
1065 googleapi.ServerResponse `json:"-"`
1066
1067
1068
1069
1070
1071 ForceSendFields []string `json:"-"`
1072
1073
1074
1075
1076 NullFields []string `json:"-"`
1077 }
1078
1079 func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) {
1080 type NoMethod ListBackupsResponse
1081 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1082 }
1083
1084
1085 type ListFederationsResponse struct {
1086
1087 Federations []*Federation `json:"federations,omitempty"`
1088
1089
1090 NextPageToken string `json:"nextPageToken,omitempty"`
1091
1092 Unreachable []string `json:"unreachable,omitempty"`
1093
1094
1095 googleapi.ServerResponse `json:"-"`
1096
1097
1098
1099
1100
1101 ForceSendFields []string `json:"-"`
1102
1103
1104
1105
1106 NullFields []string `json:"-"`
1107 }
1108
1109 func (s *ListFederationsResponse) MarshalJSON() ([]byte, error) {
1110 type NoMethod ListFederationsResponse
1111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1112 }
1113
1114
1115 type ListLocationsResponse struct {
1116
1117
1118 Locations []*Location `json:"locations,omitempty"`
1119
1120 NextPageToken string `json:"nextPageToken,omitempty"`
1121
1122
1123 googleapi.ServerResponse `json:"-"`
1124
1125
1126
1127
1128
1129 ForceSendFields []string `json:"-"`
1130
1131
1132
1133
1134 NullFields []string `json:"-"`
1135 }
1136
1137 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1138 type NoMethod ListLocationsResponse
1139 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1140 }
1141
1142
1143
1144 type ListMetadataImportsResponse struct {
1145
1146 MetadataImports []*MetadataImport `json:"metadataImports,omitempty"`
1147
1148
1149 NextPageToken string `json:"nextPageToken,omitempty"`
1150
1151 Unreachable []string `json:"unreachable,omitempty"`
1152
1153
1154 googleapi.ServerResponse `json:"-"`
1155
1156
1157
1158
1159
1160 ForceSendFields []string `json:"-"`
1161
1162
1163
1164
1165 NullFields []string `json:"-"`
1166 }
1167
1168 func (s *ListMetadataImportsResponse) MarshalJSON() ([]byte, error) {
1169 type NoMethod ListMetadataImportsResponse
1170 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1171 }
1172
1173
1174 type ListOperationsResponse struct {
1175
1176 NextPageToken string `json:"nextPageToken,omitempty"`
1177
1178
1179 Operations []*Operation `json:"operations,omitempty"`
1180
1181
1182 googleapi.ServerResponse `json:"-"`
1183
1184
1185
1186
1187
1188 ForceSendFields []string `json:"-"`
1189
1190
1191
1192
1193 NullFields []string `json:"-"`
1194 }
1195
1196 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1197 type NoMethod ListOperationsResponse
1198 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1199 }
1200
1201
1202 type ListServicesResponse struct {
1203
1204
1205 NextPageToken string `json:"nextPageToken,omitempty"`
1206
1207 Services []*Service `json:"services,omitempty"`
1208
1209 Unreachable []string `json:"unreachable,omitempty"`
1210
1211
1212 googleapi.ServerResponse `json:"-"`
1213
1214
1215
1216
1217
1218 ForceSendFields []string `json:"-"`
1219
1220
1221
1222
1223 NullFields []string `json:"-"`
1224 }
1225
1226 func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
1227 type NoMethod ListServicesResponse
1228 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1229 }
1230
1231
1232 type Location struct {
1233
1234
1235 DisplayName string `json:"displayName,omitempty"`
1236
1237
1238 Labels map[string]string `json:"labels,omitempty"`
1239
1240 LocationId string `json:"locationId,omitempty"`
1241
1242
1243 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1244
1245
1246 Name string `json:"name,omitempty"`
1247
1248
1249 googleapi.ServerResponse `json:"-"`
1250
1251
1252
1253
1254
1255 ForceSendFields []string `json:"-"`
1256
1257
1258
1259
1260 NullFields []string `json:"-"`
1261 }
1262
1263 func (s *Location) MarshalJSON() ([]byte, error) {
1264 type NoMethod Location
1265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1266 }
1267
1268
1269 type LocationMetadata struct {
1270
1271
1272 MultiRegionMetadata *MultiRegionMetadata `json:"multiRegionMetadata,omitempty"`
1273
1274
1275
1276
1277 SupportedHiveMetastoreVersions []*HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"`
1278
1279
1280
1281
1282
1283 ForceSendFields []string `json:"-"`
1284
1285
1286
1287
1288 NullFields []string `json:"-"`
1289 }
1290
1291 func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
1292 type NoMethod LocationMetadata
1293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1294 }
1295
1296
1297
1298 type MaintenanceWindow struct {
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310 DayOfWeek string `json:"dayOfWeek,omitempty"`
1311
1312 HourOfDay int64 `json:"hourOfDay,omitempty"`
1313
1314
1315
1316
1317
1318 ForceSendFields []string `json:"-"`
1319
1320
1321
1322
1323 NullFields []string `json:"-"`
1324 }
1325
1326 func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
1327 type NoMethod MaintenanceWindow
1328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1329 }
1330
1331
1332 type MetadataExport struct {
1333
1334
1335
1336
1337
1338
1339 DatabaseDumpType string `json:"databaseDumpType,omitempty"`
1340
1341
1342
1343 DestinationGcsUri string `json:"destinationGcsUri,omitempty"`
1344
1345 EndTime string `json:"endTime,omitempty"`
1346
1347 StartTime string `json:"startTime,omitempty"`
1348
1349
1350
1351
1352
1353
1354
1355
1356 State string `json:"state,omitempty"`
1357
1358
1359
1360
1361
1362 ForceSendFields []string `json:"-"`
1363
1364
1365
1366
1367 NullFields []string `json:"-"`
1368 }
1369
1370 func (s *MetadataExport) MarshalJSON() ([]byte, error) {
1371 type NoMethod MetadataExport
1372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1373 }
1374
1375
1376 type MetadataImport struct {
1377
1378 CreateTime string `json:"createTime,omitempty"`
1379
1380
1381 DatabaseDump *DatabaseDump `json:"databaseDump,omitempty"`
1382
1383 Description string `json:"description,omitempty"`
1384
1385 EndTime string `json:"endTime,omitempty"`
1386
1387
1388
1389 Name string `json:"name,omitempty"`
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399 State string `json:"state,omitempty"`
1400
1401 UpdateTime string `json:"updateTime,omitempty"`
1402
1403
1404 googleapi.ServerResponse `json:"-"`
1405
1406
1407
1408
1409
1410 ForceSendFields []string `json:"-"`
1411
1412
1413
1414
1415 NullFields []string `json:"-"`
1416 }
1417
1418 func (s *MetadataImport) MarshalJSON() ([]byte, error) {
1419 type NoMethod MetadataImport
1420 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1421 }
1422
1423
1424
1425 type MetadataIntegration struct {
1426
1427
1428 DataCatalogConfig *DataCatalogConfig `json:"dataCatalogConfig,omitempty"`
1429
1430
1431
1432
1433
1434 ForceSendFields []string `json:"-"`
1435
1436
1437
1438
1439 NullFields []string `json:"-"`
1440 }
1441
1442 func (s *MetadataIntegration) MarshalJSON() ([]byte, error) {
1443 type NoMethod MetadataIntegration
1444 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1445 }
1446
1447
1448
1449 type MetadataManagementActivity struct {
1450
1451
1452 MetadataExports []*MetadataExport `json:"metadataExports,omitempty"`
1453
1454 Restores []*Restore `json:"restores,omitempty"`
1455
1456
1457
1458
1459
1460 ForceSendFields []string `json:"-"`
1461
1462
1463
1464
1465 NullFields []string `json:"-"`
1466 }
1467
1468 func (s *MetadataManagementActivity) MarshalJSON() ([]byte, error) {
1469 type NoMethod MetadataManagementActivity
1470 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1471 }
1472
1473
1474
1475 type MoveTableToDatabaseRequest struct {
1476
1477 DbName string `json:"dbName,omitempty"`
1478
1479
1480 DestinationDbName string `json:"destinationDbName,omitempty"`
1481
1482 TableName string `json:"tableName,omitempty"`
1483
1484
1485
1486
1487
1488 ForceSendFields []string `json:"-"`
1489
1490
1491
1492
1493 NullFields []string `json:"-"`
1494 }
1495
1496 func (s *MoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) {
1497 type NoMethod MoveTableToDatabaseRequest
1498 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1499 }
1500
1501
1502
1503 type MoveTableToDatabaseResponse struct {
1504 }
1505
1506
1507
1508
1509 type MultiRegionMetadata struct {
1510
1511 ConstituentRegions []string `json:"constituentRegions,omitempty"`
1512
1513
1514
1515
1516
1517 ForceSendFields []string `json:"-"`
1518
1519
1520
1521
1522 NullFields []string `json:"-"`
1523 }
1524
1525 func (s *MultiRegionMetadata) MarshalJSON() ([]byte, error) {
1526 type NoMethod MultiRegionMetadata
1527 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1528 }
1529
1530
1531 type NetworkConfig struct {
1532
1533
1534 Consumers []*Consumer `json:"consumers,omitempty"`
1535
1536
1537
1538
1539
1540 ForceSendFields []string `json:"-"`
1541
1542
1543
1544
1545 NullFields []string `json:"-"`
1546 }
1547
1548 func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
1549 type NoMethod NetworkConfig
1550 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1551 }
1552
1553
1554
1555 type Operation struct {
1556
1557
1558 Done bool `json:"done,omitempty"`
1559
1560 Error *Status `json:"error,omitempty"`
1561
1562
1563
1564
1565 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1566
1567
1568
1569 Name string `json:"name,omitempty"`
1570
1571
1572
1573
1574
1575
1576
1577 Response googleapi.RawMessage `json:"response,omitempty"`
1578
1579
1580 googleapi.ServerResponse `json:"-"`
1581
1582
1583
1584
1585
1586 ForceSendFields []string `json:"-"`
1587
1588
1589
1590
1591 NullFields []string `json:"-"`
1592 }
1593
1594 func (s *Operation) MarshalJSON() ([]byte, error) {
1595 type NoMethod Operation
1596 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1597 }
1598
1599
1600 type OperationMetadata struct {
1601
1602 ApiVersion string `json:"apiVersion,omitempty"`
1603
1604 CreateTime string `json:"createTime,omitempty"`
1605
1606 EndTime string `json:"endTime,omitempty"`
1607
1608
1609
1610
1611 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1612
1613 StatusMessage string `json:"statusMessage,omitempty"`
1614
1615
1616 Target string `json:"target,omitempty"`
1617
1618 Verb string `json:"verb,omitempty"`
1619
1620
1621
1622
1623
1624 ForceSendFields []string `json:"-"`
1625
1626
1627
1628
1629 NullFields []string `json:"-"`
1630 }
1631
1632 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1633 type NoMethod OperationMetadata
1634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1635 }
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666 type Policy struct {
1667
1668 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1669
1670
1671
1672
1673
1674
1675
1676
1677 Bindings []*Binding `json:"bindings,omitempty"`
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689 Etag string `json:"etag,omitempty"`
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705 Version int64 `json:"version,omitempty"`
1706
1707
1708 googleapi.ServerResponse `json:"-"`
1709
1710
1711
1712
1713
1714 ForceSendFields []string `json:"-"`
1715
1716
1717
1718
1719 NullFields []string `json:"-"`
1720 }
1721
1722 func (s *Policy) MarshalJSON() ([]byte, error) {
1723 type NoMethod Policy
1724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1725 }
1726
1727
1728 type QueryMetadataRequest struct {
1729
1730
1731 Query string `json:"query,omitempty"`
1732
1733
1734
1735
1736
1737 ForceSendFields []string `json:"-"`
1738
1739
1740
1741
1742 NullFields []string `json:"-"`
1743 }
1744
1745 func (s *QueryMetadataRequest) MarshalJSON() ([]byte, error) {
1746 type NoMethod QueryMetadataRequest
1747 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1748 }
1749
1750
1751 type QueryMetadataResponse struct {
1752
1753
1754
1755
1756 ResultManifestUri string `json:"resultManifestUri,omitempty"`
1757
1758
1759
1760
1761
1762 ForceSendFields []string `json:"-"`
1763
1764
1765
1766
1767 NullFields []string `json:"-"`
1768 }
1769
1770 func (s *QueryMetadataResponse) MarshalJSON() ([]byte, error) {
1771 type NoMethod QueryMetadataResponse
1772 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1773 }
1774
1775
1776 type Restore struct {
1777
1778
1779
1780
1781 Backup string `json:"backup,omitempty"`
1782
1783
1784 BackupLocation string `json:"backupLocation,omitempty"`
1785
1786
1787 Details string `json:"details,omitempty"`
1788
1789 EndTime string `json:"endTime,omitempty"`
1790
1791 StartTime string `json:"startTime,omitempty"`
1792
1793
1794
1795
1796
1797
1798
1799
1800 State string `json:"state,omitempty"`
1801
1802
1803
1804
1805
1806
1807 Type string `json:"type,omitempty"`
1808
1809
1810
1811
1812
1813 ForceSendFields []string `json:"-"`
1814
1815
1816
1817
1818 NullFields []string `json:"-"`
1819 }
1820
1821 func (s *Restore) MarshalJSON() ([]byte, error) {
1822 type NoMethod Restore
1823 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1824 }
1825
1826
1827 type RestoreServiceRequest struct {
1828
1829
1830
1831
1832
1833 Backup string `json:"backup,omitempty"`
1834
1835
1836
1837
1838 BackupLocation string `json:"backupLocation,omitempty"`
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848 RequestId string `json:"requestId,omitempty"`
1849
1850
1851
1852
1853
1854
1855
1856 RestoreType string `json:"restoreType,omitempty"`
1857
1858
1859
1860
1861
1862 ForceSendFields []string `json:"-"`
1863
1864
1865
1866
1867 NullFields []string `json:"-"`
1868 }
1869
1870 func (s *RestoreServiceRequest) MarshalJSON() ([]byte, error) {
1871 type NoMethod RestoreServiceRequest
1872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1873 }
1874
1875
1876 type ScalingConfig struct {
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890 InstanceSize string `json:"instanceSize,omitempty"`
1891
1892
1893 ScalingFactor float64 `json:"scalingFactor,omitempty"`
1894
1895
1896
1897
1898
1899 ForceSendFields []string `json:"-"`
1900
1901
1902
1903
1904 NullFields []string `json:"-"`
1905 }
1906
1907 func (s *ScalingConfig) MarshalJSON() ([]byte, error) {
1908 type NoMethod ScalingConfig
1909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1910 }
1911
1912 func (s *ScalingConfig) UnmarshalJSON(data []byte) error {
1913 type NoMethod ScalingConfig
1914 var s1 struct {
1915 ScalingFactor gensupport.JSONFloat64 `json:"scalingFactor"`
1916 *NoMethod
1917 }
1918 s1.NoMethod = (*NoMethod)(s)
1919 if err := json.Unmarshal(data, &s1); err != nil {
1920 return err
1921 }
1922 s.ScalingFactor = float64(s1.ScalingFactor)
1923 return nil
1924 }
1925
1926
1927 type ScheduledBackup struct {
1928
1929
1930 BackupLocation string `json:"backupLocation,omitempty"`
1931
1932
1933
1934 CronSchedule string `json:"cronSchedule,omitempty"`
1935
1936
1937 Enabled bool `json:"enabled,omitempty"`
1938
1939 LatestBackup *LatestBackup `json:"latestBackup,omitempty"`
1940
1941
1942 NextScheduledTime string `json:"nextScheduledTime,omitempty"`
1943
1944
1945
1946
1947
1948 TimeZone string `json:"timeZone,omitempty"`
1949
1950
1951
1952
1953
1954 ForceSendFields []string `json:"-"`
1955
1956
1957
1958
1959 NullFields []string `json:"-"`
1960 }
1961
1962 func (s *ScheduledBackup) MarshalJSON() ([]byte, error) {
1963 type NoMethod ScheduledBackup
1964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1965 }
1966
1967
1968 type Secret struct {
1969
1970
1971
1972 CloudSecret string `json:"cloudSecret,omitempty"`
1973
1974
1975
1976
1977
1978 ForceSendFields []string `json:"-"`
1979
1980
1981
1982
1983 NullFields []string `json:"-"`
1984 }
1985
1986 func (s *Secret) MarshalJSON() ([]byte, error) {
1987 type NoMethod Secret
1988 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1989 }
1990
1991
1992 type Service struct {
1993
1994
1995 ArtifactGcsUri string `json:"artifactGcsUri,omitempty"`
1996
1997 CreateTime string `json:"createTime,omitempty"`
1998
1999
2000
2001
2002
2003
2004
2005 DatabaseType string `json:"databaseType,omitempty"`
2006
2007
2008 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
2009
2010
2011 EndpointUri string `json:"endpointUri,omitempty"`
2012
2013
2014 HiveMetastoreConfig *HiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"`
2015
2016 Labels map[string]string `json:"labels,omitempty"`
2017
2018
2019
2020
2021 MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
2022
2023
2024 MetadataIntegration *MetadataIntegration `json:"metadataIntegration,omitempty"`
2025
2026
2027 MetadataManagementActivity *MetadataManagementActivity `json:"metadataManagementActivity,omitempty"`
2028
2029
2030
2031
2032 Name string `json:"name,omitempty"`
2033
2034
2035
2036 Network string `json:"network,omitempty"`
2037
2038
2039 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
2040
2041 Port int64 `json:"port,omitempty"`
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052 ReleaseChannel string `json:"releaseChannel,omitempty"`
2053
2054 ScalingConfig *ScalingConfig `json:"scalingConfig,omitempty"`
2055
2056
2057 ScheduledBackup *ScheduledBackup `json:"scheduledBackup,omitempty"`
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074 State string `json:"state,omitempty"`
2075
2076
2077 StateMessage string `json:"stateMessage,omitempty"`
2078
2079
2080 TelemetryConfig *TelemetryConfig `json:"telemetryConfig,omitempty"`
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090 Tier string `json:"tier,omitempty"`
2091
2092
2093 Uid string `json:"uid,omitempty"`
2094
2095
2096 UpdateTime string `json:"updateTime,omitempty"`
2097
2098
2099 googleapi.ServerResponse `json:"-"`
2100
2101
2102
2103
2104
2105 ForceSendFields []string `json:"-"`
2106
2107
2108
2109
2110 NullFields []string `json:"-"`
2111 }
2112
2113 func (s *Service) MarshalJSON() ([]byte, error) {
2114 type NoMethod Service
2115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2116 }
2117
2118
2119 type SetIamPolicyRequest struct {
2120
2121
2122
2123
2124 Policy *Policy `json:"policy,omitempty"`
2125
2126
2127
2128 UpdateMask string `json:"updateMask,omitempty"`
2129
2130
2131
2132
2133
2134 ForceSendFields []string `json:"-"`
2135
2136
2137
2138
2139 NullFields []string `json:"-"`
2140 }
2141
2142 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2143 type NoMethod SetIamPolicyRequest
2144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2145 }
2146
2147
2148
2149
2150
2151
2152
2153 type Status struct {
2154
2155 Code int64 `json:"code,omitempty"`
2156
2157
2158 Details []googleapi.RawMessage `json:"details,omitempty"`
2159
2160
2161
2162 Message string `json:"message,omitempty"`
2163
2164
2165
2166
2167
2168 ForceSendFields []string `json:"-"`
2169
2170
2171
2172
2173 NullFields []string `json:"-"`
2174 }
2175
2176 func (s *Status) MarshalJSON() ([]byte, error) {
2177 type NoMethod Status
2178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2179 }
2180
2181
2182 type TelemetryConfig struct {
2183
2184
2185
2186
2187
2188
2189 LogFormat string `json:"logFormat,omitempty"`
2190
2191
2192
2193
2194
2195 ForceSendFields []string `json:"-"`
2196
2197
2198
2199
2200 NullFields []string `json:"-"`
2201 }
2202
2203 func (s *TelemetryConfig) MarshalJSON() ([]byte, error) {
2204 type NoMethod TelemetryConfig
2205 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2206 }
2207
2208
2209 type TestIamPermissionsRequest struct {
2210
2211
2212
2213
2214 Permissions []string `json:"permissions,omitempty"`
2215
2216
2217
2218
2219
2220 ForceSendFields []string `json:"-"`
2221
2222
2223
2224
2225 NullFields []string `json:"-"`
2226 }
2227
2228 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2229 type NoMethod TestIamPermissionsRequest
2230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2231 }
2232
2233
2234 type TestIamPermissionsResponse struct {
2235
2236
2237 Permissions []string `json:"permissions,omitempty"`
2238
2239
2240 googleapi.ServerResponse `json:"-"`
2241
2242
2243
2244
2245
2246 ForceSendFields []string `json:"-"`
2247
2248
2249
2250
2251 NullFields []string `json:"-"`
2252 }
2253
2254 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2255 type NoMethod TestIamPermissionsResponse
2256 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2257 }
2258
2259 type ProjectsLocationsGetCall struct {
2260 s *APIService
2261 name string
2262 urlParams_ gensupport.URLParams
2263 ifNoneMatch_ string
2264 ctx_ context.Context
2265 header_ http.Header
2266 }
2267
2268
2269
2270
2271 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2272 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2273 c.name = name
2274 return c
2275 }
2276
2277
2278
2279
2280 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2282 return c
2283 }
2284
2285
2286
2287
2288 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2289 c.ifNoneMatch_ = entityTag
2290 return c
2291 }
2292
2293
2294 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2295 c.ctx_ = ctx
2296 return c
2297 }
2298
2299
2300
2301 func (c *ProjectsLocationsGetCall) Header() http.Header {
2302 if c.header_ == nil {
2303 c.header_ = make(http.Header)
2304 }
2305 return c.header_
2306 }
2307
2308 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2309 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2310 if c.ifNoneMatch_ != "" {
2311 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2312 }
2313 var body io.Reader = nil
2314 c.urlParams_.Set("alt", alt)
2315 c.urlParams_.Set("prettyPrint", "false")
2316 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2317 urls += "?" + c.urlParams_.Encode()
2318 req, err := http.NewRequest("GET", urls, body)
2319 if err != nil {
2320 return nil, err
2321 }
2322 req.Header = reqHeaders
2323 googleapi.Expand(req.URL, map[string]string{
2324 "name": c.name,
2325 })
2326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2327 }
2328
2329
2330
2331
2332
2333
2334 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2335 gensupport.SetOptions(c.urlParams_, opts...)
2336 res, err := c.doRequest("json")
2337 if res != nil && res.StatusCode == http.StatusNotModified {
2338 if res.Body != nil {
2339 res.Body.Close()
2340 }
2341 return nil, gensupport.WrapError(&googleapi.Error{
2342 Code: res.StatusCode,
2343 Header: res.Header,
2344 })
2345 }
2346 if err != nil {
2347 return nil, err
2348 }
2349 defer googleapi.CloseBody(res)
2350 if err := googleapi.CheckResponse(res); err != nil {
2351 return nil, gensupport.WrapError(err)
2352 }
2353 ret := &Location{
2354 ServerResponse: googleapi.ServerResponse{
2355 Header: res.Header,
2356 HTTPStatusCode: res.StatusCode,
2357 },
2358 }
2359 target := &ret
2360 if err := gensupport.DecodeResponse(target, res); err != nil {
2361 return nil, err
2362 }
2363 return ret, nil
2364 }
2365
2366 type ProjectsLocationsListCall struct {
2367 s *APIService
2368 name string
2369 urlParams_ gensupport.URLParams
2370 ifNoneMatch_ string
2371 ctx_ context.Context
2372 header_ http.Header
2373 }
2374
2375
2376
2377
2378 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2379 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2380 c.name = name
2381 return c
2382 }
2383
2384
2385
2386
2387
2388 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2389 c.urlParams_.Set("filter", filter)
2390 return c
2391 }
2392
2393
2394
2395 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2396 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2397 return c
2398 }
2399
2400
2401
2402
2403 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2404 c.urlParams_.Set("pageToken", pageToken)
2405 return c
2406 }
2407
2408
2409
2410
2411 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2412 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2413 return c
2414 }
2415
2416
2417
2418
2419 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2420 c.ifNoneMatch_ = entityTag
2421 return c
2422 }
2423
2424
2425 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2426 c.ctx_ = ctx
2427 return c
2428 }
2429
2430
2431
2432 func (c *ProjectsLocationsListCall) Header() http.Header {
2433 if c.header_ == nil {
2434 c.header_ = make(http.Header)
2435 }
2436 return c.header_
2437 }
2438
2439 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2440 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2441 if c.ifNoneMatch_ != "" {
2442 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2443 }
2444 var body io.Reader = nil
2445 c.urlParams_.Set("alt", alt)
2446 c.urlParams_.Set("prettyPrint", "false")
2447 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
2448 urls += "?" + c.urlParams_.Encode()
2449 req, err := http.NewRequest("GET", urls, body)
2450 if err != nil {
2451 return nil, err
2452 }
2453 req.Header = reqHeaders
2454 googleapi.Expand(req.URL, map[string]string{
2455 "name": c.name,
2456 })
2457 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2458 }
2459
2460
2461
2462
2463
2464
2465
2466 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2467 gensupport.SetOptions(c.urlParams_, opts...)
2468 res, err := c.doRequest("json")
2469 if res != nil && res.StatusCode == http.StatusNotModified {
2470 if res.Body != nil {
2471 res.Body.Close()
2472 }
2473 return nil, gensupport.WrapError(&googleapi.Error{
2474 Code: res.StatusCode,
2475 Header: res.Header,
2476 })
2477 }
2478 if err != nil {
2479 return nil, err
2480 }
2481 defer googleapi.CloseBody(res)
2482 if err := googleapi.CheckResponse(res); err != nil {
2483 return nil, gensupport.WrapError(err)
2484 }
2485 ret := &ListLocationsResponse{
2486 ServerResponse: googleapi.ServerResponse{
2487 Header: res.Header,
2488 HTTPStatusCode: res.StatusCode,
2489 },
2490 }
2491 target := &ret
2492 if err := gensupport.DecodeResponse(target, res); err != nil {
2493 return nil, err
2494 }
2495 return ret, nil
2496 }
2497
2498
2499
2500
2501 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2502 c.ctx_ = ctx
2503 defer c.PageToken(c.urlParams_.Get("pageToken"))
2504 for {
2505 x, err := c.Do()
2506 if err != nil {
2507 return err
2508 }
2509 if err := f(x); err != nil {
2510 return err
2511 }
2512 if x.NextPageToken == "" {
2513 return nil
2514 }
2515 c.PageToken(x.NextPageToken)
2516 }
2517 }
2518
2519 type ProjectsLocationsFederationsCreateCall struct {
2520 s *APIService
2521 parent string
2522 federation *Federation
2523 urlParams_ gensupport.URLParams
2524 ctx_ context.Context
2525 header_ http.Header
2526 }
2527
2528
2529
2530
2531
2532
2533 func (r *ProjectsLocationsFederationsService) Create(parent string, federation *Federation) *ProjectsLocationsFederationsCreateCall {
2534 c := &ProjectsLocationsFederationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2535 c.parent = parent
2536 c.federation = federation
2537 return c
2538 }
2539
2540
2541
2542
2543
2544
2545 func (c *ProjectsLocationsFederationsCreateCall) FederationId(federationId string) *ProjectsLocationsFederationsCreateCall {
2546 c.urlParams_.Set("federationId", federationId)
2547 return c
2548 }
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559 func (c *ProjectsLocationsFederationsCreateCall) RequestId(requestId string) *ProjectsLocationsFederationsCreateCall {
2560 c.urlParams_.Set("requestId", requestId)
2561 return c
2562 }
2563
2564
2565
2566
2567 func (c *ProjectsLocationsFederationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsCreateCall {
2568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2569 return c
2570 }
2571
2572
2573 func (c *ProjectsLocationsFederationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFederationsCreateCall {
2574 c.ctx_ = ctx
2575 return c
2576 }
2577
2578
2579
2580 func (c *ProjectsLocationsFederationsCreateCall) Header() http.Header {
2581 if c.header_ == nil {
2582 c.header_ = make(http.Header)
2583 }
2584 return c.header_
2585 }
2586
2587 func (c *ProjectsLocationsFederationsCreateCall) doRequest(alt string) (*http.Response, error) {
2588 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2589 var body io.Reader = nil
2590 body, err := googleapi.WithoutDataWrapper.JSONReader(c.federation)
2591 if err != nil {
2592 return nil, err
2593 }
2594 c.urlParams_.Set("alt", alt)
2595 c.urlParams_.Set("prettyPrint", "false")
2596 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/federations")
2597 urls += "?" + c.urlParams_.Encode()
2598 req, err := http.NewRequest("POST", urls, body)
2599 if err != nil {
2600 return nil, err
2601 }
2602 req.Header = reqHeaders
2603 googleapi.Expand(req.URL, map[string]string{
2604 "parent": c.parent,
2605 })
2606 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2607 }
2608
2609
2610
2611
2612
2613
2614 func (c *ProjectsLocationsFederationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2615 gensupport.SetOptions(c.urlParams_, opts...)
2616 res, err := c.doRequest("json")
2617 if res != nil && res.StatusCode == http.StatusNotModified {
2618 if res.Body != nil {
2619 res.Body.Close()
2620 }
2621 return nil, gensupport.WrapError(&googleapi.Error{
2622 Code: res.StatusCode,
2623 Header: res.Header,
2624 })
2625 }
2626 if err != nil {
2627 return nil, err
2628 }
2629 defer googleapi.CloseBody(res)
2630 if err := googleapi.CheckResponse(res); err != nil {
2631 return nil, gensupport.WrapError(err)
2632 }
2633 ret := &Operation{
2634 ServerResponse: googleapi.ServerResponse{
2635 Header: res.Header,
2636 HTTPStatusCode: res.StatusCode,
2637 },
2638 }
2639 target := &ret
2640 if err := gensupport.DecodeResponse(target, res); err != nil {
2641 return nil, err
2642 }
2643 return ret, nil
2644 }
2645
2646 type ProjectsLocationsFederationsDeleteCall struct {
2647 s *APIService
2648 name string
2649 urlParams_ gensupport.URLParams
2650 ctx_ context.Context
2651 header_ http.Header
2652 }
2653
2654
2655
2656
2657
2658
2659
2660 func (r *ProjectsLocationsFederationsService) Delete(name string) *ProjectsLocationsFederationsDeleteCall {
2661 c := &ProjectsLocationsFederationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2662 c.name = name
2663 return c
2664 }
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675 func (c *ProjectsLocationsFederationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFederationsDeleteCall {
2676 c.urlParams_.Set("requestId", requestId)
2677 return c
2678 }
2679
2680
2681
2682
2683 func (c *ProjectsLocationsFederationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsDeleteCall {
2684 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2685 return c
2686 }
2687
2688
2689 func (c *ProjectsLocationsFederationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFederationsDeleteCall {
2690 c.ctx_ = ctx
2691 return c
2692 }
2693
2694
2695
2696 func (c *ProjectsLocationsFederationsDeleteCall) Header() http.Header {
2697 if c.header_ == nil {
2698 c.header_ = make(http.Header)
2699 }
2700 return c.header_
2701 }
2702
2703 func (c *ProjectsLocationsFederationsDeleteCall) doRequest(alt string) (*http.Response, error) {
2704 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2705 var body io.Reader = nil
2706 c.urlParams_.Set("alt", alt)
2707 c.urlParams_.Set("prettyPrint", "false")
2708 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2709 urls += "?" + c.urlParams_.Encode()
2710 req, err := http.NewRequest("DELETE", urls, body)
2711 if err != nil {
2712 return nil, err
2713 }
2714 req.Header = reqHeaders
2715 googleapi.Expand(req.URL, map[string]string{
2716 "name": c.name,
2717 })
2718 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2719 }
2720
2721
2722
2723
2724
2725
2726 func (c *ProjectsLocationsFederationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2727 gensupport.SetOptions(c.urlParams_, opts...)
2728 res, err := c.doRequest("json")
2729 if res != nil && res.StatusCode == http.StatusNotModified {
2730 if res.Body != nil {
2731 res.Body.Close()
2732 }
2733 return nil, gensupport.WrapError(&googleapi.Error{
2734 Code: res.StatusCode,
2735 Header: res.Header,
2736 })
2737 }
2738 if err != nil {
2739 return nil, err
2740 }
2741 defer googleapi.CloseBody(res)
2742 if err := googleapi.CheckResponse(res); err != nil {
2743 return nil, gensupport.WrapError(err)
2744 }
2745 ret := &Operation{
2746 ServerResponse: googleapi.ServerResponse{
2747 Header: res.Header,
2748 HTTPStatusCode: res.StatusCode,
2749 },
2750 }
2751 target := &ret
2752 if err := gensupport.DecodeResponse(target, res); err != nil {
2753 return nil, err
2754 }
2755 return ret, nil
2756 }
2757
2758 type ProjectsLocationsFederationsGetCall struct {
2759 s *APIService
2760 name string
2761 urlParams_ gensupport.URLParams
2762 ifNoneMatch_ string
2763 ctx_ context.Context
2764 header_ http.Header
2765 }
2766
2767
2768
2769
2770
2771
2772
2773 func (r *ProjectsLocationsFederationsService) Get(name string) *ProjectsLocationsFederationsGetCall {
2774 c := &ProjectsLocationsFederationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2775 c.name = name
2776 return c
2777 }
2778
2779
2780
2781
2782 func (c *ProjectsLocationsFederationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetCall {
2783 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2784 return c
2785 }
2786
2787
2788
2789
2790 func (c *ProjectsLocationsFederationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetCall {
2791 c.ifNoneMatch_ = entityTag
2792 return c
2793 }
2794
2795
2796 func (c *ProjectsLocationsFederationsGetCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetCall {
2797 c.ctx_ = ctx
2798 return c
2799 }
2800
2801
2802
2803 func (c *ProjectsLocationsFederationsGetCall) Header() http.Header {
2804 if c.header_ == nil {
2805 c.header_ = make(http.Header)
2806 }
2807 return c.header_
2808 }
2809
2810 func (c *ProjectsLocationsFederationsGetCall) doRequest(alt string) (*http.Response, error) {
2811 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2812 if c.ifNoneMatch_ != "" {
2813 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2814 }
2815 var body io.Reader = nil
2816 c.urlParams_.Set("alt", alt)
2817 c.urlParams_.Set("prettyPrint", "false")
2818 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2819 urls += "?" + c.urlParams_.Encode()
2820 req, err := http.NewRequest("GET", urls, body)
2821 if err != nil {
2822 return nil, err
2823 }
2824 req.Header = reqHeaders
2825 googleapi.Expand(req.URL, map[string]string{
2826 "name": c.name,
2827 })
2828 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2829 }
2830
2831
2832
2833
2834
2835
2836 func (c *ProjectsLocationsFederationsGetCall) Do(opts ...googleapi.CallOption) (*Federation, error) {
2837 gensupport.SetOptions(c.urlParams_, opts...)
2838 res, err := c.doRequest("json")
2839 if res != nil && res.StatusCode == http.StatusNotModified {
2840 if res.Body != nil {
2841 res.Body.Close()
2842 }
2843 return nil, gensupport.WrapError(&googleapi.Error{
2844 Code: res.StatusCode,
2845 Header: res.Header,
2846 })
2847 }
2848 if err != nil {
2849 return nil, err
2850 }
2851 defer googleapi.CloseBody(res)
2852 if err := googleapi.CheckResponse(res); err != nil {
2853 return nil, gensupport.WrapError(err)
2854 }
2855 ret := &Federation{
2856 ServerResponse: googleapi.ServerResponse{
2857 Header: res.Header,
2858 HTTPStatusCode: res.StatusCode,
2859 },
2860 }
2861 target := &ret
2862 if err := gensupport.DecodeResponse(target, res); err != nil {
2863 return nil, err
2864 }
2865 return ret, nil
2866 }
2867
2868 type ProjectsLocationsFederationsGetIamPolicyCall struct {
2869 s *APIService
2870 resource string
2871 urlParams_ gensupport.URLParams
2872 ifNoneMatch_ string
2873 ctx_ context.Context
2874 header_ http.Header
2875 }
2876
2877
2878
2879
2880
2881
2882
2883 func (r *ProjectsLocationsFederationsService) GetIamPolicy(resource string) *ProjectsLocationsFederationsGetIamPolicyCall {
2884 c := &ProjectsLocationsFederationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2885 c.resource = resource
2886 return c
2887 }
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901 func (c *ProjectsLocationsFederationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFederationsGetIamPolicyCall {
2902 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
2903 return c
2904 }
2905
2906
2907
2908
2909 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetIamPolicyCall {
2910 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2911 return c
2912 }
2913
2914
2915
2916
2917 func (c *ProjectsLocationsFederationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetIamPolicyCall {
2918 c.ifNoneMatch_ = entityTag
2919 return c
2920 }
2921
2922
2923 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetIamPolicyCall {
2924 c.ctx_ = ctx
2925 return c
2926 }
2927
2928
2929
2930 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Header() http.Header {
2931 if c.header_ == nil {
2932 c.header_ = make(http.Header)
2933 }
2934 return c.header_
2935 }
2936
2937 func (c *ProjectsLocationsFederationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2938 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2939 if c.ifNoneMatch_ != "" {
2940 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2941 }
2942 var body io.Reader = nil
2943 c.urlParams_.Set("alt", alt)
2944 c.urlParams_.Set("prettyPrint", "false")
2945 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
2946 urls += "?" + c.urlParams_.Encode()
2947 req, err := http.NewRequest("GET", urls, body)
2948 if err != nil {
2949 return nil, err
2950 }
2951 req.Header = reqHeaders
2952 googleapi.Expand(req.URL, map[string]string{
2953 "resource": c.resource,
2954 })
2955 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2956 }
2957
2958
2959
2960
2961
2962
2963 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2964 gensupport.SetOptions(c.urlParams_, opts...)
2965 res, err := c.doRequest("json")
2966 if res != nil && res.StatusCode == http.StatusNotModified {
2967 if res.Body != nil {
2968 res.Body.Close()
2969 }
2970 return nil, gensupport.WrapError(&googleapi.Error{
2971 Code: res.StatusCode,
2972 Header: res.Header,
2973 })
2974 }
2975 if err != nil {
2976 return nil, err
2977 }
2978 defer googleapi.CloseBody(res)
2979 if err := googleapi.CheckResponse(res); err != nil {
2980 return nil, gensupport.WrapError(err)
2981 }
2982 ret := &Policy{
2983 ServerResponse: googleapi.ServerResponse{
2984 Header: res.Header,
2985 HTTPStatusCode: res.StatusCode,
2986 },
2987 }
2988 target := &ret
2989 if err := gensupport.DecodeResponse(target, res); err != nil {
2990 return nil, err
2991 }
2992 return ret, nil
2993 }
2994
2995 type ProjectsLocationsFederationsListCall struct {
2996 s *APIService
2997 parent string
2998 urlParams_ gensupport.URLParams
2999 ifNoneMatch_ string
3000 ctx_ context.Context
3001 header_ http.Header
3002 }
3003
3004
3005
3006
3007
3008
3009 func (r *ProjectsLocationsFederationsService) List(parent string) *ProjectsLocationsFederationsListCall {
3010 c := &ProjectsLocationsFederationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3011 c.parent = parent
3012 return c
3013 }
3014
3015
3016
3017 func (c *ProjectsLocationsFederationsListCall) Filter(filter string) *ProjectsLocationsFederationsListCall {
3018 c.urlParams_.Set("filter", filter)
3019 return c
3020 }
3021
3022
3023
3024
3025
3026 func (c *ProjectsLocationsFederationsListCall) OrderBy(orderBy string) *ProjectsLocationsFederationsListCall {
3027 c.urlParams_.Set("orderBy", orderBy)
3028 return c
3029 }
3030
3031
3032
3033
3034
3035 func (c *ProjectsLocationsFederationsListCall) PageSize(pageSize int64) *ProjectsLocationsFederationsListCall {
3036 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3037 return c
3038 }
3039
3040
3041
3042
3043
3044
3045 func (c *ProjectsLocationsFederationsListCall) PageToken(pageToken string) *ProjectsLocationsFederationsListCall {
3046 c.urlParams_.Set("pageToken", pageToken)
3047 return c
3048 }
3049
3050
3051
3052
3053 func (c *ProjectsLocationsFederationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsListCall {
3054 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3055 return c
3056 }
3057
3058
3059
3060
3061 func (c *ProjectsLocationsFederationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsListCall {
3062 c.ifNoneMatch_ = entityTag
3063 return c
3064 }
3065
3066
3067 func (c *ProjectsLocationsFederationsListCall) Context(ctx context.Context) *ProjectsLocationsFederationsListCall {
3068 c.ctx_ = ctx
3069 return c
3070 }
3071
3072
3073
3074 func (c *ProjectsLocationsFederationsListCall) Header() http.Header {
3075 if c.header_ == nil {
3076 c.header_ = make(http.Header)
3077 }
3078 return c.header_
3079 }
3080
3081 func (c *ProjectsLocationsFederationsListCall) doRequest(alt string) (*http.Response, error) {
3082 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3083 if c.ifNoneMatch_ != "" {
3084 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3085 }
3086 var body io.Reader = nil
3087 c.urlParams_.Set("alt", alt)
3088 c.urlParams_.Set("prettyPrint", "false")
3089 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/federations")
3090 urls += "?" + c.urlParams_.Encode()
3091 req, err := http.NewRequest("GET", urls, body)
3092 if err != nil {
3093 return nil, err
3094 }
3095 req.Header = reqHeaders
3096 googleapi.Expand(req.URL, map[string]string{
3097 "parent": c.parent,
3098 })
3099 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3100 }
3101
3102
3103
3104
3105
3106
3107
3108 func (c *ProjectsLocationsFederationsListCall) Do(opts ...googleapi.CallOption) (*ListFederationsResponse, error) {
3109 gensupport.SetOptions(c.urlParams_, opts...)
3110 res, err := c.doRequest("json")
3111 if res != nil && res.StatusCode == http.StatusNotModified {
3112 if res.Body != nil {
3113 res.Body.Close()
3114 }
3115 return nil, gensupport.WrapError(&googleapi.Error{
3116 Code: res.StatusCode,
3117 Header: res.Header,
3118 })
3119 }
3120 if err != nil {
3121 return nil, err
3122 }
3123 defer googleapi.CloseBody(res)
3124 if err := googleapi.CheckResponse(res); err != nil {
3125 return nil, gensupport.WrapError(err)
3126 }
3127 ret := &ListFederationsResponse{
3128 ServerResponse: googleapi.ServerResponse{
3129 Header: res.Header,
3130 HTTPStatusCode: res.StatusCode,
3131 },
3132 }
3133 target := &ret
3134 if err := gensupport.DecodeResponse(target, res); err != nil {
3135 return nil, err
3136 }
3137 return ret, nil
3138 }
3139
3140
3141
3142
3143 func (c *ProjectsLocationsFederationsListCall) Pages(ctx context.Context, f func(*ListFederationsResponse) error) error {
3144 c.ctx_ = ctx
3145 defer c.PageToken(c.urlParams_.Get("pageToken"))
3146 for {
3147 x, err := c.Do()
3148 if err != nil {
3149 return err
3150 }
3151 if err := f(x); err != nil {
3152 return err
3153 }
3154 if x.NextPageToken == "" {
3155 return nil
3156 }
3157 c.PageToken(x.NextPageToken)
3158 }
3159 }
3160
3161 type ProjectsLocationsFederationsPatchCall struct {
3162 s *APIService
3163 name string
3164 federation *Federation
3165 urlParams_ gensupport.URLParams
3166 ctx_ context.Context
3167 header_ http.Header
3168 }
3169
3170
3171
3172
3173
3174
3175
3176 func (r *ProjectsLocationsFederationsService) Patch(name string, federation *Federation) *ProjectsLocationsFederationsPatchCall {
3177 c := &ProjectsLocationsFederationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3178 c.name = name
3179 c.federation = federation
3180 return c
3181 }
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192 func (c *ProjectsLocationsFederationsPatchCall) RequestId(requestId string) *ProjectsLocationsFederationsPatchCall {
3193 c.urlParams_.Set("requestId", requestId)
3194 return c
3195 }
3196
3197
3198
3199
3200
3201
3202 func (c *ProjectsLocationsFederationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFederationsPatchCall {
3203 c.urlParams_.Set("updateMask", updateMask)
3204 return c
3205 }
3206
3207
3208
3209
3210 func (c *ProjectsLocationsFederationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsPatchCall {
3211 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3212 return c
3213 }
3214
3215
3216 func (c *ProjectsLocationsFederationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFederationsPatchCall {
3217 c.ctx_ = ctx
3218 return c
3219 }
3220
3221
3222
3223 func (c *ProjectsLocationsFederationsPatchCall) Header() http.Header {
3224 if c.header_ == nil {
3225 c.header_ = make(http.Header)
3226 }
3227 return c.header_
3228 }
3229
3230 func (c *ProjectsLocationsFederationsPatchCall) doRequest(alt string) (*http.Response, error) {
3231 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3232 var body io.Reader = nil
3233 body, err := googleapi.WithoutDataWrapper.JSONReader(c.federation)
3234 if err != nil {
3235 return nil, err
3236 }
3237 c.urlParams_.Set("alt", alt)
3238 c.urlParams_.Set("prettyPrint", "false")
3239 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3240 urls += "?" + c.urlParams_.Encode()
3241 req, err := http.NewRequest("PATCH", urls, body)
3242 if err != nil {
3243 return nil, err
3244 }
3245 req.Header = reqHeaders
3246 googleapi.Expand(req.URL, map[string]string{
3247 "name": c.name,
3248 })
3249 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3250 }
3251
3252
3253
3254
3255
3256
3257 func (c *ProjectsLocationsFederationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3258 gensupport.SetOptions(c.urlParams_, opts...)
3259 res, err := c.doRequest("json")
3260 if res != nil && res.StatusCode == http.StatusNotModified {
3261 if res.Body != nil {
3262 res.Body.Close()
3263 }
3264 return nil, gensupport.WrapError(&googleapi.Error{
3265 Code: res.StatusCode,
3266 Header: res.Header,
3267 })
3268 }
3269 if err != nil {
3270 return nil, err
3271 }
3272 defer googleapi.CloseBody(res)
3273 if err := googleapi.CheckResponse(res); err != nil {
3274 return nil, gensupport.WrapError(err)
3275 }
3276 ret := &Operation{
3277 ServerResponse: googleapi.ServerResponse{
3278 Header: res.Header,
3279 HTTPStatusCode: res.StatusCode,
3280 },
3281 }
3282 target := &ret
3283 if err := gensupport.DecodeResponse(target, res); err != nil {
3284 return nil, err
3285 }
3286 return ret, nil
3287 }
3288
3289 type ProjectsLocationsFederationsSetIamPolicyCall struct {
3290 s *APIService
3291 resource string
3292 setiampolicyrequest *SetIamPolicyRequest
3293 urlParams_ gensupport.URLParams
3294 ctx_ context.Context
3295 header_ http.Header
3296 }
3297
3298
3299
3300
3301
3302
3303
3304
3305 func (r *ProjectsLocationsFederationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFederationsSetIamPolicyCall {
3306 c := &ProjectsLocationsFederationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3307 c.resource = resource
3308 c.setiampolicyrequest = setiampolicyrequest
3309 return c
3310 }
3311
3312
3313
3314
3315 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsSetIamPolicyCall {
3316 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3317 return c
3318 }
3319
3320
3321 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsSetIamPolicyCall {
3322 c.ctx_ = ctx
3323 return c
3324 }
3325
3326
3327
3328 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Header() http.Header {
3329 if c.header_ == nil {
3330 c.header_ = make(http.Header)
3331 }
3332 return c.header_
3333 }
3334
3335 func (c *ProjectsLocationsFederationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3336 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3337 var body io.Reader = nil
3338 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
3339 if err != nil {
3340 return nil, err
3341 }
3342 c.urlParams_.Set("alt", alt)
3343 c.urlParams_.Set("prettyPrint", "false")
3344 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
3345 urls += "?" + c.urlParams_.Encode()
3346 req, err := http.NewRequest("POST", urls, body)
3347 if err != nil {
3348 return nil, err
3349 }
3350 req.Header = reqHeaders
3351 googleapi.Expand(req.URL, map[string]string{
3352 "resource": c.resource,
3353 })
3354 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3355 }
3356
3357
3358
3359
3360
3361
3362 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3363 gensupport.SetOptions(c.urlParams_, opts...)
3364 res, err := c.doRequest("json")
3365 if res != nil && res.StatusCode == http.StatusNotModified {
3366 if res.Body != nil {
3367 res.Body.Close()
3368 }
3369 return nil, gensupport.WrapError(&googleapi.Error{
3370 Code: res.StatusCode,
3371 Header: res.Header,
3372 })
3373 }
3374 if err != nil {
3375 return nil, err
3376 }
3377 defer googleapi.CloseBody(res)
3378 if err := googleapi.CheckResponse(res); err != nil {
3379 return nil, gensupport.WrapError(err)
3380 }
3381 ret := &Policy{
3382 ServerResponse: googleapi.ServerResponse{
3383 Header: res.Header,
3384 HTTPStatusCode: res.StatusCode,
3385 },
3386 }
3387 target := &ret
3388 if err := gensupport.DecodeResponse(target, res); err != nil {
3389 return nil, err
3390 }
3391 return ret, nil
3392 }
3393
3394 type ProjectsLocationsFederationsTestIamPermissionsCall struct {
3395 s *APIService
3396 resource string
3397 testiampermissionsrequest *TestIamPermissionsRequest
3398 urlParams_ gensupport.URLParams
3399 ctx_ context.Context
3400 header_ http.Header
3401 }
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413 func (r *ProjectsLocationsFederationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFederationsTestIamPermissionsCall {
3414 c := &ProjectsLocationsFederationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3415 c.resource = resource
3416 c.testiampermissionsrequest = testiampermissionsrequest
3417 return c
3418 }
3419
3420
3421
3422
3423 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsTestIamPermissionsCall {
3424 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3425 return c
3426 }
3427
3428
3429 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFederationsTestIamPermissionsCall {
3430 c.ctx_ = ctx
3431 return c
3432 }
3433
3434
3435
3436 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Header() http.Header {
3437 if c.header_ == nil {
3438 c.header_ = make(http.Header)
3439 }
3440 return c.header_
3441 }
3442
3443 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
3444 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3445 var body io.Reader = nil
3446 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
3447 if err != nil {
3448 return nil, err
3449 }
3450 c.urlParams_.Set("alt", alt)
3451 c.urlParams_.Set("prettyPrint", "false")
3452 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
3453 urls += "?" + c.urlParams_.Encode()
3454 req, err := http.NewRequest("POST", urls, body)
3455 if err != nil {
3456 return nil, err
3457 }
3458 req.Header = reqHeaders
3459 googleapi.Expand(req.URL, map[string]string{
3460 "resource": c.resource,
3461 })
3462 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3463 }
3464
3465
3466
3467
3468
3469
3470
3471 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
3472 gensupport.SetOptions(c.urlParams_, opts...)
3473 res, err := c.doRequest("json")
3474 if res != nil && res.StatusCode == http.StatusNotModified {
3475 if res.Body != nil {
3476 res.Body.Close()
3477 }
3478 return nil, gensupport.WrapError(&googleapi.Error{
3479 Code: res.StatusCode,
3480 Header: res.Header,
3481 })
3482 }
3483 if err != nil {
3484 return nil, err
3485 }
3486 defer googleapi.CloseBody(res)
3487 if err := googleapi.CheckResponse(res); err != nil {
3488 return nil, gensupport.WrapError(err)
3489 }
3490 ret := &TestIamPermissionsResponse{
3491 ServerResponse: googleapi.ServerResponse{
3492 Header: res.Header,
3493 HTTPStatusCode: res.StatusCode,
3494 },
3495 }
3496 target := &ret
3497 if err := gensupport.DecodeResponse(target, res); err != nil {
3498 return nil, err
3499 }
3500 return ret, nil
3501 }
3502
3503 type ProjectsLocationsOperationsCancelCall struct {
3504 s *APIService
3505 name string
3506 canceloperationrequest *CancelOperationRequest
3507 urlParams_ gensupport.URLParams
3508 ctx_ context.Context
3509 header_ http.Header
3510 }
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
3524 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3525 c.name = name
3526 c.canceloperationrequest = canceloperationrequest
3527 return c
3528 }
3529
3530
3531
3532
3533 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
3534 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3535 return c
3536 }
3537
3538
3539 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
3540 c.ctx_ = ctx
3541 return c
3542 }
3543
3544
3545
3546 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
3547 if c.header_ == nil {
3548 c.header_ = make(http.Header)
3549 }
3550 return c.header_
3551 }
3552
3553 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
3554 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3555 var body io.Reader = nil
3556 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
3557 if err != nil {
3558 return nil, err
3559 }
3560 c.urlParams_.Set("alt", alt)
3561 c.urlParams_.Set("prettyPrint", "false")
3562 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
3563 urls += "?" + c.urlParams_.Encode()
3564 req, err := http.NewRequest("POST", urls, body)
3565 if err != nil {
3566 return nil, err
3567 }
3568 req.Header = reqHeaders
3569 googleapi.Expand(req.URL, map[string]string{
3570 "name": c.name,
3571 })
3572 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3573 }
3574
3575
3576
3577
3578
3579
3580 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3581 gensupport.SetOptions(c.urlParams_, opts...)
3582 res, err := c.doRequest("json")
3583 if res != nil && res.StatusCode == http.StatusNotModified {
3584 if res.Body != nil {
3585 res.Body.Close()
3586 }
3587 return nil, gensupport.WrapError(&googleapi.Error{
3588 Code: res.StatusCode,
3589 Header: res.Header,
3590 })
3591 }
3592 if err != nil {
3593 return nil, err
3594 }
3595 defer googleapi.CloseBody(res)
3596 if err := googleapi.CheckResponse(res); err != nil {
3597 return nil, gensupport.WrapError(err)
3598 }
3599 ret := &Empty{
3600 ServerResponse: googleapi.ServerResponse{
3601 Header: res.Header,
3602 HTTPStatusCode: res.StatusCode,
3603 },
3604 }
3605 target := &ret
3606 if err := gensupport.DecodeResponse(target, res); err != nil {
3607 return nil, err
3608 }
3609 return ret, nil
3610 }
3611
3612 type ProjectsLocationsOperationsDeleteCall struct {
3613 s *APIService
3614 name string
3615 urlParams_ gensupport.URLParams
3616 ctx_ context.Context
3617 header_ http.Header
3618 }
3619
3620
3621
3622
3623
3624
3625
3626 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
3627 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3628 c.name = name
3629 return c
3630 }
3631
3632
3633
3634
3635 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
3636 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3637 return c
3638 }
3639
3640
3641 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
3642 c.ctx_ = ctx
3643 return c
3644 }
3645
3646
3647
3648 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
3649 if c.header_ == nil {
3650 c.header_ = make(http.Header)
3651 }
3652 return c.header_
3653 }
3654
3655 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
3656 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3657 var body io.Reader = nil
3658 c.urlParams_.Set("alt", alt)
3659 c.urlParams_.Set("prettyPrint", "false")
3660 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3661 urls += "?" + c.urlParams_.Encode()
3662 req, err := http.NewRequest("DELETE", urls, body)
3663 if err != nil {
3664 return nil, err
3665 }
3666 req.Header = reqHeaders
3667 googleapi.Expand(req.URL, map[string]string{
3668 "name": c.name,
3669 })
3670 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3671 }
3672
3673
3674
3675
3676
3677
3678 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3679 gensupport.SetOptions(c.urlParams_, opts...)
3680 res, err := c.doRequest("json")
3681 if res != nil && res.StatusCode == http.StatusNotModified {
3682 if res.Body != nil {
3683 res.Body.Close()
3684 }
3685 return nil, gensupport.WrapError(&googleapi.Error{
3686 Code: res.StatusCode,
3687 Header: res.Header,
3688 })
3689 }
3690 if err != nil {
3691 return nil, err
3692 }
3693 defer googleapi.CloseBody(res)
3694 if err := googleapi.CheckResponse(res); err != nil {
3695 return nil, gensupport.WrapError(err)
3696 }
3697 ret := &Empty{
3698 ServerResponse: googleapi.ServerResponse{
3699 Header: res.Header,
3700 HTTPStatusCode: res.StatusCode,
3701 },
3702 }
3703 target := &ret
3704 if err := gensupport.DecodeResponse(target, res); err != nil {
3705 return nil, err
3706 }
3707 return ret, nil
3708 }
3709
3710 type ProjectsLocationsOperationsGetCall struct {
3711 s *APIService
3712 name string
3713 urlParams_ gensupport.URLParams
3714 ifNoneMatch_ string
3715 ctx_ context.Context
3716 header_ http.Header
3717 }
3718
3719
3720
3721
3722
3723
3724 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
3725 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3726 c.name = name
3727 return c
3728 }
3729
3730
3731
3732
3733 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
3734 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3735 return c
3736 }
3737
3738
3739
3740
3741 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
3742 c.ifNoneMatch_ = entityTag
3743 return c
3744 }
3745
3746
3747 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
3748 c.ctx_ = ctx
3749 return c
3750 }
3751
3752
3753
3754 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
3755 if c.header_ == nil {
3756 c.header_ = make(http.Header)
3757 }
3758 return c.header_
3759 }
3760
3761 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3763 if c.ifNoneMatch_ != "" {
3764 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3765 }
3766 var body io.Reader = nil
3767 c.urlParams_.Set("alt", alt)
3768 c.urlParams_.Set("prettyPrint", "false")
3769 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3770 urls += "?" + c.urlParams_.Encode()
3771 req, err := http.NewRequest("GET", urls, body)
3772 if err != nil {
3773 return nil, err
3774 }
3775 req.Header = reqHeaders
3776 googleapi.Expand(req.URL, map[string]string{
3777 "name": c.name,
3778 })
3779 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3780 }
3781
3782
3783
3784
3785
3786
3787 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3788 gensupport.SetOptions(c.urlParams_, opts...)
3789 res, err := c.doRequest("json")
3790 if res != nil && res.StatusCode == http.StatusNotModified {
3791 if res.Body != nil {
3792 res.Body.Close()
3793 }
3794 return nil, gensupport.WrapError(&googleapi.Error{
3795 Code: res.StatusCode,
3796 Header: res.Header,
3797 })
3798 }
3799 if err != nil {
3800 return nil, err
3801 }
3802 defer googleapi.CloseBody(res)
3803 if err := googleapi.CheckResponse(res); err != nil {
3804 return nil, gensupport.WrapError(err)
3805 }
3806 ret := &Operation{
3807 ServerResponse: googleapi.ServerResponse{
3808 Header: res.Header,
3809 HTTPStatusCode: res.StatusCode,
3810 },
3811 }
3812 target := &ret
3813 if err := gensupport.DecodeResponse(target, res); err != nil {
3814 return nil, err
3815 }
3816 return ret, nil
3817 }
3818
3819 type ProjectsLocationsOperationsListCall struct {
3820 s *APIService
3821 name string
3822 urlParams_ gensupport.URLParams
3823 ifNoneMatch_ string
3824 ctx_ context.Context
3825 header_ http.Header
3826 }
3827
3828
3829
3830
3831
3832 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
3833 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3834 c.name = name
3835 return c
3836 }
3837
3838
3839 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
3840 c.urlParams_.Set("filter", filter)
3841 return c
3842 }
3843
3844
3845
3846 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
3847 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3848 return c
3849 }
3850
3851
3852
3853 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
3854 c.urlParams_.Set("pageToken", pageToken)
3855 return c
3856 }
3857
3858
3859
3860
3861 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
3862 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3863 return c
3864 }
3865
3866
3867
3868
3869 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
3870 c.ifNoneMatch_ = entityTag
3871 return c
3872 }
3873
3874
3875 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
3876 c.ctx_ = ctx
3877 return c
3878 }
3879
3880
3881
3882 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
3883 if c.header_ == nil {
3884 c.header_ = make(http.Header)
3885 }
3886 return c.header_
3887 }
3888
3889 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
3890 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3891 if c.ifNoneMatch_ != "" {
3892 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3893 }
3894 var body io.Reader = nil
3895 c.urlParams_.Set("alt", alt)
3896 c.urlParams_.Set("prettyPrint", "false")
3897 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
3898 urls += "?" + c.urlParams_.Encode()
3899 req, err := http.NewRequest("GET", urls, body)
3900 if err != nil {
3901 return nil, err
3902 }
3903 req.Header = reqHeaders
3904 googleapi.Expand(req.URL, map[string]string{
3905 "name": c.name,
3906 })
3907 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3908 }
3909
3910
3911
3912
3913
3914
3915
3916 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
3917 gensupport.SetOptions(c.urlParams_, opts...)
3918 res, err := c.doRequest("json")
3919 if res != nil && res.StatusCode == http.StatusNotModified {
3920 if res.Body != nil {
3921 res.Body.Close()
3922 }
3923 return nil, gensupport.WrapError(&googleapi.Error{
3924 Code: res.StatusCode,
3925 Header: res.Header,
3926 })
3927 }
3928 if err != nil {
3929 return nil, err
3930 }
3931 defer googleapi.CloseBody(res)
3932 if err := googleapi.CheckResponse(res); err != nil {
3933 return nil, gensupport.WrapError(err)
3934 }
3935 ret := &ListOperationsResponse{
3936 ServerResponse: googleapi.ServerResponse{
3937 Header: res.Header,
3938 HTTPStatusCode: res.StatusCode,
3939 },
3940 }
3941 target := &ret
3942 if err := gensupport.DecodeResponse(target, res); err != nil {
3943 return nil, err
3944 }
3945 return ret, nil
3946 }
3947
3948
3949
3950
3951 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
3952 c.ctx_ = ctx
3953 defer c.PageToken(c.urlParams_.Get("pageToken"))
3954 for {
3955 x, err := c.Do()
3956 if err != nil {
3957 return err
3958 }
3959 if err := f(x); err != nil {
3960 return err
3961 }
3962 if x.NextPageToken == "" {
3963 return nil
3964 }
3965 c.PageToken(x.NextPageToken)
3966 }
3967 }
3968
3969 type ProjectsLocationsServicesAlterLocationCall struct {
3970 s *APIService
3971 service string
3972 altermetadataresourcelocationrequest *AlterMetadataResourceLocationRequest
3973 urlParams_ gensupport.URLParams
3974 ctx_ context.Context
3975 header_ http.Header
3976 }
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986 func (r *ProjectsLocationsServicesService) AlterLocation(service string, altermetadataresourcelocationrequest *AlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall {
3987 c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3988 c.service = service
3989 c.altermetadataresourcelocationrequest = altermetadataresourcelocationrequest
3990 return c
3991 }
3992
3993
3994
3995
3996 func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall {
3997 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3998 return c
3999 }
4000
4001
4002 func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall {
4003 c.ctx_ = ctx
4004 return c
4005 }
4006
4007
4008
4009 func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header {
4010 if c.header_ == nil {
4011 c.header_ = make(http.Header)
4012 }
4013 return c.header_
4014 }
4015
4016 func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) {
4017 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4018 var body io.Reader = nil
4019 body, err := googleapi.WithoutDataWrapper.JSONReader(c.altermetadataresourcelocationrequest)
4020 if err != nil {
4021 return nil, err
4022 }
4023 c.urlParams_.Set("alt", alt)
4024 c.urlParams_.Set("prettyPrint", "false")
4025 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:alterLocation")
4026 urls += "?" + c.urlParams_.Encode()
4027 req, err := http.NewRequest("POST", urls, body)
4028 if err != nil {
4029 return nil, err
4030 }
4031 req.Header = reqHeaders
4032 googleapi.Expand(req.URL, map[string]string{
4033 "service": c.service,
4034 })
4035 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4036 }
4037
4038
4039
4040
4041
4042
4043 func (c *ProjectsLocationsServicesAlterLocationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4044 gensupport.SetOptions(c.urlParams_, opts...)
4045 res, err := c.doRequest("json")
4046 if res != nil && res.StatusCode == http.StatusNotModified {
4047 if res.Body != nil {
4048 res.Body.Close()
4049 }
4050 return nil, gensupport.WrapError(&googleapi.Error{
4051 Code: res.StatusCode,
4052 Header: res.Header,
4053 })
4054 }
4055 if err != nil {
4056 return nil, err
4057 }
4058 defer googleapi.CloseBody(res)
4059 if err := googleapi.CheckResponse(res); err != nil {
4060 return nil, gensupport.WrapError(err)
4061 }
4062 ret := &Operation{
4063 ServerResponse: googleapi.ServerResponse{
4064 Header: res.Header,
4065 HTTPStatusCode: res.StatusCode,
4066 },
4067 }
4068 target := &ret
4069 if err := gensupport.DecodeResponse(target, res); err != nil {
4070 return nil, err
4071 }
4072 return ret, nil
4073 }
4074
4075 type ProjectsLocationsServicesAlterTablePropertiesCall struct {
4076 s *APIService
4077 service string
4078 altertablepropertiesrequest *AlterTablePropertiesRequest
4079 urlParams_ gensupport.URLParams
4080 ctx_ context.Context
4081 header_ http.Header
4082 }
4083
4084
4085
4086
4087
4088
4089 func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, altertablepropertiesrequest *AlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall {
4090 c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4091 c.service = service
4092 c.altertablepropertiesrequest = altertablepropertiesrequest
4093 return c
4094 }
4095
4096
4097
4098
4099 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall {
4100 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4101 return c
4102 }
4103
4104
4105 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall {
4106 c.ctx_ = ctx
4107 return c
4108 }
4109
4110
4111
4112 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header {
4113 if c.header_ == nil {
4114 c.header_ = make(http.Header)
4115 }
4116 return c.header_
4117 }
4118
4119 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) {
4120 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4121 var body io.Reader = nil
4122 body, err := googleapi.WithoutDataWrapper.JSONReader(c.altertablepropertiesrequest)
4123 if err != nil {
4124 return nil, err
4125 }
4126 c.urlParams_.Set("alt", alt)
4127 c.urlParams_.Set("prettyPrint", "false")
4128 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:alterTableProperties")
4129 urls += "?" + c.urlParams_.Encode()
4130 req, err := http.NewRequest("POST", urls, body)
4131 if err != nil {
4132 return nil, err
4133 }
4134 req.Header = reqHeaders
4135 googleapi.Expand(req.URL, map[string]string{
4136 "service": c.service,
4137 })
4138 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4139 }
4140
4141
4142
4143
4144
4145
4146 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4147 gensupport.SetOptions(c.urlParams_, opts...)
4148 res, err := c.doRequest("json")
4149 if res != nil && res.StatusCode == http.StatusNotModified {
4150 if res.Body != nil {
4151 res.Body.Close()
4152 }
4153 return nil, gensupport.WrapError(&googleapi.Error{
4154 Code: res.StatusCode,
4155 Header: res.Header,
4156 })
4157 }
4158 if err != nil {
4159 return nil, err
4160 }
4161 defer googleapi.CloseBody(res)
4162 if err := googleapi.CheckResponse(res); err != nil {
4163 return nil, gensupport.WrapError(err)
4164 }
4165 ret := &Operation{
4166 ServerResponse: googleapi.ServerResponse{
4167 Header: res.Header,
4168 HTTPStatusCode: res.StatusCode,
4169 },
4170 }
4171 target := &ret
4172 if err := gensupport.DecodeResponse(target, res); err != nil {
4173 return nil, err
4174 }
4175 return ret, nil
4176 }
4177
4178 type ProjectsLocationsServicesCreateCall struct {
4179 s *APIService
4180 parent string
4181 service *Service
4182 urlParams_ gensupport.URLParams
4183 ctx_ context.Context
4184 header_ http.Header
4185 }
4186
4187
4188
4189
4190
4191
4192 func (r *ProjectsLocationsServicesService) Create(parent string, service *Service) *ProjectsLocationsServicesCreateCall {
4193 c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4194 c.parent = parent
4195 c.service = service
4196 return c
4197 }
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208 func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall {
4209 c.urlParams_.Set("requestId", requestId)
4210 return c
4211 }
4212
4213
4214
4215
4216
4217
4218 func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall {
4219 c.urlParams_.Set("serviceId", serviceId)
4220 return c
4221 }
4222
4223
4224
4225
4226 func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall {
4227 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4228 return c
4229 }
4230
4231
4232 func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall {
4233 c.ctx_ = ctx
4234 return c
4235 }
4236
4237
4238
4239 func (c *ProjectsLocationsServicesCreateCall) Header() http.Header {
4240 if c.header_ == nil {
4241 c.header_ = make(http.Header)
4242 }
4243 return c.header_
4244 }
4245
4246 func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) {
4247 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4248 var body io.Reader = nil
4249 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
4250 if err != nil {
4251 return nil, err
4252 }
4253 c.urlParams_.Set("alt", alt)
4254 c.urlParams_.Set("prettyPrint", "false")
4255 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services")
4256 urls += "?" + c.urlParams_.Encode()
4257 req, err := http.NewRequest("POST", urls, body)
4258 if err != nil {
4259 return nil, err
4260 }
4261 req.Header = reqHeaders
4262 googleapi.Expand(req.URL, map[string]string{
4263 "parent": c.parent,
4264 })
4265 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4266 }
4267
4268
4269
4270
4271
4272
4273 func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4274 gensupport.SetOptions(c.urlParams_, opts...)
4275 res, err := c.doRequest("json")
4276 if res != nil && res.StatusCode == http.StatusNotModified {
4277 if res.Body != nil {
4278 res.Body.Close()
4279 }
4280 return nil, gensupport.WrapError(&googleapi.Error{
4281 Code: res.StatusCode,
4282 Header: res.Header,
4283 })
4284 }
4285 if err != nil {
4286 return nil, err
4287 }
4288 defer googleapi.CloseBody(res)
4289 if err := googleapi.CheckResponse(res); err != nil {
4290 return nil, gensupport.WrapError(err)
4291 }
4292 ret := &Operation{
4293 ServerResponse: googleapi.ServerResponse{
4294 Header: res.Header,
4295 HTTPStatusCode: res.StatusCode,
4296 },
4297 }
4298 target := &ret
4299 if err := gensupport.DecodeResponse(target, res); err != nil {
4300 return nil, err
4301 }
4302 return ret, nil
4303 }
4304
4305 type ProjectsLocationsServicesDeleteCall struct {
4306 s *APIService
4307 name string
4308 urlParams_ gensupport.URLParams
4309 ctx_ context.Context
4310 header_ http.Header
4311 }
4312
4313
4314
4315
4316
4317
4318
4319 func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall {
4320 c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4321 c.name = name
4322 return c
4323 }
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334 func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall {
4335 c.urlParams_.Set("requestId", requestId)
4336 return c
4337 }
4338
4339
4340
4341
4342 func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall {
4343 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4344 return c
4345 }
4346
4347
4348 func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall {
4349 c.ctx_ = ctx
4350 return c
4351 }
4352
4353
4354
4355 func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header {
4356 if c.header_ == nil {
4357 c.header_ = make(http.Header)
4358 }
4359 return c.header_
4360 }
4361
4362 func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
4363 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4364 var body io.Reader = nil
4365 c.urlParams_.Set("alt", alt)
4366 c.urlParams_.Set("prettyPrint", "false")
4367 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4368 urls += "?" + c.urlParams_.Encode()
4369 req, err := http.NewRequest("DELETE", urls, body)
4370 if err != nil {
4371 return nil, err
4372 }
4373 req.Header = reqHeaders
4374 googleapi.Expand(req.URL, map[string]string{
4375 "name": c.name,
4376 })
4377 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4378 }
4379
4380
4381
4382
4383
4384
4385 func (c *ProjectsLocationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4386 gensupport.SetOptions(c.urlParams_, opts...)
4387 res, err := c.doRequest("json")
4388 if res != nil && res.StatusCode == http.StatusNotModified {
4389 if res.Body != nil {
4390 res.Body.Close()
4391 }
4392 return nil, gensupport.WrapError(&googleapi.Error{
4393 Code: res.StatusCode,
4394 Header: res.Header,
4395 })
4396 }
4397 if err != nil {
4398 return nil, err
4399 }
4400 defer googleapi.CloseBody(res)
4401 if err := googleapi.CheckResponse(res); err != nil {
4402 return nil, gensupport.WrapError(err)
4403 }
4404 ret := &Operation{
4405 ServerResponse: googleapi.ServerResponse{
4406 Header: res.Header,
4407 HTTPStatusCode: res.StatusCode,
4408 },
4409 }
4410 target := &ret
4411 if err := gensupport.DecodeResponse(target, res); err != nil {
4412 return nil, err
4413 }
4414 return ret, nil
4415 }
4416
4417 type ProjectsLocationsServicesExportMetadataCall struct {
4418 s *APIService
4419 service string
4420 exportmetadatarequest *ExportMetadataRequest
4421 urlParams_ gensupport.URLParams
4422 ctx_ context.Context
4423 header_ http.Header
4424 }
4425
4426
4427
4428
4429
4430
4431 func (r *ProjectsLocationsServicesService) ExportMetadata(service string, exportmetadatarequest *ExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall {
4432 c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4433 c.service = service
4434 c.exportmetadatarequest = exportmetadatarequest
4435 return c
4436 }
4437
4438
4439
4440
4441 func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall {
4442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4443 return c
4444 }
4445
4446
4447 func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall {
4448 c.ctx_ = ctx
4449 return c
4450 }
4451
4452
4453
4454 func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header {
4455 if c.header_ == nil {
4456 c.header_ = make(http.Header)
4457 }
4458 return c.header_
4459 }
4460
4461 func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) {
4462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4463 var body io.Reader = nil
4464 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportmetadatarequest)
4465 if err != nil {
4466 return nil, err
4467 }
4468 c.urlParams_.Set("alt", alt)
4469 c.urlParams_.Set("prettyPrint", "false")
4470 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:exportMetadata")
4471 urls += "?" + c.urlParams_.Encode()
4472 req, err := http.NewRequest("POST", urls, body)
4473 if err != nil {
4474 return nil, err
4475 }
4476 req.Header = reqHeaders
4477 googleapi.Expand(req.URL, map[string]string{
4478 "service": c.service,
4479 })
4480 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4481 }
4482
4483
4484
4485
4486
4487
4488 func (c *ProjectsLocationsServicesExportMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4489 gensupport.SetOptions(c.urlParams_, opts...)
4490 res, err := c.doRequest("json")
4491 if res != nil && res.StatusCode == http.StatusNotModified {
4492 if res.Body != nil {
4493 res.Body.Close()
4494 }
4495 return nil, gensupport.WrapError(&googleapi.Error{
4496 Code: res.StatusCode,
4497 Header: res.Header,
4498 })
4499 }
4500 if err != nil {
4501 return nil, err
4502 }
4503 defer googleapi.CloseBody(res)
4504 if err := googleapi.CheckResponse(res); err != nil {
4505 return nil, gensupport.WrapError(err)
4506 }
4507 ret := &Operation{
4508 ServerResponse: googleapi.ServerResponse{
4509 Header: res.Header,
4510 HTTPStatusCode: res.StatusCode,
4511 },
4512 }
4513 target := &ret
4514 if err := gensupport.DecodeResponse(target, res); err != nil {
4515 return nil, err
4516 }
4517 return ret, nil
4518 }
4519
4520 type ProjectsLocationsServicesGetCall struct {
4521 s *APIService
4522 name string
4523 urlParams_ gensupport.URLParams
4524 ifNoneMatch_ string
4525 ctx_ context.Context
4526 header_ http.Header
4527 }
4528
4529
4530
4531
4532
4533
4534
4535 func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall {
4536 c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4537 c.name = name
4538 return c
4539 }
4540
4541
4542
4543
4544 func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall {
4545 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4546 return c
4547 }
4548
4549
4550
4551
4552 func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall {
4553 c.ifNoneMatch_ = entityTag
4554 return c
4555 }
4556
4557
4558 func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall {
4559 c.ctx_ = ctx
4560 return c
4561 }
4562
4563
4564
4565 func (c *ProjectsLocationsServicesGetCall) Header() http.Header {
4566 if c.header_ == nil {
4567 c.header_ = make(http.Header)
4568 }
4569 return c.header_
4570 }
4571
4572 func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) {
4573 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4574 if c.ifNoneMatch_ != "" {
4575 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4576 }
4577 var body io.Reader = nil
4578 c.urlParams_.Set("alt", alt)
4579 c.urlParams_.Set("prettyPrint", "false")
4580 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4581 urls += "?" + c.urlParams_.Encode()
4582 req, err := http.NewRequest("GET", urls, body)
4583 if err != nil {
4584 return nil, err
4585 }
4586 req.Header = reqHeaders
4587 googleapi.Expand(req.URL, map[string]string{
4588 "name": c.name,
4589 })
4590 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4591 }
4592
4593
4594
4595
4596
4597
4598 func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
4599 gensupport.SetOptions(c.urlParams_, opts...)
4600 res, err := c.doRequest("json")
4601 if res != nil && res.StatusCode == http.StatusNotModified {
4602 if res.Body != nil {
4603 res.Body.Close()
4604 }
4605 return nil, gensupport.WrapError(&googleapi.Error{
4606 Code: res.StatusCode,
4607 Header: res.Header,
4608 })
4609 }
4610 if err != nil {
4611 return nil, err
4612 }
4613 defer googleapi.CloseBody(res)
4614 if err := googleapi.CheckResponse(res); err != nil {
4615 return nil, gensupport.WrapError(err)
4616 }
4617 ret := &Service{
4618 ServerResponse: googleapi.ServerResponse{
4619 Header: res.Header,
4620 HTTPStatusCode: res.StatusCode,
4621 },
4622 }
4623 target := &ret
4624 if err := gensupport.DecodeResponse(target, res); err != nil {
4625 return nil, err
4626 }
4627 return ret, nil
4628 }
4629
4630 type ProjectsLocationsServicesGetIamPolicyCall struct {
4631 s *APIService
4632 resource string
4633 urlParams_ gensupport.URLParams
4634 ifNoneMatch_ string
4635 ctx_ context.Context
4636 header_ http.Header
4637 }
4638
4639
4640
4641
4642
4643
4644
4645 func (r *ProjectsLocationsServicesService) GetIamPolicy(resource string) *ProjectsLocationsServicesGetIamPolicyCall {
4646 c := &ProjectsLocationsServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4647 c.resource = resource
4648 return c
4649 }
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663 func (c *ProjectsLocationsServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesGetIamPolicyCall {
4664 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
4665 return c
4666 }
4667
4668
4669
4670
4671 func (c *ProjectsLocationsServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetIamPolicyCall {
4672 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4673 return c
4674 }
4675
4676
4677
4678
4679 func (c *ProjectsLocationsServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetIamPolicyCall {
4680 c.ifNoneMatch_ = entityTag
4681 return c
4682 }
4683
4684
4685 func (c *ProjectsLocationsServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesGetIamPolicyCall {
4686 c.ctx_ = ctx
4687 return c
4688 }
4689
4690
4691
4692 func (c *ProjectsLocationsServicesGetIamPolicyCall) Header() http.Header {
4693 if c.header_ == nil {
4694 c.header_ = make(http.Header)
4695 }
4696 return c.header_
4697 }
4698
4699 func (c *ProjectsLocationsServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4700 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4701 if c.ifNoneMatch_ != "" {
4702 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4703 }
4704 var body io.Reader = nil
4705 c.urlParams_.Set("alt", alt)
4706 c.urlParams_.Set("prettyPrint", "false")
4707 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
4708 urls += "?" + c.urlParams_.Encode()
4709 req, err := http.NewRequest("GET", urls, body)
4710 if err != nil {
4711 return nil, err
4712 }
4713 req.Header = reqHeaders
4714 googleapi.Expand(req.URL, map[string]string{
4715 "resource": c.resource,
4716 })
4717 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4718 }
4719
4720
4721
4722
4723
4724
4725 func (c *ProjectsLocationsServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4726 gensupport.SetOptions(c.urlParams_, opts...)
4727 res, err := c.doRequest("json")
4728 if res != nil && res.StatusCode == http.StatusNotModified {
4729 if res.Body != nil {
4730 res.Body.Close()
4731 }
4732 return nil, gensupport.WrapError(&googleapi.Error{
4733 Code: res.StatusCode,
4734 Header: res.Header,
4735 })
4736 }
4737 if err != nil {
4738 return nil, err
4739 }
4740 defer googleapi.CloseBody(res)
4741 if err := googleapi.CheckResponse(res); err != nil {
4742 return nil, gensupport.WrapError(err)
4743 }
4744 ret := &Policy{
4745 ServerResponse: googleapi.ServerResponse{
4746 Header: res.Header,
4747 HTTPStatusCode: res.StatusCode,
4748 },
4749 }
4750 target := &ret
4751 if err := gensupport.DecodeResponse(target, res); err != nil {
4752 return nil, err
4753 }
4754 return ret, nil
4755 }
4756
4757 type ProjectsLocationsServicesListCall struct {
4758 s *APIService
4759 parent string
4760 urlParams_ gensupport.URLParams
4761 ifNoneMatch_ string
4762 ctx_ context.Context
4763 header_ http.Header
4764 }
4765
4766
4767
4768
4769
4770
4771 func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall {
4772 c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4773 c.parent = parent
4774 return c
4775 }
4776
4777
4778
4779 func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall {
4780 c.urlParams_.Set("filter", filter)
4781 return c
4782 }
4783
4784
4785
4786
4787
4788 func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall {
4789 c.urlParams_.Set("orderBy", orderBy)
4790 return c
4791 }
4792
4793
4794
4795
4796
4797 func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall {
4798 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4799 return c
4800 }
4801
4802
4803
4804
4805
4806
4807
4808 func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall {
4809 c.urlParams_.Set("pageToken", pageToken)
4810 return c
4811 }
4812
4813
4814
4815
4816 func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall {
4817 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4818 return c
4819 }
4820
4821
4822
4823
4824 func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall {
4825 c.ifNoneMatch_ = entityTag
4826 return c
4827 }
4828
4829
4830 func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall {
4831 c.ctx_ = ctx
4832 return c
4833 }
4834
4835
4836
4837 func (c *ProjectsLocationsServicesListCall) Header() http.Header {
4838 if c.header_ == nil {
4839 c.header_ = make(http.Header)
4840 }
4841 return c.header_
4842 }
4843
4844 func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) {
4845 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4846 if c.ifNoneMatch_ != "" {
4847 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4848 }
4849 var body io.Reader = nil
4850 c.urlParams_.Set("alt", alt)
4851 c.urlParams_.Set("prettyPrint", "false")
4852 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services")
4853 urls += "?" + c.urlParams_.Encode()
4854 req, err := http.NewRequest("GET", urls, body)
4855 if err != nil {
4856 return nil, err
4857 }
4858 req.Header = reqHeaders
4859 googleapi.Expand(req.URL, map[string]string{
4860 "parent": c.parent,
4861 })
4862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4863 }
4864
4865
4866
4867
4868
4869
4870
4871 func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
4872 gensupport.SetOptions(c.urlParams_, opts...)
4873 res, err := c.doRequest("json")
4874 if res != nil && res.StatusCode == http.StatusNotModified {
4875 if res.Body != nil {
4876 res.Body.Close()
4877 }
4878 return nil, gensupport.WrapError(&googleapi.Error{
4879 Code: res.StatusCode,
4880 Header: res.Header,
4881 })
4882 }
4883 if err != nil {
4884 return nil, err
4885 }
4886 defer googleapi.CloseBody(res)
4887 if err := googleapi.CheckResponse(res); err != nil {
4888 return nil, gensupport.WrapError(err)
4889 }
4890 ret := &ListServicesResponse{
4891 ServerResponse: googleapi.ServerResponse{
4892 Header: res.Header,
4893 HTTPStatusCode: res.StatusCode,
4894 },
4895 }
4896 target := &ret
4897 if err := gensupport.DecodeResponse(target, res); err != nil {
4898 return nil, err
4899 }
4900 return ret, nil
4901 }
4902
4903
4904
4905
4906 func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
4907 c.ctx_ = ctx
4908 defer c.PageToken(c.urlParams_.Get("pageToken"))
4909 for {
4910 x, err := c.Do()
4911 if err != nil {
4912 return err
4913 }
4914 if err := f(x); err != nil {
4915 return err
4916 }
4917 if x.NextPageToken == "" {
4918 return nil
4919 }
4920 c.PageToken(x.NextPageToken)
4921 }
4922 }
4923
4924 type ProjectsLocationsServicesMoveTableToDatabaseCall struct {
4925 s *APIService
4926 service string
4927 movetabletodatabaserequest *MoveTableToDatabaseRequest
4928 urlParams_ gensupport.URLParams
4929 ctx_ context.Context
4930 header_ http.Header
4931 }
4932
4933
4934
4935
4936
4937
4938 func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, movetabletodatabaserequest *MoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall {
4939 c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4940 c.service = service
4941 c.movetabletodatabaserequest = movetabletodatabaserequest
4942 return c
4943 }
4944
4945
4946
4947
4948 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall {
4949 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4950 return c
4951 }
4952
4953
4954 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall {
4955 c.ctx_ = ctx
4956 return c
4957 }
4958
4959
4960
4961 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header {
4962 if c.header_ == nil {
4963 c.header_ = make(http.Header)
4964 }
4965 return c.header_
4966 }
4967
4968 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) {
4969 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4970 var body io.Reader = nil
4971 body, err := googleapi.WithoutDataWrapper.JSONReader(c.movetabletodatabaserequest)
4972 if err != nil {
4973 return nil, err
4974 }
4975 c.urlParams_.Set("alt", alt)
4976 c.urlParams_.Set("prettyPrint", "false")
4977 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:moveTableToDatabase")
4978 urls += "?" + c.urlParams_.Encode()
4979 req, err := http.NewRequest("POST", urls, body)
4980 if err != nil {
4981 return nil, err
4982 }
4983 req.Header = reqHeaders
4984 googleapi.Expand(req.URL, map[string]string{
4985 "service": c.service,
4986 })
4987 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4988 }
4989
4990
4991
4992
4993
4994
4995 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4996 gensupport.SetOptions(c.urlParams_, opts...)
4997 res, err := c.doRequest("json")
4998 if res != nil && res.StatusCode == http.StatusNotModified {
4999 if res.Body != nil {
5000 res.Body.Close()
5001 }
5002 return nil, gensupport.WrapError(&googleapi.Error{
5003 Code: res.StatusCode,
5004 Header: res.Header,
5005 })
5006 }
5007 if err != nil {
5008 return nil, err
5009 }
5010 defer googleapi.CloseBody(res)
5011 if err := googleapi.CheckResponse(res); err != nil {
5012 return nil, gensupport.WrapError(err)
5013 }
5014 ret := &Operation{
5015 ServerResponse: googleapi.ServerResponse{
5016 Header: res.Header,
5017 HTTPStatusCode: res.StatusCode,
5018 },
5019 }
5020 target := &ret
5021 if err := gensupport.DecodeResponse(target, res); err != nil {
5022 return nil, err
5023 }
5024 return ret, nil
5025 }
5026
5027 type ProjectsLocationsServicesPatchCall struct {
5028 s *APIService
5029 name string
5030 service *Service
5031 urlParams_ gensupport.URLParams
5032 ctx_ context.Context
5033 header_ http.Header
5034 }
5035
5036
5037
5038
5039
5040
5041
5042 func (r *ProjectsLocationsServicesService) Patch(name string, service *Service) *ProjectsLocationsServicesPatchCall {
5043 c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5044 c.name = name
5045 c.service = service
5046 return c
5047 }
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058 func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall {
5059 c.urlParams_.Set("requestId", requestId)
5060 return c
5061 }
5062
5063
5064
5065
5066
5067
5068 func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall {
5069 c.urlParams_.Set("updateMask", updateMask)
5070 return c
5071 }
5072
5073
5074
5075
5076 func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall {
5077 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5078 return c
5079 }
5080
5081
5082 func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall {
5083 c.ctx_ = ctx
5084 return c
5085 }
5086
5087
5088
5089 func (c *ProjectsLocationsServicesPatchCall) Header() http.Header {
5090 if c.header_ == nil {
5091 c.header_ = make(http.Header)
5092 }
5093 return c.header_
5094 }
5095
5096 func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
5097 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5098 var body io.Reader = nil
5099 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
5100 if err != nil {
5101 return nil, err
5102 }
5103 c.urlParams_.Set("alt", alt)
5104 c.urlParams_.Set("prettyPrint", "false")
5105 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5106 urls += "?" + c.urlParams_.Encode()
5107 req, err := http.NewRequest("PATCH", urls, body)
5108 if err != nil {
5109 return nil, err
5110 }
5111 req.Header = reqHeaders
5112 googleapi.Expand(req.URL, map[string]string{
5113 "name": c.name,
5114 })
5115 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5116 }
5117
5118
5119
5120
5121
5122
5123 func (c *ProjectsLocationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5124 gensupport.SetOptions(c.urlParams_, opts...)
5125 res, err := c.doRequest("json")
5126 if res != nil && res.StatusCode == http.StatusNotModified {
5127 if res.Body != nil {
5128 res.Body.Close()
5129 }
5130 return nil, gensupport.WrapError(&googleapi.Error{
5131 Code: res.StatusCode,
5132 Header: res.Header,
5133 })
5134 }
5135 if err != nil {
5136 return nil, err
5137 }
5138 defer googleapi.CloseBody(res)
5139 if err := googleapi.CheckResponse(res); err != nil {
5140 return nil, gensupport.WrapError(err)
5141 }
5142 ret := &Operation{
5143 ServerResponse: googleapi.ServerResponse{
5144 Header: res.Header,
5145 HTTPStatusCode: res.StatusCode,
5146 },
5147 }
5148 target := &ret
5149 if err := gensupport.DecodeResponse(target, res); err != nil {
5150 return nil, err
5151 }
5152 return ret, nil
5153 }
5154
5155 type ProjectsLocationsServicesQueryMetadataCall struct {
5156 s *APIService
5157 service string
5158 querymetadatarequest *QueryMetadataRequest
5159 urlParams_ gensupport.URLParams
5160 ctx_ context.Context
5161 header_ http.Header
5162 }
5163
5164
5165
5166
5167
5168
5169 func (r *ProjectsLocationsServicesService) QueryMetadata(service string, querymetadatarequest *QueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall {
5170 c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5171 c.service = service
5172 c.querymetadatarequest = querymetadatarequest
5173 return c
5174 }
5175
5176
5177
5178
5179 func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall {
5180 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5181 return c
5182 }
5183
5184
5185 func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall {
5186 c.ctx_ = ctx
5187 return c
5188 }
5189
5190
5191
5192 func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header {
5193 if c.header_ == nil {
5194 c.header_ = make(http.Header)
5195 }
5196 return c.header_
5197 }
5198
5199 func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) {
5200 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5201 var body io.Reader = nil
5202 body, err := googleapi.WithoutDataWrapper.JSONReader(c.querymetadatarequest)
5203 if err != nil {
5204 return nil, err
5205 }
5206 c.urlParams_.Set("alt", alt)
5207 c.urlParams_.Set("prettyPrint", "false")
5208 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:queryMetadata")
5209 urls += "?" + c.urlParams_.Encode()
5210 req, err := http.NewRequest("POST", urls, body)
5211 if err != nil {
5212 return nil, err
5213 }
5214 req.Header = reqHeaders
5215 googleapi.Expand(req.URL, map[string]string{
5216 "service": c.service,
5217 })
5218 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5219 }
5220
5221
5222
5223
5224
5225
5226 func (c *ProjectsLocationsServicesQueryMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5227 gensupport.SetOptions(c.urlParams_, opts...)
5228 res, err := c.doRequest("json")
5229 if res != nil && res.StatusCode == http.StatusNotModified {
5230 if res.Body != nil {
5231 res.Body.Close()
5232 }
5233 return nil, gensupport.WrapError(&googleapi.Error{
5234 Code: res.StatusCode,
5235 Header: res.Header,
5236 })
5237 }
5238 if err != nil {
5239 return nil, err
5240 }
5241 defer googleapi.CloseBody(res)
5242 if err := googleapi.CheckResponse(res); err != nil {
5243 return nil, gensupport.WrapError(err)
5244 }
5245 ret := &Operation{
5246 ServerResponse: googleapi.ServerResponse{
5247 Header: res.Header,
5248 HTTPStatusCode: res.StatusCode,
5249 },
5250 }
5251 target := &ret
5252 if err := gensupport.DecodeResponse(target, res); err != nil {
5253 return nil, err
5254 }
5255 return ret, nil
5256 }
5257
5258 type ProjectsLocationsServicesRestoreCall struct {
5259 s *APIService
5260 service string
5261 restoreservicerequest *RestoreServiceRequest
5262 urlParams_ gensupport.URLParams
5263 ctx_ context.Context
5264 header_ http.Header
5265 }
5266
5267
5268
5269
5270
5271
5272 func (r *ProjectsLocationsServicesService) Restore(service string, restoreservicerequest *RestoreServiceRequest) *ProjectsLocationsServicesRestoreCall {
5273 c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5274 c.service = service
5275 c.restoreservicerequest = restoreservicerequest
5276 return c
5277 }
5278
5279
5280
5281
5282 func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall {
5283 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5284 return c
5285 }
5286
5287
5288 func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall {
5289 c.ctx_ = ctx
5290 return c
5291 }
5292
5293
5294
5295 func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header {
5296 if c.header_ == nil {
5297 c.header_ = make(http.Header)
5298 }
5299 return c.header_
5300 }
5301
5302 func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) {
5303 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5304 var body io.Reader = nil
5305 body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoreservicerequest)
5306 if err != nil {
5307 return nil, err
5308 }
5309 c.urlParams_.Set("alt", alt)
5310 c.urlParams_.Set("prettyPrint", "false")
5311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:restore")
5312 urls += "?" + c.urlParams_.Encode()
5313 req, err := http.NewRequest("POST", urls, body)
5314 if err != nil {
5315 return nil, err
5316 }
5317 req.Header = reqHeaders
5318 googleapi.Expand(req.URL, map[string]string{
5319 "service": c.service,
5320 })
5321 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5322 }
5323
5324
5325
5326
5327
5328
5329 func (c *ProjectsLocationsServicesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5330 gensupport.SetOptions(c.urlParams_, opts...)
5331 res, err := c.doRequest("json")
5332 if res != nil && res.StatusCode == http.StatusNotModified {
5333 if res.Body != nil {
5334 res.Body.Close()
5335 }
5336 return nil, gensupport.WrapError(&googleapi.Error{
5337 Code: res.StatusCode,
5338 Header: res.Header,
5339 })
5340 }
5341 if err != nil {
5342 return nil, err
5343 }
5344 defer googleapi.CloseBody(res)
5345 if err := googleapi.CheckResponse(res); err != nil {
5346 return nil, gensupport.WrapError(err)
5347 }
5348 ret := &Operation{
5349 ServerResponse: googleapi.ServerResponse{
5350 Header: res.Header,
5351 HTTPStatusCode: res.StatusCode,
5352 },
5353 }
5354 target := &ret
5355 if err := gensupport.DecodeResponse(target, res); err != nil {
5356 return nil, err
5357 }
5358 return ret, nil
5359 }
5360
5361 type ProjectsLocationsServicesSetIamPolicyCall struct {
5362 s *APIService
5363 resource string
5364 setiampolicyrequest *SetIamPolicyRequest
5365 urlParams_ gensupport.URLParams
5366 ctx_ context.Context
5367 header_ http.Header
5368 }
5369
5370
5371
5372
5373
5374
5375
5376
5377 func (r *ProjectsLocationsServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesSetIamPolicyCall {
5378 c := &ProjectsLocationsServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5379 c.resource = resource
5380 c.setiampolicyrequest = setiampolicyrequest
5381 return c
5382 }
5383
5384
5385
5386
5387 func (c *ProjectsLocationsServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesSetIamPolicyCall {
5388 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5389 return c
5390 }
5391
5392
5393 func (c *ProjectsLocationsServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesSetIamPolicyCall {
5394 c.ctx_ = ctx
5395 return c
5396 }
5397
5398
5399
5400 func (c *ProjectsLocationsServicesSetIamPolicyCall) Header() http.Header {
5401 if c.header_ == nil {
5402 c.header_ = make(http.Header)
5403 }
5404 return c.header_
5405 }
5406
5407 func (c *ProjectsLocationsServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5408 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5409 var body io.Reader = nil
5410 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
5411 if err != nil {
5412 return nil, err
5413 }
5414 c.urlParams_.Set("alt", alt)
5415 c.urlParams_.Set("prettyPrint", "false")
5416 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
5417 urls += "?" + c.urlParams_.Encode()
5418 req, err := http.NewRequest("POST", urls, body)
5419 if err != nil {
5420 return nil, err
5421 }
5422 req.Header = reqHeaders
5423 googleapi.Expand(req.URL, map[string]string{
5424 "resource": c.resource,
5425 })
5426 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5427 }
5428
5429
5430
5431
5432
5433
5434 func (c *ProjectsLocationsServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5435 gensupport.SetOptions(c.urlParams_, opts...)
5436 res, err := c.doRequest("json")
5437 if res != nil && res.StatusCode == http.StatusNotModified {
5438 if res.Body != nil {
5439 res.Body.Close()
5440 }
5441 return nil, gensupport.WrapError(&googleapi.Error{
5442 Code: res.StatusCode,
5443 Header: res.Header,
5444 })
5445 }
5446 if err != nil {
5447 return nil, err
5448 }
5449 defer googleapi.CloseBody(res)
5450 if err := googleapi.CheckResponse(res); err != nil {
5451 return nil, gensupport.WrapError(err)
5452 }
5453 ret := &Policy{
5454 ServerResponse: googleapi.ServerResponse{
5455 Header: res.Header,
5456 HTTPStatusCode: res.StatusCode,
5457 },
5458 }
5459 target := &ret
5460 if err := gensupport.DecodeResponse(target, res); err != nil {
5461 return nil, err
5462 }
5463 return ret, nil
5464 }
5465
5466 type ProjectsLocationsServicesTestIamPermissionsCall struct {
5467 s *APIService
5468 resource string
5469 testiampermissionsrequest *TestIamPermissionsRequest
5470 urlParams_ gensupport.URLParams
5471 ctx_ context.Context
5472 header_ http.Header
5473 }
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485 func (r *ProjectsLocationsServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesTestIamPermissionsCall {
5486 c := &ProjectsLocationsServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5487 c.resource = resource
5488 c.testiampermissionsrequest = testiampermissionsrequest
5489 return c
5490 }
5491
5492
5493
5494
5495 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesTestIamPermissionsCall {
5496 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5497 return c
5498 }
5499
5500
5501 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesTestIamPermissionsCall {
5502 c.ctx_ = ctx
5503 return c
5504 }
5505
5506
5507
5508 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Header() http.Header {
5509 if c.header_ == nil {
5510 c.header_ = make(http.Header)
5511 }
5512 return c.header_
5513 }
5514
5515 func (c *ProjectsLocationsServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5516 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5517 var body io.Reader = nil
5518 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
5519 if err != nil {
5520 return nil, err
5521 }
5522 c.urlParams_.Set("alt", alt)
5523 c.urlParams_.Set("prettyPrint", "false")
5524 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
5525 urls += "?" + c.urlParams_.Encode()
5526 req, err := http.NewRequest("POST", urls, body)
5527 if err != nil {
5528 return nil, err
5529 }
5530 req.Header = reqHeaders
5531 googleapi.Expand(req.URL, map[string]string{
5532 "resource": c.resource,
5533 })
5534 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5535 }
5536
5537
5538
5539
5540
5541
5542
5543 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5544 gensupport.SetOptions(c.urlParams_, opts...)
5545 res, err := c.doRequest("json")
5546 if res != nil && res.StatusCode == http.StatusNotModified {
5547 if res.Body != nil {
5548 res.Body.Close()
5549 }
5550 return nil, gensupport.WrapError(&googleapi.Error{
5551 Code: res.StatusCode,
5552 Header: res.Header,
5553 })
5554 }
5555 if err != nil {
5556 return nil, err
5557 }
5558 defer googleapi.CloseBody(res)
5559 if err := googleapi.CheckResponse(res); err != nil {
5560 return nil, gensupport.WrapError(err)
5561 }
5562 ret := &TestIamPermissionsResponse{
5563 ServerResponse: googleapi.ServerResponse{
5564 Header: res.Header,
5565 HTTPStatusCode: res.StatusCode,
5566 },
5567 }
5568 target := &ret
5569 if err := gensupport.DecodeResponse(target, res); err != nil {
5570 return nil, err
5571 }
5572 return ret, nil
5573 }
5574
5575 type ProjectsLocationsServicesBackupsCreateCall struct {
5576 s *APIService
5577 parent string
5578 backup *Backup
5579 urlParams_ gensupport.URLParams
5580 ctx_ context.Context
5581 header_ http.Header
5582 }
5583
5584
5585
5586
5587
5588
5589
5590 func (r *ProjectsLocationsServicesBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsServicesBackupsCreateCall {
5591 c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5592 c.parent = parent
5593 c.backup = backup
5594 return c
5595 }
5596
5597
5598
5599
5600
5601 func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall {
5602 c.urlParams_.Set("backupId", backupId)
5603 return c
5604 }
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615 func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall {
5616 c.urlParams_.Set("requestId", requestId)
5617 return c
5618 }
5619
5620
5621
5622
5623 func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall {
5624 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5625 return c
5626 }
5627
5628
5629 func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall {
5630 c.ctx_ = ctx
5631 return c
5632 }
5633
5634
5635
5636 func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header {
5637 if c.header_ == nil {
5638 c.header_ = make(http.Header)
5639 }
5640 return c.header_
5641 }
5642
5643 func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
5644 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5645 var body io.Reader = nil
5646 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
5647 if err != nil {
5648 return nil, err
5649 }
5650 c.urlParams_.Set("alt", alt)
5651 c.urlParams_.Set("prettyPrint", "false")
5652 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
5653 urls += "?" + c.urlParams_.Encode()
5654 req, err := http.NewRequest("POST", urls, body)
5655 if err != nil {
5656 return nil, err
5657 }
5658 req.Header = reqHeaders
5659 googleapi.Expand(req.URL, map[string]string{
5660 "parent": c.parent,
5661 })
5662 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5663 }
5664
5665
5666
5667
5668
5669
5670 func (c *ProjectsLocationsServicesBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5671 gensupport.SetOptions(c.urlParams_, opts...)
5672 res, err := c.doRequest("json")
5673 if res != nil && res.StatusCode == http.StatusNotModified {
5674 if res.Body != nil {
5675 res.Body.Close()
5676 }
5677 return nil, gensupport.WrapError(&googleapi.Error{
5678 Code: res.StatusCode,
5679 Header: res.Header,
5680 })
5681 }
5682 if err != nil {
5683 return nil, err
5684 }
5685 defer googleapi.CloseBody(res)
5686 if err := googleapi.CheckResponse(res); err != nil {
5687 return nil, gensupport.WrapError(err)
5688 }
5689 ret := &Operation{
5690 ServerResponse: googleapi.ServerResponse{
5691 Header: res.Header,
5692 HTTPStatusCode: res.StatusCode,
5693 },
5694 }
5695 target := &ret
5696 if err := gensupport.DecodeResponse(target, res); err != nil {
5697 return nil, err
5698 }
5699 return ret, nil
5700 }
5701
5702 type ProjectsLocationsServicesBackupsDeleteCall struct {
5703 s *APIService
5704 name string
5705 urlParams_ gensupport.URLParams
5706 ctx_ context.Context
5707 header_ http.Header
5708 }
5709
5710
5711
5712
5713
5714
5715 func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall {
5716 c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5717 c.name = name
5718 return c
5719 }
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730 func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall {
5731 c.urlParams_.Set("requestId", requestId)
5732 return c
5733 }
5734
5735
5736
5737
5738 func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall {
5739 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5740 return c
5741 }
5742
5743
5744 func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall {
5745 c.ctx_ = ctx
5746 return c
5747 }
5748
5749
5750
5751 func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header {
5752 if c.header_ == nil {
5753 c.header_ = make(http.Header)
5754 }
5755 return c.header_
5756 }
5757
5758 func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
5759 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5760 var body io.Reader = nil
5761 c.urlParams_.Set("alt", alt)
5762 c.urlParams_.Set("prettyPrint", "false")
5763 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5764 urls += "?" + c.urlParams_.Encode()
5765 req, err := http.NewRequest("DELETE", urls, body)
5766 if err != nil {
5767 return nil, err
5768 }
5769 req.Header = reqHeaders
5770 googleapi.Expand(req.URL, map[string]string{
5771 "name": c.name,
5772 })
5773 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5774 }
5775
5776
5777
5778
5779
5780
5781 func (c *ProjectsLocationsServicesBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5782 gensupport.SetOptions(c.urlParams_, opts...)
5783 res, err := c.doRequest("json")
5784 if res != nil && res.StatusCode == http.StatusNotModified {
5785 if res.Body != nil {
5786 res.Body.Close()
5787 }
5788 return nil, gensupport.WrapError(&googleapi.Error{
5789 Code: res.StatusCode,
5790 Header: res.Header,
5791 })
5792 }
5793 if err != nil {
5794 return nil, err
5795 }
5796 defer googleapi.CloseBody(res)
5797 if err := googleapi.CheckResponse(res); err != nil {
5798 return nil, gensupport.WrapError(err)
5799 }
5800 ret := &Operation{
5801 ServerResponse: googleapi.ServerResponse{
5802 Header: res.Header,
5803 HTTPStatusCode: res.StatusCode,
5804 },
5805 }
5806 target := &ret
5807 if err := gensupport.DecodeResponse(target, res); err != nil {
5808 return nil, err
5809 }
5810 return ret, nil
5811 }
5812
5813 type ProjectsLocationsServicesBackupsGetCall struct {
5814 s *APIService
5815 name string
5816 urlParams_ gensupport.URLParams
5817 ifNoneMatch_ string
5818 ctx_ context.Context
5819 header_ http.Header
5820 }
5821
5822
5823
5824
5825
5826
5827
5828 func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall {
5829 c := &ProjectsLocationsServicesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5830 c.name = name
5831 return c
5832 }
5833
5834
5835
5836
5837 func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall {
5838 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5839 return c
5840 }
5841
5842
5843
5844
5845 func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall {
5846 c.ifNoneMatch_ = entityTag
5847 return c
5848 }
5849
5850
5851 func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall {
5852 c.ctx_ = ctx
5853 return c
5854 }
5855
5856
5857
5858 func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header {
5859 if c.header_ == nil {
5860 c.header_ = make(http.Header)
5861 }
5862 return c.header_
5863 }
5864
5865 func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) {
5866 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5867 if c.ifNoneMatch_ != "" {
5868 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5869 }
5870 var body io.Reader = nil
5871 c.urlParams_.Set("alt", alt)
5872 c.urlParams_.Set("prettyPrint", "false")
5873 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5874 urls += "?" + c.urlParams_.Encode()
5875 req, err := http.NewRequest("GET", urls, body)
5876 if err != nil {
5877 return nil, err
5878 }
5879 req.Header = reqHeaders
5880 googleapi.Expand(req.URL, map[string]string{
5881 "name": c.name,
5882 })
5883 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5884 }
5885
5886
5887
5888
5889
5890
5891 func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
5892 gensupport.SetOptions(c.urlParams_, opts...)
5893 res, err := c.doRequest("json")
5894 if res != nil && res.StatusCode == http.StatusNotModified {
5895 if res.Body != nil {
5896 res.Body.Close()
5897 }
5898 return nil, gensupport.WrapError(&googleapi.Error{
5899 Code: res.StatusCode,
5900 Header: res.Header,
5901 })
5902 }
5903 if err != nil {
5904 return nil, err
5905 }
5906 defer googleapi.CloseBody(res)
5907 if err := googleapi.CheckResponse(res); err != nil {
5908 return nil, gensupport.WrapError(err)
5909 }
5910 ret := &Backup{
5911 ServerResponse: googleapi.ServerResponse{
5912 Header: res.Header,
5913 HTTPStatusCode: res.StatusCode,
5914 },
5915 }
5916 target := &ret
5917 if err := gensupport.DecodeResponse(target, res); err != nil {
5918 return nil, err
5919 }
5920 return ret, nil
5921 }
5922
5923 type ProjectsLocationsServicesBackupsGetIamPolicyCall struct {
5924 s *APIService
5925 resource string
5926 urlParams_ gensupport.URLParams
5927 ifNoneMatch_ string
5928 ctx_ context.Context
5929 header_ http.Header
5930 }
5931
5932
5933
5934
5935
5936
5937
5938 func (r *ProjectsLocationsServicesBackupsService) GetIamPolicy(resource string) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
5939 c := &ProjectsLocationsServicesBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5940 c.resource = resource
5941 return c
5942 }
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
5957 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
5958 return c
5959 }
5960
5961
5962
5963
5964 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
5965 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5966 return c
5967 }
5968
5969
5970
5971
5972 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
5973 c.ifNoneMatch_ = entityTag
5974 return c
5975 }
5976
5977
5978 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
5979 c.ctx_ = ctx
5980 return c
5981 }
5982
5983
5984
5985 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Header() http.Header {
5986 if c.header_ == nil {
5987 c.header_ = make(http.Header)
5988 }
5989 return c.header_
5990 }
5991
5992 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5993 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5994 if c.ifNoneMatch_ != "" {
5995 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5996 }
5997 var body io.Reader = nil
5998 c.urlParams_.Set("alt", alt)
5999 c.urlParams_.Set("prettyPrint", "false")
6000 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
6001 urls += "?" + c.urlParams_.Encode()
6002 req, err := http.NewRequest("GET", urls, body)
6003 if err != nil {
6004 return nil, err
6005 }
6006 req.Header = reqHeaders
6007 googleapi.Expand(req.URL, map[string]string{
6008 "resource": c.resource,
6009 })
6010 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6011 }
6012
6013
6014
6015
6016
6017
6018 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6019 gensupport.SetOptions(c.urlParams_, opts...)
6020 res, err := c.doRequest("json")
6021 if res != nil && res.StatusCode == http.StatusNotModified {
6022 if res.Body != nil {
6023 res.Body.Close()
6024 }
6025 return nil, gensupport.WrapError(&googleapi.Error{
6026 Code: res.StatusCode,
6027 Header: res.Header,
6028 })
6029 }
6030 if err != nil {
6031 return nil, err
6032 }
6033 defer googleapi.CloseBody(res)
6034 if err := googleapi.CheckResponse(res); err != nil {
6035 return nil, gensupport.WrapError(err)
6036 }
6037 ret := &Policy{
6038 ServerResponse: googleapi.ServerResponse{
6039 Header: res.Header,
6040 HTTPStatusCode: res.StatusCode,
6041 },
6042 }
6043 target := &ret
6044 if err := gensupport.DecodeResponse(target, res); err != nil {
6045 return nil, err
6046 }
6047 return ret, nil
6048 }
6049
6050 type ProjectsLocationsServicesBackupsListCall struct {
6051 s *APIService
6052 parent string
6053 urlParams_ gensupport.URLParams
6054 ifNoneMatch_ string
6055 ctx_ context.Context
6056 header_ http.Header
6057 }
6058
6059
6060
6061
6062
6063
6064
6065 func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall {
6066 c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6067 c.parent = parent
6068 return c
6069 }
6070
6071
6072
6073 func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall {
6074 c.urlParams_.Set("filter", filter)
6075 return c
6076 }
6077
6078
6079
6080
6081
6082 func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall {
6083 c.urlParams_.Set("orderBy", orderBy)
6084 return c
6085 }
6086
6087
6088
6089
6090
6091 func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall {
6092 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6093 return c
6094 }
6095
6096
6097
6098
6099
6100
6101
6102 func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall {
6103 c.urlParams_.Set("pageToken", pageToken)
6104 return c
6105 }
6106
6107
6108
6109
6110 func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall {
6111 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6112 return c
6113 }
6114
6115
6116
6117
6118 func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall {
6119 c.ifNoneMatch_ = entityTag
6120 return c
6121 }
6122
6123
6124 func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall {
6125 c.ctx_ = ctx
6126 return c
6127 }
6128
6129
6130
6131 func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header {
6132 if c.header_ == nil {
6133 c.header_ = make(http.Header)
6134 }
6135 return c.header_
6136 }
6137
6138 func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) {
6139 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6140 if c.ifNoneMatch_ != "" {
6141 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6142 }
6143 var body io.Reader = nil
6144 c.urlParams_.Set("alt", alt)
6145 c.urlParams_.Set("prettyPrint", "false")
6146 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
6147 urls += "?" + c.urlParams_.Encode()
6148 req, err := http.NewRequest("GET", urls, body)
6149 if err != nil {
6150 return nil, err
6151 }
6152 req.Header = reqHeaders
6153 googleapi.Expand(req.URL, map[string]string{
6154 "parent": c.parent,
6155 })
6156 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6157 }
6158
6159
6160
6161
6162
6163
6164
6165 func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
6166 gensupport.SetOptions(c.urlParams_, opts...)
6167 res, err := c.doRequest("json")
6168 if res != nil && res.StatusCode == http.StatusNotModified {
6169 if res.Body != nil {
6170 res.Body.Close()
6171 }
6172 return nil, gensupport.WrapError(&googleapi.Error{
6173 Code: res.StatusCode,
6174 Header: res.Header,
6175 })
6176 }
6177 if err != nil {
6178 return nil, err
6179 }
6180 defer googleapi.CloseBody(res)
6181 if err := googleapi.CheckResponse(res); err != nil {
6182 return nil, gensupport.WrapError(err)
6183 }
6184 ret := &ListBackupsResponse{
6185 ServerResponse: googleapi.ServerResponse{
6186 Header: res.Header,
6187 HTTPStatusCode: res.StatusCode,
6188 },
6189 }
6190 target := &ret
6191 if err := gensupport.DecodeResponse(target, res); err != nil {
6192 return nil, err
6193 }
6194 return ret, nil
6195 }
6196
6197
6198
6199
6200 func (c *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
6201 c.ctx_ = ctx
6202 defer c.PageToken(c.urlParams_.Get("pageToken"))
6203 for {
6204 x, err := c.Do()
6205 if err != nil {
6206 return err
6207 }
6208 if err := f(x); err != nil {
6209 return err
6210 }
6211 if x.NextPageToken == "" {
6212 return nil
6213 }
6214 c.PageToken(x.NextPageToken)
6215 }
6216 }
6217
6218 type ProjectsLocationsServicesBackupsSetIamPolicyCall struct {
6219 s *APIService
6220 resource string
6221 setiampolicyrequest *SetIamPolicyRequest
6222 urlParams_ gensupport.URLParams
6223 ctx_ context.Context
6224 header_ http.Header
6225 }
6226
6227
6228
6229
6230
6231
6232
6233
6234 func (r *ProjectsLocationsServicesBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
6235 c := &ProjectsLocationsServicesBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6236 c.resource = resource
6237 c.setiampolicyrequest = setiampolicyrequest
6238 return c
6239 }
6240
6241
6242
6243
6244 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
6245 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6246 return c
6247 }
6248
6249
6250 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
6251 c.ctx_ = ctx
6252 return c
6253 }
6254
6255
6256
6257 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Header() http.Header {
6258 if c.header_ == nil {
6259 c.header_ = make(http.Header)
6260 }
6261 return c.header_
6262 }
6263
6264 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6265 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6266 var body io.Reader = nil
6267 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6268 if err != nil {
6269 return nil, err
6270 }
6271 c.urlParams_.Set("alt", alt)
6272 c.urlParams_.Set("prettyPrint", "false")
6273 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
6274 urls += "?" + c.urlParams_.Encode()
6275 req, err := http.NewRequest("POST", urls, body)
6276 if err != nil {
6277 return nil, err
6278 }
6279 req.Header = reqHeaders
6280 googleapi.Expand(req.URL, map[string]string{
6281 "resource": c.resource,
6282 })
6283 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6284 }
6285
6286
6287
6288
6289
6290
6291 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6292 gensupport.SetOptions(c.urlParams_, opts...)
6293 res, err := c.doRequest("json")
6294 if res != nil && res.StatusCode == http.StatusNotModified {
6295 if res.Body != nil {
6296 res.Body.Close()
6297 }
6298 return nil, gensupport.WrapError(&googleapi.Error{
6299 Code: res.StatusCode,
6300 Header: res.Header,
6301 })
6302 }
6303 if err != nil {
6304 return nil, err
6305 }
6306 defer googleapi.CloseBody(res)
6307 if err := googleapi.CheckResponse(res); err != nil {
6308 return nil, gensupport.WrapError(err)
6309 }
6310 ret := &Policy{
6311 ServerResponse: googleapi.ServerResponse{
6312 Header: res.Header,
6313 HTTPStatusCode: res.StatusCode,
6314 },
6315 }
6316 target := &ret
6317 if err := gensupport.DecodeResponse(target, res); err != nil {
6318 return nil, err
6319 }
6320 return ret, nil
6321 }
6322
6323 type ProjectsLocationsServicesMetadataImportsCreateCall struct {
6324 s *APIService
6325 parent string
6326 metadataimport *MetadataImport
6327 urlParams_ gensupport.URLParams
6328 ctx_ context.Context
6329 header_ http.Header
6330 }
6331
6332
6333
6334
6335
6336
6337
6338 func (r *ProjectsLocationsServicesMetadataImportsService) Create(parent string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsCreateCall {
6339 c := &ProjectsLocationsServicesMetadataImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6340 c.parent = parent
6341 c.metadataimport = metadataimport
6342 return c
6343 }
6344
6345
6346
6347
6348
6349
6350 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) MetadataImportId(metadataImportId string) *ProjectsLocationsServicesMetadataImportsCreateCall {
6351 c.urlParams_.Set("metadataImportId", metadataImportId)
6352 return c
6353 }
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsCreateCall {
6365 c.urlParams_.Set("requestId", requestId)
6366 return c
6367 }
6368
6369
6370
6371
6372 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsCreateCall {
6373 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6374 return c
6375 }
6376
6377
6378 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsCreateCall {
6379 c.ctx_ = ctx
6380 return c
6381 }
6382
6383
6384
6385 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Header() http.Header {
6386 if c.header_ == nil {
6387 c.header_ = make(http.Header)
6388 }
6389 return c.header_
6390 }
6391
6392 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) doRequest(alt string) (*http.Response, error) {
6393 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6394 var body io.Reader = nil
6395 body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadataimport)
6396 if err != nil {
6397 return nil, err
6398 }
6399 c.urlParams_.Set("alt", alt)
6400 c.urlParams_.Set("prettyPrint", "false")
6401 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataImports")
6402 urls += "?" + c.urlParams_.Encode()
6403 req, err := http.NewRequest("POST", urls, body)
6404 if err != nil {
6405 return nil, err
6406 }
6407 req.Header = reqHeaders
6408 googleapi.Expand(req.URL, map[string]string{
6409 "parent": c.parent,
6410 })
6411 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6412 }
6413
6414
6415
6416
6417
6418
6419 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6420 gensupport.SetOptions(c.urlParams_, opts...)
6421 res, err := c.doRequest("json")
6422 if res != nil && res.StatusCode == http.StatusNotModified {
6423 if res.Body != nil {
6424 res.Body.Close()
6425 }
6426 return nil, gensupport.WrapError(&googleapi.Error{
6427 Code: res.StatusCode,
6428 Header: res.Header,
6429 })
6430 }
6431 if err != nil {
6432 return nil, err
6433 }
6434 defer googleapi.CloseBody(res)
6435 if err := googleapi.CheckResponse(res); err != nil {
6436 return nil, gensupport.WrapError(err)
6437 }
6438 ret := &Operation{
6439 ServerResponse: googleapi.ServerResponse{
6440 Header: res.Header,
6441 HTTPStatusCode: res.StatusCode,
6442 },
6443 }
6444 target := &ret
6445 if err := gensupport.DecodeResponse(target, res); err != nil {
6446 return nil, err
6447 }
6448 return ret, nil
6449 }
6450
6451 type ProjectsLocationsServicesMetadataImportsGetCall struct {
6452 s *APIService
6453 name string
6454 urlParams_ gensupport.URLParams
6455 ifNoneMatch_ string
6456 ctx_ context.Context
6457 header_ http.Header
6458 }
6459
6460
6461
6462
6463
6464
6465
6466 func (r *ProjectsLocationsServicesMetadataImportsService) Get(name string) *ProjectsLocationsServicesMetadataImportsGetCall {
6467 c := &ProjectsLocationsServicesMetadataImportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6468 c.name = name
6469 return c
6470 }
6471
6472
6473
6474
6475 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsGetCall {
6476 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6477 return c
6478 }
6479
6480
6481
6482
6483 func (c *ProjectsLocationsServicesMetadataImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsGetCall {
6484 c.ifNoneMatch_ = entityTag
6485 return c
6486 }
6487
6488
6489 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsGetCall {
6490 c.ctx_ = ctx
6491 return c
6492 }
6493
6494
6495
6496 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Header() http.Header {
6497 if c.header_ == nil {
6498 c.header_ = make(http.Header)
6499 }
6500 return c.header_
6501 }
6502
6503 func (c *ProjectsLocationsServicesMetadataImportsGetCall) doRequest(alt string) (*http.Response, error) {
6504 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6505 if c.ifNoneMatch_ != "" {
6506 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6507 }
6508 var body io.Reader = nil
6509 c.urlParams_.Set("alt", alt)
6510 c.urlParams_.Set("prettyPrint", "false")
6511 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6512 urls += "?" + c.urlParams_.Encode()
6513 req, err := http.NewRequest("GET", urls, body)
6514 if err != nil {
6515 return nil, err
6516 }
6517 req.Header = reqHeaders
6518 googleapi.Expand(req.URL, map[string]string{
6519 "name": c.name,
6520 })
6521 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6522 }
6523
6524
6525
6526
6527
6528
6529 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Do(opts ...googleapi.CallOption) (*MetadataImport, error) {
6530 gensupport.SetOptions(c.urlParams_, opts...)
6531 res, err := c.doRequest("json")
6532 if res != nil && res.StatusCode == http.StatusNotModified {
6533 if res.Body != nil {
6534 res.Body.Close()
6535 }
6536 return nil, gensupport.WrapError(&googleapi.Error{
6537 Code: res.StatusCode,
6538 Header: res.Header,
6539 })
6540 }
6541 if err != nil {
6542 return nil, err
6543 }
6544 defer googleapi.CloseBody(res)
6545 if err := googleapi.CheckResponse(res); err != nil {
6546 return nil, gensupport.WrapError(err)
6547 }
6548 ret := &MetadataImport{
6549 ServerResponse: googleapi.ServerResponse{
6550 Header: res.Header,
6551 HTTPStatusCode: res.StatusCode,
6552 },
6553 }
6554 target := &ret
6555 if err := gensupport.DecodeResponse(target, res); err != nil {
6556 return nil, err
6557 }
6558 return ret, nil
6559 }
6560
6561 type ProjectsLocationsServicesMetadataImportsListCall struct {
6562 s *APIService
6563 parent string
6564 urlParams_ gensupport.URLParams
6565 ifNoneMatch_ string
6566 ctx_ context.Context
6567 header_ http.Header
6568 }
6569
6570
6571
6572
6573
6574
6575
6576 func (r *ProjectsLocationsServicesMetadataImportsService) List(parent string) *ProjectsLocationsServicesMetadataImportsListCall {
6577 c := &ProjectsLocationsServicesMetadataImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6578 c.parent = parent
6579 return c
6580 }
6581
6582
6583
6584 func (c *ProjectsLocationsServicesMetadataImportsListCall) Filter(filter string) *ProjectsLocationsServicesMetadataImportsListCall {
6585 c.urlParams_.Set("filter", filter)
6586 return c
6587 }
6588
6589
6590
6591
6592
6593 func (c *ProjectsLocationsServicesMetadataImportsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMetadataImportsListCall {
6594 c.urlParams_.Set("orderBy", orderBy)
6595 return c
6596 }
6597
6598
6599
6600
6601
6602 func (c *ProjectsLocationsServicesMetadataImportsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMetadataImportsListCall {
6603 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6604 return c
6605 }
6606
6607
6608
6609
6610
6611
6612
6613 func (c *ProjectsLocationsServicesMetadataImportsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMetadataImportsListCall {
6614 c.urlParams_.Set("pageToken", pageToken)
6615 return c
6616 }
6617
6618
6619
6620
6621 func (c *ProjectsLocationsServicesMetadataImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsListCall {
6622 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6623 return c
6624 }
6625
6626
6627
6628
6629 func (c *ProjectsLocationsServicesMetadataImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsListCall {
6630 c.ifNoneMatch_ = entityTag
6631 return c
6632 }
6633
6634
6635 func (c *ProjectsLocationsServicesMetadataImportsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsListCall {
6636 c.ctx_ = ctx
6637 return c
6638 }
6639
6640
6641
6642 func (c *ProjectsLocationsServicesMetadataImportsListCall) Header() http.Header {
6643 if c.header_ == nil {
6644 c.header_ = make(http.Header)
6645 }
6646 return c.header_
6647 }
6648
6649 func (c *ProjectsLocationsServicesMetadataImportsListCall) doRequest(alt string) (*http.Response, error) {
6650 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6651 if c.ifNoneMatch_ != "" {
6652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6653 }
6654 var body io.Reader = nil
6655 c.urlParams_.Set("alt", alt)
6656 c.urlParams_.Set("prettyPrint", "false")
6657 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataImports")
6658 urls += "?" + c.urlParams_.Encode()
6659 req, err := http.NewRequest("GET", urls, body)
6660 if err != nil {
6661 return nil, err
6662 }
6663 req.Header = reqHeaders
6664 googleapi.Expand(req.URL, map[string]string{
6665 "parent": c.parent,
6666 })
6667 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6668 }
6669
6670
6671
6672
6673
6674
6675
6676 func (c *ProjectsLocationsServicesMetadataImportsListCall) Do(opts ...googleapi.CallOption) (*ListMetadataImportsResponse, error) {
6677 gensupport.SetOptions(c.urlParams_, opts...)
6678 res, err := c.doRequest("json")
6679 if res != nil && res.StatusCode == http.StatusNotModified {
6680 if res.Body != nil {
6681 res.Body.Close()
6682 }
6683 return nil, gensupport.WrapError(&googleapi.Error{
6684 Code: res.StatusCode,
6685 Header: res.Header,
6686 })
6687 }
6688 if err != nil {
6689 return nil, err
6690 }
6691 defer googleapi.CloseBody(res)
6692 if err := googleapi.CheckResponse(res); err != nil {
6693 return nil, gensupport.WrapError(err)
6694 }
6695 ret := &ListMetadataImportsResponse{
6696 ServerResponse: googleapi.ServerResponse{
6697 Header: res.Header,
6698 HTTPStatusCode: res.StatusCode,
6699 },
6700 }
6701 target := &ret
6702 if err := gensupport.DecodeResponse(target, res); err != nil {
6703 return nil, err
6704 }
6705 return ret, nil
6706 }
6707
6708
6709
6710
6711 func (c *ProjectsLocationsServicesMetadataImportsListCall) Pages(ctx context.Context, f func(*ListMetadataImportsResponse) error) error {
6712 c.ctx_ = ctx
6713 defer c.PageToken(c.urlParams_.Get("pageToken"))
6714 for {
6715 x, err := c.Do()
6716 if err != nil {
6717 return err
6718 }
6719 if err := f(x); err != nil {
6720 return err
6721 }
6722 if x.NextPageToken == "" {
6723 return nil
6724 }
6725 c.PageToken(x.NextPageToken)
6726 }
6727 }
6728
6729 type ProjectsLocationsServicesMetadataImportsPatchCall struct {
6730 s *APIService
6731 name string
6732 metadataimport *MetadataImport
6733 urlParams_ gensupport.URLParams
6734 ctx_ context.Context
6735 header_ http.Header
6736 }
6737
6738
6739
6740
6741
6742
6743
6744 func (r *ProjectsLocationsServicesMetadataImportsService) Patch(name string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsPatchCall {
6745 c := &ProjectsLocationsServicesMetadataImportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6746 c.name = name
6747 c.metadataimport = metadataimport
6748 return c
6749 }
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsPatchCall {
6761 c.urlParams_.Set("requestId", requestId)
6762 return c
6763 }
6764
6765
6766
6767
6768
6769
6770 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesMetadataImportsPatchCall {
6771 c.urlParams_.Set("updateMask", updateMask)
6772 return c
6773 }
6774
6775
6776
6777
6778 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsPatchCall {
6779 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6780 return c
6781 }
6782
6783
6784 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsPatchCall {
6785 c.ctx_ = ctx
6786 return c
6787 }
6788
6789
6790
6791 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Header() http.Header {
6792 if c.header_ == nil {
6793 c.header_ = make(http.Header)
6794 }
6795 return c.header_
6796 }
6797
6798 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) doRequest(alt string) (*http.Response, error) {
6799 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6800 var body io.Reader = nil
6801 body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadataimport)
6802 if err != nil {
6803 return nil, err
6804 }
6805 c.urlParams_.Set("alt", alt)
6806 c.urlParams_.Set("prettyPrint", "false")
6807 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6808 urls += "?" + c.urlParams_.Encode()
6809 req, err := http.NewRequest("PATCH", urls, body)
6810 if err != nil {
6811 return nil, err
6812 }
6813 req.Header = reqHeaders
6814 googleapi.Expand(req.URL, map[string]string{
6815 "name": c.name,
6816 })
6817 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6818 }
6819
6820
6821
6822
6823
6824
6825 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6826 gensupport.SetOptions(c.urlParams_, opts...)
6827 res, err := c.doRequest("json")
6828 if res != nil && res.StatusCode == http.StatusNotModified {
6829 if res.Body != nil {
6830 res.Body.Close()
6831 }
6832 return nil, gensupport.WrapError(&googleapi.Error{
6833 Code: res.StatusCode,
6834 Header: res.Header,
6835 })
6836 }
6837 if err != nil {
6838 return nil, err
6839 }
6840 defer googleapi.CloseBody(res)
6841 if err := googleapi.CheckResponse(res); err != nil {
6842 return nil, gensupport.WrapError(err)
6843 }
6844 ret := &Operation{
6845 ServerResponse: googleapi.ServerResponse{
6846 Header: res.Header,
6847 HTTPStatusCode: res.StatusCode,
6848 },
6849 }
6850 target := &ret
6851 if err := gensupport.DecodeResponse(target, res); err != nil {
6852 return nil, err
6853 }
6854 return ret, nil
6855 }
6856
View as plain text