1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 package bigquerydatatransfer
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "bigquerydatatransfer:v1"
95 const apiName = "bigquerydatatransfer"
96 const apiVersion = "v1"
97 const basePath = "https://bigquerydatatransfer.googleapis.com/"
98 const basePathTemplate = "https://bigquerydatatransfer.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://bigquerydatatransfer.mtls.googleapis.com/"
100
101
102 const (
103
104
105 BigqueryScope = "https://www.googleapis.com/auth/bigquery"
106
107
108
109 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
110
111
112
113 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
114 )
115
116
117 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
118 scopesOption := internaloption.WithDefaultScopes(
119 "https://www.googleapis.com/auth/bigquery",
120 "https://www.googleapis.com/auth/cloud-platform",
121 "https://www.googleapis.com/auth/cloud-platform.read-only",
122 )
123
124 opts = append([]option.ClientOption{scopesOption}, opts...)
125 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
126 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
127 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
128 opts = append(opts, internaloption.EnableNewAuthLibrary())
129 client, endpoint, err := htransport.NewClient(ctx, opts...)
130 if err != nil {
131 return nil, err
132 }
133 s, err := New(client)
134 if err != nil {
135 return nil, err
136 }
137 if endpoint != "" {
138 s.BasePath = endpoint
139 }
140 return s, nil
141 }
142
143
144
145
146
147
148 func New(client *http.Client) (*Service, error) {
149 if client == nil {
150 return nil, errors.New("client is nil")
151 }
152 s := &Service{client: client, BasePath: basePath}
153 s.Projects = NewProjectsService(s)
154 return s, nil
155 }
156
157 type Service struct {
158 client *http.Client
159 BasePath string
160 UserAgent string
161
162 Projects *ProjectsService
163 }
164
165 func (s *Service) userAgent() string {
166 if s.UserAgent == "" {
167 return googleapi.UserAgent
168 }
169 return googleapi.UserAgent + " " + s.UserAgent
170 }
171
172 func NewProjectsService(s *Service) *ProjectsService {
173 rs := &ProjectsService{s: s}
174 rs.DataSources = NewProjectsDataSourcesService(s)
175 rs.Locations = NewProjectsLocationsService(s)
176 rs.TransferConfigs = NewProjectsTransferConfigsService(s)
177 return rs
178 }
179
180 type ProjectsService struct {
181 s *Service
182
183 DataSources *ProjectsDataSourcesService
184
185 Locations *ProjectsLocationsService
186
187 TransferConfigs *ProjectsTransferConfigsService
188 }
189
190 func NewProjectsDataSourcesService(s *Service) *ProjectsDataSourcesService {
191 rs := &ProjectsDataSourcesService{s: s}
192 return rs
193 }
194
195 type ProjectsDataSourcesService struct {
196 s *Service
197 }
198
199 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
200 rs := &ProjectsLocationsService{s: s}
201 rs.DataSources = NewProjectsLocationsDataSourcesService(s)
202 rs.TransferConfigs = NewProjectsLocationsTransferConfigsService(s)
203 return rs
204 }
205
206 type ProjectsLocationsService struct {
207 s *Service
208
209 DataSources *ProjectsLocationsDataSourcesService
210
211 TransferConfigs *ProjectsLocationsTransferConfigsService
212 }
213
214 func NewProjectsLocationsDataSourcesService(s *Service) *ProjectsLocationsDataSourcesService {
215 rs := &ProjectsLocationsDataSourcesService{s: s}
216 return rs
217 }
218
219 type ProjectsLocationsDataSourcesService struct {
220 s *Service
221 }
222
223 func NewProjectsLocationsTransferConfigsService(s *Service) *ProjectsLocationsTransferConfigsService {
224 rs := &ProjectsLocationsTransferConfigsService{s: s}
225 rs.Runs = NewProjectsLocationsTransferConfigsRunsService(s)
226 return rs
227 }
228
229 type ProjectsLocationsTransferConfigsService struct {
230 s *Service
231
232 Runs *ProjectsLocationsTransferConfigsRunsService
233 }
234
235 func NewProjectsLocationsTransferConfigsRunsService(s *Service) *ProjectsLocationsTransferConfigsRunsService {
236 rs := &ProjectsLocationsTransferConfigsRunsService{s: s}
237 rs.TransferLogs = NewProjectsLocationsTransferConfigsRunsTransferLogsService(s)
238 return rs
239 }
240
241 type ProjectsLocationsTransferConfigsRunsService struct {
242 s *Service
243
244 TransferLogs *ProjectsLocationsTransferConfigsRunsTransferLogsService
245 }
246
247 func NewProjectsLocationsTransferConfigsRunsTransferLogsService(s *Service) *ProjectsLocationsTransferConfigsRunsTransferLogsService {
248 rs := &ProjectsLocationsTransferConfigsRunsTransferLogsService{s: s}
249 return rs
250 }
251
252 type ProjectsLocationsTransferConfigsRunsTransferLogsService struct {
253 s *Service
254 }
255
256 func NewProjectsTransferConfigsService(s *Service) *ProjectsTransferConfigsService {
257 rs := &ProjectsTransferConfigsService{s: s}
258 rs.Runs = NewProjectsTransferConfigsRunsService(s)
259 return rs
260 }
261
262 type ProjectsTransferConfigsService struct {
263 s *Service
264
265 Runs *ProjectsTransferConfigsRunsService
266 }
267
268 func NewProjectsTransferConfigsRunsService(s *Service) *ProjectsTransferConfigsRunsService {
269 rs := &ProjectsTransferConfigsRunsService{s: s}
270 rs.TransferLogs = NewProjectsTransferConfigsRunsTransferLogsService(s)
271 return rs
272 }
273
274 type ProjectsTransferConfigsRunsService struct {
275 s *Service
276
277 TransferLogs *ProjectsTransferConfigsRunsTransferLogsService
278 }
279
280 func NewProjectsTransferConfigsRunsTransferLogsService(s *Service) *ProjectsTransferConfigsRunsTransferLogsService {
281 rs := &ProjectsTransferConfigsRunsTransferLogsService{s: s}
282 return rs
283 }
284
285 type ProjectsTransferConfigsRunsTransferLogsService struct {
286 s *Service
287 }
288
289
290
291
292
293
294
295 type CheckValidCredsRequest struct {
296 }
297
298
299
300 type CheckValidCredsResponse struct {
301
302 HasValidCreds bool `json:"hasValidCreds,omitempty"`
303
304
305 googleapi.ServerResponse `json:"-"`
306
307
308
309
310
311 ForceSendFields []string `json:"-"`
312
313
314
315
316 NullFields []string `json:"-"`
317 }
318
319 func (s *CheckValidCredsResponse) MarshalJSON() ([]byte, error) {
320 type NoMethod CheckValidCredsResponse
321 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
322 }
323
324
325 type DataSource struct {
326
327
328
329
330
331
332
333
334
335
336 AuthorizationType string `json:"authorizationType,omitempty"`
337
338
339 ClientId string `json:"clientId,omitempty"`
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354 DataRefreshType string `json:"dataRefreshType,omitempty"`
355
356 DataSourceId string `json:"dataSourceId,omitempty"`
357
358
359 DefaultDataRefreshWindowDays int64 `json:"defaultDataRefreshWindowDays,omitempty"`
360
361
362
363 DefaultSchedule string `json:"defaultSchedule,omitempty"`
364
365 Description string `json:"description,omitempty"`
366
367 DisplayName string `json:"displayName,omitempty"`
368
369 HelpUrl string `json:"helpUrl,omitempty"`
370
371
372 ManualRunsDisabled bool `json:"manualRunsDisabled,omitempty"`
373
374
375 MinimumScheduleInterval string `json:"minimumScheduleInterval,omitempty"`
376
377 Name string `json:"name,omitempty"`
378
379 Parameters []*DataSourceParameter `json:"parameters,omitempty"`
380
381
382
383 Scopes []string `json:"scopes,omitempty"`
384
385
386
387 SupportsCustomSchedule bool `json:"supportsCustomSchedule,omitempty"`
388
389 SupportsMultipleTransfers bool `json:"supportsMultipleTransfers,omitempty"`
390
391
392
393
394
395
396
397
398 TransferType string `json:"transferType,omitempty"`
399
400
401 UpdateDeadlineSeconds int64 `json:"updateDeadlineSeconds,omitempty"`
402
403
404 googleapi.ServerResponse `json:"-"`
405
406
407
408
409
410 ForceSendFields []string `json:"-"`
411
412
413
414
415 NullFields []string `json:"-"`
416 }
417
418 func (s *DataSource) MarshalJSON() ([]byte, error) {
419 type NoMethod DataSource
420 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
421 }
422
423
424
425 type DataSourceParameter struct {
426
427 AllowedValues []string `json:"allowedValues,omitempty"`
428
429
430 Deprecated bool `json:"deprecated,omitempty"`
431
432 Description string `json:"description,omitempty"`
433
434 DisplayName string `json:"displayName,omitempty"`
435
436 Fields []*DataSourceParameter `json:"fields,omitempty"`
437
438 Immutable bool `json:"immutable,omitempty"`
439
440 MaxValue float64 `json:"maxValue,omitempty"`
441
442 MinValue float64 `json:"minValue,omitempty"`
443
444 ParamId string `json:"paramId,omitempty"`
445
446 Recurse bool `json:"recurse,omitempty"`
447
448 Repeated bool `json:"repeated,omitempty"`
449
450 Required bool `json:"required,omitempty"`
451
452
453
454
455
456
457
458
459
460
461
462
463 Type string `json:"type,omitempty"`
464
465
466 ValidationDescription string `json:"validationDescription,omitempty"`
467
468
469 ValidationHelpUrl string `json:"validationHelpUrl,omitempty"`
470
471
472 ValidationRegex string `json:"validationRegex,omitempty"`
473
474
475
476
477
478 ForceSendFields []string `json:"-"`
479
480
481
482
483 NullFields []string `json:"-"`
484 }
485
486 func (s *DataSourceParameter) MarshalJSON() ([]byte, error) {
487 type NoMethod DataSourceParameter
488 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
489 }
490
491 func (s *DataSourceParameter) UnmarshalJSON(data []byte) error {
492 type NoMethod DataSourceParameter
493 var s1 struct {
494 MaxValue gensupport.JSONFloat64 `json:"maxValue"`
495 MinValue gensupport.JSONFloat64 `json:"minValue"`
496 *NoMethod
497 }
498 s1.NoMethod = (*NoMethod)(s)
499 if err := json.Unmarshal(data, &s1); err != nil {
500 return err
501 }
502 s.MaxValue = float64(s1.MaxValue)
503 s.MinValue = float64(s1.MinValue)
504 return nil
505 }
506
507
508
509 type EmailPreferences struct {
510
511
512 EnableFailureEmail bool `json:"enableFailureEmail,omitempty"`
513
514
515
516
517
518 ForceSendFields []string `json:"-"`
519
520
521
522
523 NullFields []string `json:"-"`
524 }
525
526 func (s *EmailPreferences) MarshalJSON() ([]byte, error) {
527 type NoMethod EmailPreferences
528 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
529 }
530
531
532
533
534
535 type Empty struct {
536
537 googleapi.ServerResponse `json:"-"`
538 }
539
540
541
542 type EncryptionConfiguration struct {
543
544 KmsKeyName string `json:"kmsKeyName,omitempty"`
545
546
547
548
549
550 ForceSendFields []string `json:"-"`
551
552
553
554
555 NullFields []string `json:"-"`
556 }
557
558 func (s *EncryptionConfiguration) MarshalJSON() ([]byte, error) {
559 type NoMethod EncryptionConfiguration
560 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
561 }
562
563
564
565 type EnrollDataSourcesRequest struct {
566
567
568 DataSourceIds []string `json:"dataSourceIds,omitempty"`
569
570
571
572
573
574 ForceSendFields []string `json:"-"`
575
576
577
578
579 NullFields []string `json:"-"`
580 }
581
582 func (s *EnrollDataSourcesRequest) MarshalJSON() ([]byte, error) {
583 type NoMethod EnrollDataSourcesRequest
584 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
585 }
586
587
588
589 type ListDataSourcesResponse struct {
590
591 DataSources []*DataSource `json:"dataSources,omitempty"`
592
593
594
595
596 NextPageToken string `json:"nextPageToken,omitempty"`
597
598
599 googleapi.ServerResponse `json:"-"`
600
601
602
603
604
605 ForceSendFields []string `json:"-"`
606
607
608
609
610 NullFields []string `json:"-"`
611 }
612
613 func (s *ListDataSourcesResponse) MarshalJSON() ([]byte, error) {
614 type NoMethod ListDataSourcesResponse
615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
616 }
617
618
619 type ListLocationsResponse struct {
620
621
622 Locations []*Location `json:"locations,omitempty"`
623
624 NextPageToken string `json:"nextPageToken,omitempty"`
625
626
627 googleapi.ServerResponse `json:"-"`
628
629
630
631
632
633 ForceSendFields []string `json:"-"`
634
635
636
637
638 NullFields []string `json:"-"`
639 }
640
641 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
642 type NoMethod ListLocationsResponse
643 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
644 }
645
646
647 type ListTransferConfigsResponse struct {
648
649
650
651
652 NextPageToken string `json:"nextPageToken,omitempty"`
653
654 TransferConfigs []*TransferConfig `json:"transferConfigs,omitempty"`
655
656
657 googleapi.ServerResponse `json:"-"`
658
659
660
661
662
663 ForceSendFields []string `json:"-"`
664
665
666
667
668 NullFields []string `json:"-"`
669 }
670
671 func (s *ListTransferConfigsResponse) MarshalJSON() ([]byte, error) {
672 type NoMethod ListTransferConfigsResponse
673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
674 }
675
676
677 type ListTransferLogsResponse struct {
678
679
680
681
682 NextPageToken string `json:"nextPageToken,omitempty"`
683
684 TransferMessages []*TransferMessage `json:"transferMessages,omitempty"`
685
686
687 googleapi.ServerResponse `json:"-"`
688
689
690
691
692
693 ForceSendFields []string `json:"-"`
694
695
696
697
698 NullFields []string `json:"-"`
699 }
700
701 func (s *ListTransferLogsResponse) MarshalJSON() ([]byte, error) {
702 type NoMethod ListTransferLogsResponse
703 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
704 }
705
706
707 type ListTransferRunsResponse struct {
708
709
710
711
712 NextPageToken string `json:"nextPageToken,omitempty"`
713
714 TransferRuns []*TransferRun `json:"transferRuns,omitempty"`
715
716
717 googleapi.ServerResponse `json:"-"`
718
719
720
721
722
723 ForceSendFields []string `json:"-"`
724
725
726
727
728 NullFields []string `json:"-"`
729 }
730
731 func (s *ListTransferRunsResponse) MarshalJSON() ([]byte, error) {
732 type NoMethod ListTransferRunsResponse
733 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
734 }
735
736
737 type Location struct {
738
739
740 DisplayName string `json:"displayName,omitempty"`
741
742
743 Labels map[string]string `json:"labels,omitempty"`
744
745 LocationId string `json:"locationId,omitempty"`
746
747
748 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
749
750
751
752 Name string `json:"name,omitempty"`
753
754
755 googleapi.ServerResponse `json:"-"`
756
757
758
759
760
761 ForceSendFields []string `json:"-"`
762
763
764
765
766 NullFields []string `json:"-"`
767 }
768
769 func (s *Location) MarshalJSON() ([]byte, error) {
770 type NoMethod Location
771 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
772 }
773
774
775 type ScheduleOptions struct {
776
777
778
779
780 DisableAutoScheduling bool `json:"disableAutoScheduling,omitempty"`
781
782
783
784
785 EndTime string `json:"endTime,omitempty"`
786
787
788
789
790
791 StartTime string `json:"startTime,omitempty"`
792
793
794
795
796
797 ForceSendFields []string `json:"-"`
798
799
800
801
802 NullFields []string `json:"-"`
803 }
804
805 func (s *ScheduleOptions) MarshalJSON() ([]byte, error) {
806 type NoMethod ScheduleOptions
807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
808 }
809
810
811
812 type ScheduleTransferRunsRequest struct {
813
814
815 EndTime string `json:"endTime,omitempty"`
816
817
818 StartTime string `json:"startTime,omitempty"`
819
820
821
822
823
824 ForceSendFields []string `json:"-"`
825
826
827
828
829 NullFields []string `json:"-"`
830 }
831
832 func (s *ScheduleTransferRunsRequest) MarshalJSON() ([]byte, error) {
833 type NoMethod ScheduleTransferRunsRequest
834 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
835 }
836
837
838
839 type ScheduleTransferRunsResponse struct {
840
841 Runs []*TransferRun `json:"runs,omitempty"`
842
843
844 googleapi.ServerResponse `json:"-"`
845
846
847
848
849
850 ForceSendFields []string `json:"-"`
851
852
853
854
855 NullFields []string `json:"-"`
856 }
857
858 func (s *ScheduleTransferRunsResponse) MarshalJSON() ([]byte, error) {
859 type NoMethod ScheduleTransferRunsResponse
860 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
861 }
862
863
864 type StartManualTransferRunsRequest struct {
865
866
867
868
869 RequestedRunTime string `json:"requestedRunTime,omitempty"`
870
871
872
873
874 RequestedTimeRange *TimeRange `json:"requestedTimeRange,omitempty"`
875
876
877
878
879
880 ForceSendFields []string `json:"-"`
881
882
883
884
885 NullFields []string `json:"-"`
886 }
887
888 func (s *StartManualTransferRunsRequest) MarshalJSON() ([]byte, error) {
889 type NoMethod StartManualTransferRunsRequest
890 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
891 }
892
893
894 type StartManualTransferRunsResponse struct {
895
896 Runs []*TransferRun `json:"runs,omitempty"`
897
898
899 googleapi.ServerResponse `json:"-"`
900
901
902
903
904
905 ForceSendFields []string `json:"-"`
906
907
908
909
910 NullFields []string `json:"-"`
911 }
912
913 func (s *StartManualTransferRunsResponse) MarshalJSON() ([]byte, error) {
914 type NoMethod StartManualTransferRunsResponse
915 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
916 }
917
918
919
920
921
922
923
924 type Status struct {
925
926 Code int64 `json:"code,omitempty"`
927
928
929 Details []googleapi.RawMessage `json:"details,omitempty"`
930
931
932
933 Message string `json:"message,omitempty"`
934
935
936
937
938
939 ForceSendFields []string `json:"-"`
940
941
942
943
944 NullFields []string `json:"-"`
945 }
946
947 func (s *Status) MarshalJSON() ([]byte, error) {
948 type NoMethod Status
949 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
950 }
951
952
953
954 type TimeRange struct {
955
956
957
958
959 EndTime string `json:"endTime,omitempty"`
960
961
962
963
964 StartTime string `json:"startTime,omitempty"`
965
966
967
968
969
970 ForceSendFields []string `json:"-"`
971
972
973
974
975 NullFields []string `json:"-"`
976 }
977
978 func (s *TimeRange) MarshalJSON() ([]byte, error) {
979 type NoMethod TimeRange
980 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
981 }
982
983
984
985
986
987
988
989 type TransferConfig struct {
990
991
992
993
994
995 DataRefreshWindowDays int64 `json:"dataRefreshWindowDays,omitempty"`
996
997
998
999
1000 DataSourceId string `json:"dataSourceId,omitempty"`
1001
1002 DatasetRegion string `json:"datasetRegion,omitempty"`
1003
1004 DestinationDatasetId string `json:"destinationDatasetId,omitempty"`
1005
1006
1007 Disabled bool `json:"disabled,omitempty"`
1008
1009 DisplayName string `json:"displayName,omitempty"`
1010
1011
1012 EmailPreferences *EmailPreferences `json:"emailPreferences,omitempty"`
1013
1014
1015
1016
1017
1018
1019 EncryptionConfiguration *EncryptionConfiguration `json:"encryptionConfiguration,omitempty"`
1020
1021
1022
1023
1024
1025
1026 Name string `json:"name,omitempty"`
1027
1028 NextRunTime string `json:"nextRunTime,omitempty"`
1029
1030
1031
1032 NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"`
1033
1034
1035
1036
1037 OwnerInfo *UserInfo `json:"ownerInfo,omitempty"`
1038
1039
1040
1041
1042 Params googleapi.RawMessage `json:"params,omitempty"`
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052 Schedule string `json:"schedule,omitempty"`
1053
1054 ScheduleOptions *ScheduleOptions `json:"scheduleOptions,omitempty"`
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065 State string `json:"state,omitempty"`
1066
1067
1068 UpdateTime string `json:"updateTime,omitempty"`
1069
1070 UserId int64 `json:"userId,omitempty,string"`
1071
1072
1073 googleapi.ServerResponse `json:"-"`
1074
1075
1076
1077
1078
1079 ForceSendFields []string `json:"-"`
1080
1081
1082
1083
1084 NullFields []string `json:"-"`
1085 }
1086
1087 func (s *TransferConfig) MarshalJSON() ([]byte, error) {
1088 type NoMethod TransferConfig
1089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1090 }
1091
1092
1093
1094 type TransferMessage struct {
1095
1096 MessageText string `json:"messageText,omitempty"`
1097
1098 MessageTime string `json:"messageTime,omitempty"`
1099
1100
1101
1102
1103
1104
1105
1106 Severity string `json:"severity,omitempty"`
1107
1108
1109
1110
1111
1112 ForceSendFields []string `json:"-"`
1113
1114
1115
1116
1117 NullFields []string `json:"-"`
1118 }
1119
1120 func (s *TransferMessage) MarshalJSON() ([]byte, error) {
1121 type NoMethod TransferMessage
1122 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1123 }
1124
1125
1126 type TransferRun struct {
1127
1128 DataSourceId string `json:"dataSourceId,omitempty"`
1129
1130 DestinationDatasetId string `json:"destinationDatasetId,omitempty"`
1131
1132
1133
1134 EmailPreferences *EmailPreferences `json:"emailPreferences,omitempty"`
1135
1136
1137 EndTime string `json:"endTime,omitempty"`
1138
1139 ErrorStatus *Status `json:"errorStatus,omitempty"`
1140
1141
1142
1143
1144 Name string `json:"name,omitempty"`
1145
1146
1147
1148 NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"`
1149
1150
1151
1152
1153
1154 Params googleapi.RawMessage `json:"params,omitempty"`
1155
1156
1157 RunTime string `json:"runTime,omitempty"`
1158
1159
1160
1161
1162
1163 Schedule string `json:"schedule,omitempty"`
1164
1165 ScheduleTime string `json:"scheduleTime,omitempty"`
1166
1167
1168 StartTime string `json:"startTime,omitempty"`
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179 State string `json:"state,omitempty"`
1180
1181 UpdateTime string `json:"updateTime,omitempty"`
1182
1183 UserId int64 `json:"userId,omitempty,string"`
1184
1185
1186 googleapi.ServerResponse `json:"-"`
1187
1188
1189
1190
1191
1192 ForceSendFields []string `json:"-"`
1193
1194
1195
1196
1197 NullFields []string `json:"-"`
1198 }
1199
1200 func (s *TransferRun) MarshalJSON() ([]byte, error) {
1201 type NoMethod TransferRun
1202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1203 }
1204
1205
1206
1207 type UnenrollDataSourcesRequest struct {
1208
1209
1210 DataSourceIds []string `json:"dataSourceIds,omitempty"`
1211
1212
1213
1214
1215
1216 ForceSendFields []string `json:"-"`
1217
1218
1219
1220
1221 NullFields []string `json:"-"`
1222 }
1223
1224 func (s *UnenrollDataSourcesRequest) MarshalJSON() ([]byte, error) {
1225 type NoMethod UnenrollDataSourcesRequest
1226 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1227 }
1228
1229
1230 type UserInfo struct {
1231
1232 Email string `json:"email,omitempty"`
1233
1234
1235
1236
1237
1238 ForceSendFields []string `json:"-"`
1239
1240
1241
1242
1243 NullFields []string `json:"-"`
1244 }
1245
1246 func (s *UserInfo) MarshalJSON() ([]byte, error) {
1247 type NoMethod UserInfo
1248 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1249 }
1250
1251 type ProjectsEnrollDataSourcesCall struct {
1252 s *Service
1253 name string
1254 enrolldatasourcesrequest *EnrollDataSourcesRequest
1255 urlParams_ gensupport.URLParams
1256 ctx_ context.Context
1257 header_ http.Header
1258 }
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270 func (r *ProjectsService) EnrollDataSources(name string, enrolldatasourcesrequest *EnrollDataSourcesRequest) *ProjectsEnrollDataSourcesCall {
1271 c := &ProjectsEnrollDataSourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1272 c.name = name
1273 c.enrolldatasourcesrequest = enrolldatasourcesrequest
1274 return c
1275 }
1276
1277
1278
1279
1280 func (c *ProjectsEnrollDataSourcesCall) Fields(s ...googleapi.Field) *ProjectsEnrollDataSourcesCall {
1281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1282 return c
1283 }
1284
1285
1286 func (c *ProjectsEnrollDataSourcesCall) Context(ctx context.Context) *ProjectsEnrollDataSourcesCall {
1287 c.ctx_ = ctx
1288 return c
1289 }
1290
1291
1292
1293 func (c *ProjectsEnrollDataSourcesCall) Header() http.Header {
1294 if c.header_ == nil {
1295 c.header_ = make(http.Header)
1296 }
1297 return c.header_
1298 }
1299
1300 func (c *ProjectsEnrollDataSourcesCall) doRequest(alt string) (*http.Response, error) {
1301 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1302 var body io.Reader = nil
1303 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enrolldatasourcesrequest)
1304 if err != nil {
1305 return nil, err
1306 }
1307 c.urlParams_.Set("alt", alt)
1308 c.urlParams_.Set("prettyPrint", "false")
1309 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enrollDataSources")
1310 urls += "?" + c.urlParams_.Encode()
1311 req, err := http.NewRequest("POST", urls, body)
1312 if err != nil {
1313 return nil, err
1314 }
1315 req.Header = reqHeaders
1316 googleapi.Expand(req.URL, map[string]string{
1317 "name": c.name,
1318 })
1319 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1320 }
1321
1322
1323
1324
1325
1326
1327 func (c *ProjectsEnrollDataSourcesCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
1328 gensupport.SetOptions(c.urlParams_, opts...)
1329 res, err := c.doRequest("json")
1330 if res != nil && res.StatusCode == http.StatusNotModified {
1331 if res.Body != nil {
1332 res.Body.Close()
1333 }
1334 return nil, gensupport.WrapError(&googleapi.Error{
1335 Code: res.StatusCode,
1336 Header: res.Header,
1337 })
1338 }
1339 if err != nil {
1340 return nil, err
1341 }
1342 defer googleapi.CloseBody(res)
1343 if err := googleapi.CheckResponse(res); err != nil {
1344 return nil, gensupport.WrapError(err)
1345 }
1346 ret := &Empty{
1347 ServerResponse: googleapi.ServerResponse{
1348 Header: res.Header,
1349 HTTPStatusCode: res.StatusCode,
1350 },
1351 }
1352 target := &ret
1353 if err := gensupport.DecodeResponse(target, res); err != nil {
1354 return nil, err
1355 }
1356 return ret, nil
1357 }
1358
1359 type ProjectsDataSourcesCheckValidCredsCall struct {
1360 s *Service
1361 name string
1362 checkvalidcredsrequest *CheckValidCredsRequest
1363 urlParams_ gensupport.URLParams
1364 ctx_ context.Context
1365 header_ http.Header
1366 }
1367
1368
1369
1370
1371
1372
1373
1374
1375 func (r *ProjectsDataSourcesService) CheckValidCreds(name string, checkvalidcredsrequest *CheckValidCredsRequest) *ProjectsDataSourcesCheckValidCredsCall {
1376 c := &ProjectsDataSourcesCheckValidCredsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1377 c.name = name
1378 c.checkvalidcredsrequest = checkvalidcredsrequest
1379 return c
1380 }
1381
1382
1383
1384
1385 func (c *ProjectsDataSourcesCheckValidCredsCall) Fields(s ...googleapi.Field) *ProjectsDataSourcesCheckValidCredsCall {
1386 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1387 return c
1388 }
1389
1390
1391 func (c *ProjectsDataSourcesCheckValidCredsCall) Context(ctx context.Context) *ProjectsDataSourcesCheckValidCredsCall {
1392 c.ctx_ = ctx
1393 return c
1394 }
1395
1396
1397
1398 func (c *ProjectsDataSourcesCheckValidCredsCall) Header() http.Header {
1399 if c.header_ == nil {
1400 c.header_ = make(http.Header)
1401 }
1402 return c.header_
1403 }
1404
1405 func (c *ProjectsDataSourcesCheckValidCredsCall) doRequest(alt string) (*http.Response, error) {
1406 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1407 var body io.Reader = nil
1408 body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkvalidcredsrequest)
1409 if err != nil {
1410 return nil, err
1411 }
1412 c.urlParams_.Set("alt", alt)
1413 c.urlParams_.Set("prettyPrint", "false")
1414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:checkValidCreds")
1415 urls += "?" + c.urlParams_.Encode()
1416 req, err := http.NewRequest("POST", urls, body)
1417 if err != nil {
1418 return nil, err
1419 }
1420 req.Header = reqHeaders
1421 googleapi.Expand(req.URL, map[string]string{
1422 "name": c.name,
1423 })
1424 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1425 }
1426
1427
1428
1429
1430
1431
1432
1433 func (c *ProjectsDataSourcesCheckValidCredsCall) Do(opts ...googleapi.CallOption) (*CheckValidCredsResponse, error) {
1434 gensupport.SetOptions(c.urlParams_, opts...)
1435 res, err := c.doRequest("json")
1436 if res != nil && res.StatusCode == http.StatusNotModified {
1437 if res.Body != nil {
1438 res.Body.Close()
1439 }
1440 return nil, gensupport.WrapError(&googleapi.Error{
1441 Code: res.StatusCode,
1442 Header: res.Header,
1443 })
1444 }
1445 if err != nil {
1446 return nil, err
1447 }
1448 defer googleapi.CloseBody(res)
1449 if err := googleapi.CheckResponse(res); err != nil {
1450 return nil, gensupport.WrapError(err)
1451 }
1452 ret := &CheckValidCredsResponse{
1453 ServerResponse: googleapi.ServerResponse{
1454 Header: res.Header,
1455 HTTPStatusCode: res.StatusCode,
1456 },
1457 }
1458 target := &ret
1459 if err := gensupport.DecodeResponse(target, res); err != nil {
1460 return nil, err
1461 }
1462 return ret, nil
1463 }
1464
1465 type ProjectsDataSourcesGetCall struct {
1466 s *Service
1467 name string
1468 urlParams_ gensupport.URLParams
1469 ifNoneMatch_ string
1470 ctx_ context.Context
1471 header_ http.Header
1472 }
1473
1474
1475
1476
1477
1478
1479
1480 func (r *ProjectsDataSourcesService) Get(name string) *ProjectsDataSourcesGetCall {
1481 c := &ProjectsDataSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1482 c.name = name
1483 return c
1484 }
1485
1486
1487
1488
1489 func (c *ProjectsDataSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsDataSourcesGetCall {
1490 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1491 return c
1492 }
1493
1494
1495
1496
1497 func (c *ProjectsDataSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsDataSourcesGetCall {
1498 c.ifNoneMatch_ = entityTag
1499 return c
1500 }
1501
1502
1503 func (c *ProjectsDataSourcesGetCall) Context(ctx context.Context) *ProjectsDataSourcesGetCall {
1504 c.ctx_ = ctx
1505 return c
1506 }
1507
1508
1509
1510 func (c *ProjectsDataSourcesGetCall) Header() http.Header {
1511 if c.header_ == nil {
1512 c.header_ = make(http.Header)
1513 }
1514 return c.header_
1515 }
1516
1517 func (c *ProjectsDataSourcesGetCall) doRequest(alt string) (*http.Response, error) {
1518 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1519 if c.ifNoneMatch_ != "" {
1520 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1521 }
1522 var body io.Reader = nil
1523 c.urlParams_.Set("alt", alt)
1524 c.urlParams_.Set("prettyPrint", "false")
1525 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1526 urls += "?" + c.urlParams_.Encode()
1527 req, err := http.NewRequest("GET", urls, body)
1528 if err != nil {
1529 return nil, err
1530 }
1531 req.Header = reqHeaders
1532 googleapi.Expand(req.URL, map[string]string{
1533 "name": c.name,
1534 })
1535 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1536 }
1537
1538
1539
1540
1541
1542
1543 func (c *ProjectsDataSourcesGetCall) Do(opts ...googleapi.CallOption) (*DataSource, error) {
1544 gensupport.SetOptions(c.urlParams_, opts...)
1545 res, err := c.doRequest("json")
1546 if res != nil && res.StatusCode == http.StatusNotModified {
1547 if res.Body != nil {
1548 res.Body.Close()
1549 }
1550 return nil, gensupport.WrapError(&googleapi.Error{
1551 Code: res.StatusCode,
1552 Header: res.Header,
1553 })
1554 }
1555 if err != nil {
1556 return nil, err
1557 }
1558 defer googleapi.CloseBody(res)
1559 if err := googleapi.CheckResponse(res); err != nil {
1560 return nil, gensupport.WrapError(err)
1561 }
1562 ret := &DataSource{
1563 ServerResponse: googleapi.ServerResponse{
1564 Header: res.Header,
1565 HTTPStatusCode: res.StatusCode,
1566 },
1567 }
1568 target := &ret
1569 if err := gensupport.DecodeResponse(target, res); err != nil {
1570 return nil, err
1571 }
1572 return ret, nil
1573 }
1574
1575 type ProjectsDataSourcesListCall struct {
1576 s *Service
1577 parent string
1578 urlParams_ gensupport.URLParams
1579 ifNoneMatch_ string
1580 ctx_ context.Context
1581 header_ http.Header
1582 }
1583
1584
1585
1586
1587
1588
1589 func (r *ProjectsDataSourcesService) List(parent string) *ProjectsDataSourcesListCall {
1590 c := &ProjectsDataSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1591 c.parent = parent
1592 return c
1593 }
1594
1595
1596
1597 func (c *ProjectsDataSourcesListCall) PageSize(pageSize int64) *ProjectsDataSourcesListCall {
1598 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1599 return c
1600 }
1601
1602
1603
1604
1605
1606
1607 func (c *ProjectsDataSourcesListCall) PageToken(pageToken string) *ProjectsDataSourcesListCall {
1608 c.urlParams_.Set("pageToken", pageToken)
1609 return c
1610 }
1611
1612
1613
1614
1615 func (c *ProjectsDataSourcesListCall) Fields(s ...googleapi.Field) *ProjectsDataSourcesListCall {
1616 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1617 return c
1618 }
1619
1620
1621
1622
1623 func (c *ProjectsDataSourcesListCall) IfNoneMatch(entityTag string) *ProjectsDataSourcesListCall {
1624 c.ifNoneMatch_ = entityTag
1625 return c
1626 }
1627
1628
1629 func (c *ProjectsDataSourcesListCall) Context(ctx context.Context) *ProjectsDataSourcesListCall {
1630 c.ctx_ = ctx
1631 return c
1632 }
1633
1634
1635
1636 func (c *ProjectsDataSourcesListCall) Header() http.Header {
1637 if c.header_ == nil {
1638 c.header_ = make(http.Header)
1639 }
1640 return c.header_
1641 }
1642
1643 func (c *ProjectsDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
1644 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1645 if c.ifNoneMatch_ != "" {
1646 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1647 }
1648 var body io.Reader = nil
1649 c.urlParams_.Set("alt", alt)
1650 c.urlParams_.Set("prettyPrint", "false")
1651 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataSources")
1652 urls += "?" + c.urlParams_.Encode()
1653 req, err := http.NewRequest("GET", urls, body)
1654 if err != nil {
1655 return nil, err
1656 }
1657 req.Header = reqHeaders
1658 googleapi.Expand(req.URL, map[string]string{
1659 "parent": c.parent,
1660 })
1661 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1662 }
1663
1664
1665
1666
1667
1668
1669
1670 func (c *ProjectsDataSourcesListCall) Do(opts ...googleapi.CallOption) (*ListDataSourcesResponse, error) {
1671 gensupport.SetOptions(c.urlParams_, opts...)
1672 res, err := c.doRequest("json")
1673 if res != nil && res.StatusCode == http.StatusNotModified {
1674 if res.Body != nil {
1675 res.Body.Close()
1676 }
1677 return nil, gensupport.WrapError(&googleapi.Error{
1678 Code: res.StatusCode,
1679 Header: res.Header,
1680 })
1681 }
1682 if err != nil {
1683 return nil, err
1684 }
1685 defer googleapi.CloseBody(res)
1686 if err := googleapi.CheckResponse(res); err != nil {
1687 return nil, gensupport.WrapError(err)
1688 }
1689 ret := &ListDataSourcesResponse{
1690 ServerResponse: googleapi.ServerResponse{
1691 Header: res.Header,
1692 HTTPStatusCode: res.StatusCode,
1693 },
1694 }
1695 target := &ret
1696 if err := gensupport.DecodeResponse(target, res); err != nil {
1697 return nil, err
1698 }
1699 return ret, nil
1700 }
1701
1702
1703
1704
1705 func (c *ProjectsDataSourcesListCall) Pages(ctx context.Context, f func(*ListDataSourcesResponse) error) error {
1706 c.ctx_ = ctx
1707 defer c.PageToken(c.urlParams_.Get("pageToken"))
1708 for {
1709 x, err := c.Do()
1710 if err != nil {
1711 return err
1712 }
1713 if err := f(x); err != nil {
1714 return err
1715 }
1716 if x.NextPageToken == "" {
1717 return nil
1718 }
1719 c.PageToken(x.NextPageToken)
1720 }
1721 }
1722
1723 type ProjectsLocationsEnrollDataSourcesCall struct {
1724 s *Service
1725 name string
1726 enrolldatasourcesrequest *EnrollDataSourcesRequest
1727 urlParams_ gensupport.URLParams
1728 ctx_ context.Context
1729 header_ http.Header
1730 }
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742 func (r *ProjectsLocationsService) EnrollDataSources(name string, enrolldatasourcesrequest *EnrollDataSourcesRequest) *ProjectsLocationsEnrollDataSourcesCall {
1743 c := &ProjectsLocationsEnrollDataSourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1744 c.name = name
1745 c.enrolldatasourcesrequest = enrolldatasourcesrequest
1746 return c
1747 }
1748
1749
1750
1751
1752 func (c *ProjectsLocationsEnrollDataSourcesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollDataSourcesCall {
1753 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1754 return c
1755 }
1756
1757
1758 func (c *ProjectsLocationsEnrollDataSourcesCall) Context(ctx context.Context) *ProjectsLocationsEnrollDataSourcesCall {
1759 c.ctx_ = ctx
1760 return c
1761 }
1762
1763
1764
1765 func (c *ProjectsLocationsEnrollDataSourcesCall) Header() http.Header {
1766 if c.header_ == nil {
1767 c.header_ = make(http.Header)
1768 }
1769 return c.header_
1770 }
1771
1772 func (c *ProjectsLocationsEnrollDataSourcesCall) doRequest(alt string) (*http.Response, error) {
1773 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1774 var body io.Reader = nil
1775 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enrolldatasourcesrequest)
1776 if err != nil {
1777 return nil, err
1778 }
1779 c.urlParams_.Set("alt", alt)
1780 c.urlParams_.Set("prettyPrint", "false")
1781 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enrollDataSources")
1782 urls += "?" + c.urlParams_.Encode()
1783 req, err := http.NewRequest("POST", urls, body)
1784 if err != nil {
1785 return nil, err
1786 }
1787 req.Header = reqHeaders
1788 googleapi.Expand(req.URL, map[string]string{
1789 "name": c.name,
1790 })
1791 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1792 }
1793
1794
1795
1796
1797
1798
1799 func (c *ProjectsLocationsEnrollDataSourcesCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
1800 gensupport.SetOptions(c.urlParams_, opts...)
1801 res, err := c.doRequest("json")
1802 if res != nil && res.StatusCode == http.StatusNotModified {
1803 if res.Body != nil {
1804 res.Body.Close()
1805 }
1806 return nil, gensupport.WrapError(&googleapi.Error{
1807 Code: res.StatusCode,
1808 Header: res.Header,
1809 })
1810 }
1811 if err != nil {
1812 return nil, err
1813 }
1814 defer googleapi.CloseBody(res)
1815 if err := googleapi.CheckResponse(res); err != nil {
1816 return nil, gensupport.WrapError(err)
1817 }
1818 ret := &Empty{
1819 ServerResponse: googleapi.ServerResponse{
1820 Header: res.Header,
1821 HTTPStatusCode: res.StatusCode,
1822 },
1823 }
1824 target := &ret
1825 if err := gensupport.DecodeResponse(target, res); err != nil {
1826 return nil, err
1827 }
1828 return ret, nil
1829 }
1830
1831 type ProjectsLocationsGetCall struct {
1832 s *Service
1833 name string
1834 urlParams_ gensupport.URLParams
1835 ifNoneMatch_ string
1836 ctx_ context.Context
1837 header_ http.Header
1838 }
1839
1840
1841
1842
1843 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
1844 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1845 c.name = name
1846 return c
1847 }
1848
1849
1850
1851
1852 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
1853 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1854 return c
1855 }
1856
1857
1858
1859
1860 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
1861 c.ifNoneMatch_ = entityTag
1862 return c
1863 }
1864
1865
1866 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
1867 c.ctx_ = ctx
1868 return c
1869 }
1870
1871
1872
1873 func (c *ProjectsLocationsGetCall) Header() http.Header {
1874 if c.header_ == nil {
1875 c.header_ = make(http.Header)
1876 }
1877 return c.header_
1878 }
1879
1880 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
1881 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1882 if c.ifNoneMatch_ != "" {
1883 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1884 }
1885 var body io.Reader = nil
1886 c.urlParams_.Set("alt", alt)
1887 c.urlParams_.Set("prettyPrint", "false")
1888 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1889 urls += "?" + c.urlParams_.Encode()
1890 req, err := http.NewRequest("GET", urls, body)
1891 if err != nil {
1892 return nil, err
1893 }
1894 req.Header = reqHeaders
1895 googleapi.Expand(req.URL, map[string]string{
1896 "name": c.name,
1897 })
1898 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1899 }
1900
1901
1902
1903
1904
1905
1906 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
1907 gensupport.SetOptions(c.urlParams_, opts...)
1908 res, err := c.doRequest("json")
1909 if res != nil && res.StatusCode == http.StatusNotModified {
1910 if res.Body != nil {
1911 res.Body.Close()
1912 }
1913 return nil, gensupport.WrapError(&googleapi.Error{
1914 Code: res.StatusCode,
1915 Header: res.Header,
1916 })
1917 }
1918 if err != nil {
1919 return nil, err
1920 }
1921 defer googleapi.CloseBody(res)
1922 if err := googleapi.CheckResponse(res); err != nil {
1923 return nil, gensupport.WrapError(err)
1924 }
1925 ret := &Location{
1926 ServerResponse: googleapi.ServerResponse{
1927 Header: res.Header,
1928 HTTPStatusCode: res.StatusCode,
1929 },
1930 }
1931 target := &ret
1932 if err := gensupport.DecodeResponse(target, res); err != nil {
1933 return nil, err
1934 }
1935 return ret, nil
1936 }
1937
1938 type ProjectsLocationsListCall struct {
1939 s *Service
1940 name string
1941 urlParams_ gensupport.URLParams
1942 ifNoneMatch_ string
1943 ctx_ context.Context
1944 header_ http.Header
1945 }
1946
1947
1948
1949
1950 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
1951 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1952 c.name = name
1953 return c
1954 }
1955
1956
1957
1958
1959
1960 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
1961 c.urlParams_.Set("filter", filter)
1962 return c
1963 }
1964
1965
1966
1967 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
1968 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1969 return c
1970 }
1971
1972
1973
1974
1975 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
1976 c.urlParams_.Set("pageToken", pageToken)
1977 return c
1978 }
1979
1980
1981
1982
1983 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
1984 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1985 return c
1986 }
1987
1988
1989
1990
1991 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
1992 c.ifNoneMatch_ = entityTag
1993 return c
1994 }
1995
1996
1997 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
1998 c.ctx_ = ctx
1999 return c
2000 }
2001
2002
2003
2004 func (c *ProjectsLocationsListCall) Header() http.Header {
2005 if c.header_ == nil {
2006 c.header_ = make(http.Header)
2007 }
2008 return c.header_
2009 }
2010
2011 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2012 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2013 if c.ifNoneMatch_ != "" {
2014 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2015 }
2016 var body io.Reader = nil
2017 c.urlParams_.Set("alt", alt)
2018 c.urlParams_.Set("prettyPrint", "false")
2019 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
2020 urls += "?" + c.urlParams_.Encode()
2021 req, err := http.NewRequest("GET", urls, body)
2022 if err != nil {
2023 return nil, err
2024 }
2025 req.Header = reqHeaders
2026 googleapi.Expand(req.URL, map[string]string{
2027 "name": c.name,
2028 })
2029 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2030 }
2031
2032
2033
2034
2035
2036
2037
2038 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2039 gensupport.SetOptions(c.urlParams_, opts...)
2040 res, err := c.doRequest("json")
2041 if res != nil && res.StatusCode == http.StatusNotModified {
2042 if res.Body != nil {
2043 res.Body.Close()
2044 }
2045 return nil, gensupport.WrapError(&googleapi.Error{
2046 Code: res.StatusCode,
2047 Header: res.Header,
2048 })
2049 }
2050 if err != nil {
2051 return nil, err
2052 }
2053 defer googleapi.CloseBody(res)
2054 if err := googleapi.CheckResponse(res); err != nil {
2055 return nil, gensupport.WrapError(err)
2056 }
2057 ret := &ListLocationsResponse{
2058 ServerResponse: googleapi.ServerResponse{
2059 Header: res.Header,
2060 HTTPStatusCode: res.StatusCode,
2061 },
2062 }
2063 target := &ret
2064 if err := gensupport.DecodeResponse(target, res); err != nil {
2065 return nil, err
2066 }
2067 return ret, nil
2068 }
2069
2070
2071
2072
2073 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2074 c.ctx_ = ctx
2075 defer c.PageToken(c.urlParams_.Get("pageToken"))
2076 for {
2077 x, err := c.Do()
2078 if err != nil {
2079 return err
2080 }
2081 if err := f(x); err != nil {
2082 return err
2083 }
2084 if x.NextPageToken == "" {
2085 return nil
2086 }
2087 c.PageToken(x.NextPageToken)
2088 }
2089 }
2090
2091 type ProjectsLocationsUnenrollDataSourcesCall struct {
2092 s *Service
2093 name string
2094 unenrolldatasourcesrequest *UnenrollDataSourcesRequest
2095 urlParams_ gensupport.URLParams
2096 ctx_ context.Context
2097 header_ http.Header
2098 }
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108 func (r *ProjectsLocationsService) UnenrollDataSources(name string, unenrolldatasourcesrequest *UnenrollDataSourcesRequest) *ProjectsLocationsUnenrollDataSourcesCall {
2109 c := &ProjectsLocationsUnenrollDataSourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2110 c.name = name
2111 c.unenrolldatasourcesrequest = unenrolldatasourcesrequest
2112 return c
2113 }
2114
2115
2116
2117
2118 func (c *ProjectsLocationsUnenrollDataSourcesCall) Fields(s ...googleapi.Field) *ProjectsLocationsUnenrollDataSourcesCall {
2119 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2120 return c
2121 }
2122
2123
2124 func (c *ProjectsLocationsUnenrollDataSourcesCall) Context(ctx context.Context) *ProjectsLocationsUnenrollDataSourcesCall {
2125 c.ctx_ = ctx
2126 return c
2127 }
2128
2129
2130
2131 func (c *ProjectsLocationsUnenrollDataSourcesCall) Header() http.Header {
2132 if c.header_ == nil {
2133 c.header_ = make(http.Header)
2134 }
2135 return c.header_
2136 }
2137
2138 func (c *ProjectsLocationsUnenrollDataSourcesCall) doRequest(alt string) (*http.Response, error) {
2139 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2140 var body io.Reader = nil
2141 body, err := googleapi.WithoutDataWrapper.JSONReader(c.unenrolldatasourcesrequest)
2142 if err != nil {
2143 return nil, err
2144 }
2145 c.urlParams_.Set("alt", alt)
2146 c.urlParams_.Set("prettyPrint", "false")
2147 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unenrollDataSources")
2148 urls += "?" + c.urlParams_.Encode()
2149 req, err := http.NewRequest("POST", urls, body)
2150 if err != nil {
2151 return nil, err
2152 }
2153 req.Header = reqHeaders
2154 googleapi.Expand(req.URL, map[string]string{
2155 "name": c.name,
2156 })
2157 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2158 }
2159
2160
2161
2162
2163
2164
2165 func (c *ProjectsLocationsUnenrollDataSourcesCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2166 gensupport.SetOptions(c.urlParams_, opts...)
2167 res, err := c.doRequest("json")
2168 if res != nil && res.StatusCode == http.StatusNotModified {
2169 if res.Body != nil {
2170 res.Body.Close()
2171 }
2172 return nil, gensupport.WrapError(&googleapi.Error{
2173 Code: res.StatusCode,
2174 Header: res.Header,
2175 })
2176 }
2177 if err != nil {
2178 return nil, err
2179 }
2180 defer googleapi.CloseBody(res)
2181 if err := googleapi.CheckResponse(res); err != nil {
2182 return nil, gensupport.WrapError(err)
2183 }
2184 ret := &Empty{
2185 ServerResponse: googleapi.ServerResponse{
2186 Header: res.Header,
2187 HTTPStatusCode: res.StatusCode,
2188 },
2189 }
2190 target := &ret
2191 if err := gensupport.DecodeResponse(target, res); err != nil {
2192 return nil, err
2193 }
2194 return ret, nil
2195 }
2196
2197 type ProjectsLocationsDataSourcesCheckValidCredsCall struct {
2198 s *Service
2199 name string
2200 checkvalidcredsrequest *CheckValidCredsRequest
2201 urlParams_ gensupport.URLParams
2202 ctx_ context.Context
2203 header_ http.Header
2204 }
2205
2206
2207
2208
2209
2210
2211
2212
2213 func (r *ProjectsLocationsDataSourcesService) CheckValidCreds(name string, checkvalidcredsrequest *CheckValidCredsRequest) *ProjectsLocationsDataSourcesCheckValidCredsCall {
2214 c := &ProjectsLocationsDataSourcesCheckValidCredsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2215 c.name = name
2216 c.checkvalidcredsrequest = checkvalidcredsrequest
2217 return c
2218 }
2219
2220
2221
2222
2223 func (c *ProjectsLocationsDataSourcesCheckValidCredsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataSourcesCheckValidCredsCall {
2224 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2225 return c
2226 }
2227
2228
2229 func (c *ProjectsLocationsDataSourcesCheckValidCredsCall) Context(ctx context.Context) *ProjectsLocationsDataSourcesCheckValidCredsCall {
2230 c.ctx_ = ctx
2231 return c
2232 }
2233
2234
2235
2236 func (c *ProjectsLocationsDataSourcesCheckValidCredsCall) Header() http.Header {
2237 if c.header_ == nil {
2238 c.header_ = make(http.Header)
2239 }
2240 return c.header_
2241 }
2242
2243 func (c *ProjectsLocationsDataSourcesCheckValidCredsCall) doRequest(alt string) (*http.Response, error) {
2244 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2245 var body io.Reader = nil
2246 body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkvalidcredsrequest)
2247 if err != nil {
2248 return nil, err
2249 }
2250 c.urlParams_.Set("alt", alt)
2251 c.urlParams_.Set("prettyPrint", "false")
2252 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:checkValidCreds")
2253 urls += "?" + c.urlParams_.Encode()
2254 req, err := http.NewRequest("POST", urls, body)
2255 if err != nil {
2256 return nil, err
2257 }
2258 req.Header = reqHeaders
2259 googleapi.Expand(req.URL, map[string]string{
2260 "name": c.name,
2261 })
2262 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2263 }
2264
2265
2266
2267
2268
2269
2270
2271 func (c *ProjectsLocationsDataSourcesCheckValidCredsCall) Do(opts ...googleapi.CallOption) (*CheckValidCredsResponse, error) {
2272 gensupport.SetOptions(c.urlParams_, opts...)
2273 res, err := c.doRequest("json")
2274 if res != nil && res.StatusCode == http.StatusNotModified {
2275 if res.Body != nil {
2276 res.Body.Close()
2277 }
2278 return nil, gensupport.WrapError(&googleapi.Error{
2279 Code: res.StatusCode,
2280 Header: res.Header,
2281 })
2282 }
2283 if err != nil {
2284 return nil, err
2285 }
2286 defer googleapi.CloseBody(res)
2287 if err := googleapi.CheckResponse(res); err != nil {
2288 return nil, gensupport.WrapError(err)
2289 }
2290 ret := &CheckValidCredsResponse{
2291 ServerResponse: googleapi.ServerResponse{
2292 Header: res.Header,
2293 HTTPStatusCode: res.StatusCode,
2294 },
2295 }
2296 target := &ret
2297 if err := gensupport.DecodeResponse(target, res); err != nil {
2298 return nil, err
2299 }
2300 return ret, nil
2301 }
2302
2303 type ProjectsLocationsDataSourcesGetCall struct {
2304 s *Service
2305 name string
2306 urlParams_ gensupport.URLParams
2307 ifNoneMatch_ string
2308 ctx_ context.Context
2309 header_ http.Header
2310 }
2311
2312
2313
2314
2315
2316
2317
2318 func (r *ProjectsLocationsDataSourcesService) Get(name string) *ProjectsLocationsDataSourcesGetCall {
2319 c := &ProjectsLocationsDataSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2320 c.name = name
2321 return c
2322 }
2323
2324
2325
2326
2327 func (c *ProjectsLocationsDataSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataSourcesGetCall {
2328 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2329 return c
2330 }
2331
2332
2333
2334
2335 func (c *ProjectsLocationsDataSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataSourcesGetCall {
2336 c.ifNoneMatch_ = entityTag
2337 return c
2338 }
2339
2340
2341 func (c *ProjectsLocationsDataSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsDataSourcesGetCall {
2342 c.ctx_ = ctx
2343 return c
2344 }
2345
2346
2347
2348 func (c *ProjectsLocationsDataSourcesGetCall) Header() http.Header {
2349 if c.header_ == nil {
2350 c.header_ = make(http.Header)
2351 }
2352 return c.header_
2353 }
2354
2355 func (c *ProjectsLocationsDataSourcesGetCall) doRequest(alt string) (*http.Response, error) {
2356 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2357 if c.ifNoneMatch_ != "" {
2358 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2359 }
2360 var body io.Reader = nil
2361 c.urlParams_.Set("alt", alt)
2362 c.urlParams_.Set("prettyPrint", "false")
2363 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2364 urls += "?" + c.urlParams_.Encode()
2365 req, err := http.NewRequest("GET", urls, body)
2366 if err != nil {
2367 return nil, err
2368 }
2369 req.Header = reqHeaders
2370 googleapi.Expand(req.URL, map[string]string{
2371 "name": c.name,
2372 })
2373 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2374 }
2375
2376
2377
2378
2379
2380
2381 func (c *ProjectsLocationsDataSourcesGetCall) Do(opts ...googleapi.CallOption) (*DataSource, error) {
2382 gensupport.SetOptions(c.urlParams_, opts...)
2383 res, err := c.doRequest("json")
2384 if res != nil && res.StatusCode == http.StatusNotModified {
2385 if res.Body != nil {
2386 res.Body.Close()
2387 }
2388 return nil, gensupport.WrapError(&googleapi.Error{
2389 Code: res.StatusCode,
2390 Header: res.Header,
2391 })
2392 }
2393 if err != nil {
2394 return nil, err
2395 }
2396 defer googleapi.CloseBody(res)
2397 if err := googleapi.CheckResponse(res); err != nil {
2398 return nil, gensupport.WrapError(err)
2399 }
2400 ret := &DataSource{
2401 ServerResponse: googleapi.ServerResponse{
2402 Header: res.Header,
2403 HTTPStatusCode: res.StatusCode,
2404 },
2405 }
2406 target := &ret
2407 if err := gensupport.DecodeResponse(target, res); err != nil {
2408 return nil, err
2409 }
2410 return ret, nil
2411 }
2412
2413 type ProjectsLocationsDataSourcesListCall struct {
2414 s *Service
2415 parent string
2416 urlParams_ gensupport.URLParams
2417 ifNoneMatch_ string
2418 ctx_ context.Context
2419 header_ http.Header
2420 }
2421
2422
2423
2424
2425
2426
2427 func (r *ProjectsLocationsDataSourcesService) List(parent string) *ProjectsLocationsDataSourcesListCall {
2428 c := &ProjectsLocationsDataSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2429 c.parent = parent
2430 return c
2431 }
2432
2433
2434
2435 func (c *ProjectsLocationsDataSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsDataSourcesListCall {
2436 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2437 return c
2438 }
2439
2440
2441
2442
2443
2444
2445 func (c *ProjectsLocationsDataSourcesListCall) PageToken(pageToken string) *ProjectsLocationsDataSourcesListCall {
2446 c.urlParams_.Set("pageToken", pageToken)
2447 return c
2448 }
2449
2450
2451
2452
2453 func (c *ProjectsLocationsDataSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataSourcesListCall {
2454 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2455 return c
2456 }
2457
2458
2459
2460
2461 func (c *ProjectsLocationsDataSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataSourcesListCall {
2462 c.ifNoneMatch_ = entityTag
2463 return c
2464 }
2465
2466
2467 func (c *ProjectsLocationsDataSourcesListCall) Context(ctx context.Context) *ProjectsLocationsDataSourcesListCall {
2468 c.ctx_ = ctx
2469 return c
2470 }
2471
2472
2473
2474 func (c *ProjectsLocationsDataSourcesListCall) Header() http.Header {
2475 if c.header_ == nil {
2476 c.header_ = make(http.Header)
2477 }
2478 return c.header_
2479 }
2480
2481 func (c *ProjectsLocationsDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
2482 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2483 if c.ifNoneMatch_ != "" {
2484 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2485 }
2486 var body io.Reader = nil
2487 c.urlParams_.Set("alt", alt)
2488 c.urlParams_.Set("prettyPrint", "false")
2489 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataSources")
2490 urls += "?" + c.urlParams_.Encode()
2491 req, err := http.NewRequest("GET", urls, body)
2492 if err != nil {
2493 return nil, err
2494 }
2495 req.Header = reqHeaders
2496 googleapi.Expand(req.URL, map[string]string{
2497 "parent": c.parent,
2498 })
2499 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2500 }
2501
2502
2503
2504
2505
2506
2507
2508 func (c *ProjectsLocationsDataSourcesListCall) Do(opts ...googleapi.CallOption) (*ListDataSourcesResponse, error) {
2509 gensupport.SetOptions(c.urlParams_, opts...)
2510 res, err := c.doRequest("json")
2511 if res != nil && res.StatusCode == http.StatusNotModified {
2512 if res.Body != nil {
2513 res.Body.Close()
2514 }
2515 return nil, gensupport.WrapError(&googleapi.Error{
2516 Code: res.StatusCode,
2517 Header: res.Header,
2518 })
2519 }
2520 if err != nil {
2521 return nil, err
2522 }
2523 defer googleapi.CloseBody(res)
2524 if err := googleapi.CheckResponse(res); err != nil {
2525 return nil, gensupport.WrapError(err)
2526 }
2527 ret := &ListDataSourcesResponse{
2528 ServerResponse: googleapi.ServerResponse{
2529 Header: res.Header,
2530 HTTPStatusCode: res.StatusCode,
2531 },
2532 }
2533 target := &ret
2534 if err := gensupport.DecodeResponse(target, res); err != nil {
2535 return nil, err
2536 }
2537 return ret, nil
2538 }
2539
2540
2541
2542
2543 func (c *ProjectsLocationsDataSourcesListCall) Pages(ctx context.Context, f func(*ListDataSourcesResponse) error) error {
2544 c.ctx_ = ctx
2545 defer c.PageToken(c.urlParams_.Get("pageToken"))
2546 for {
2547 x, err := c.Do()
2548 if err != nil {
2549 return err
2550 }
2551 if err := f(x); err != nil {
2552 return err
2553 }
2554 if x.NextPageToken == "" {
2555 return nil
2556 }
2557 c.PageToken(x.NextPageToken)
2558 }
2559 }
2560
2561 type ProjectsLocationsTransferConfigsCreateCall struct {
2562 s *Service
2563 parent string
2564 transferconfig *TransferConfig
2565 urlParams_ gensupport.URLParams
2566 ctx_ context.Context
2567 header_ http.Header
2568 }
2569
2570
2571
2572
2573
2574
2575
2576
2577 func (r *ProjectsLocationsTransferConfigsService) Create(parent string, transferconfig *TransferConfig) *ProjectsLocationsTransferConfigsCreateCall {
2578 c := &ProjectsLocationsTransferConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2579 c.parent = parent
2580 c.transferconfig = transferconfig
2581 return c
2582 }
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594 func (c *ProjectsLocationsTransferConfigsCreateCall) AuthorizationCode(authorizationCode string) *ProjectsLocationsTransferConfigsCreateCall {
2595 c.urlParams_.Set("authorizationCode", authorizationCode)
2596 return c
2597 }
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607 func (c *ProjectsLocationsTransferConfigsCreateCall) ServiceAccountName(serviceAccountName string) *ProjectsLocationsTransferConfigsCreateCall {
2608 c.urlParams_.Set("serviceAccountName", serviceAccountName)
2609 return c
2610 }
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622 func (c *ProjectsLocationsTransferConfigsCreateCall) VersionInfo(versionInfo string) *ProjectsLocationsTransferConfigsCreateCall {
2623 c.urlParams_.Set("versionInfo", versionInfo)
2624 return c
2625 }
2626
2627
2628
2629
2630 func (c *ProjectsLocationsTransferConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsCreateCall {
2631 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2632 return c
2633 }
2634
2635
2636 func (c *ProjectsLocationsTransferConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsCreateCall {
2637 c.ctx_ = ctx
2638 return c
2639 }
2640
2641
2642
2643 func (c *ProjectsLocationsTransferConfigsCreateCall) Header() http.Header {
2644 if c.header_ == nil {
2645 c.header_ = make(http.Header)
2646 }
2647 return c.header_
2648 }
2649
2650 func (c *ProjectsLocationsTransferConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
2651 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2652 var body io.Reader = nil
2653 body, err := googleapi.WithoutDataWrapper.JSONReader(c.transferconfig)
2654 if err != nil {
2655 return nil, err
2656 }
2657 c.urlParams_.Set("alt", alt)
2658 c.urlParams_.Set("prettyPrint", "false")
2659 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/transferConfigs")
2660 urls += "?" + c.urlParams_.Encode()
2661 req, err := http.NewRequest("POST", urls, body)
2662 if err != nil {
2663 return nil, err
2664 }
2665 req.Header = reqHeaders
2666 googleapi.Expand(req.URL, map[string]string{
2667 "parent": c.parent,
2668 })
2669 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2670 }
2671
2672
2673
2674
2675
2676
2677 func (c *ProjectsLocationsTransferConfigsCreateCall) Do(opts ...googleapi.CallOption) (*TransferConfig, error) {
2678 gensupport.SetOptions(c.urlParams_, opts...)
2679 res, err := c.doRequest("json")
2680 if res != nil && res.StatusCode == http.StatusNotModified {
2681 if res.Body != nil {
2682 res.Body.Close()
2683 }
2684 return nil, gensupport.WrapError(&googleapi.Error{
2685 Code: res.StatusCode,
2686 Header: res.Header,
2687 })
2688 }
2689 if err != nil {
2690 return nil, err
2691 }
2692 defer googleapi.CloseBody(res)
2693 if err := googleapi.CheckResponse(res); err != nil {
2694 return nil, gensupport.WrapError(err)
2695 }
2696 ret := &TransferConfig{
2697 ServerResponse: googleapi.ServerResponse{
2698 Header: res.Header,
2699 HTTPStatusCode: res.StatusCode,
2700 },
2701 }
2702 target := &ret
2703 if err := gensupport.DecodeResponse(target, res); err != nil {
2704 return nil, err
2705 }
2706 return ret, nil
2707 }
2708
2709 type ProjectsLocationsTransferConfigsDeleteCall struct {
2710 s *Service
2711 name string
2712 urlParams_ gensupport.URLParams
2713 ctx_ context.Context
2714 header_ http.Header
2715 }
2716
2717
2718
2719
2720
2721
2722
2723 func (r *ProjectsLocationsTransferConfigsService) Delete(name string) *ProjectsLocationsTransferConfigsDeleteCall {
2724 c := &ProjectsLocationsTransferConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2725 c.name = name
2726 return c
2727 }
2728
2729
2730
2731
2732 func (c *ProjectsLocationsTransferConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsDeleteCall {
2733 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2734 return c
2735 }
2736
2737
2738 func (c *ProjectsLocationsTransferConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsDeleteCall {
2739 c.ctx_ = ctx
2740 return c
2741 }
2742
2743
2744
2745 func (c *ProjectsLocationsTransferConfigsDeleteCall) Header() http.Header {
2746 if c.header_ == nil {
2747 c.header_ = make(http.Header)
2748 }
2749 return c.header_
2750 }
2751
2752 func (c *ProjectsLocationsTransferConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
2753 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2754 var body io.Reader = nil
2755 c.urlParams_.Set("alt", alt)
2756 c.urlParams_.Set("prettyPrint", "false")
2757 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2758 urls += "?" + c.urlParams_.Encode()
2759 req, err := http.NewRequest("DELETE", urls, body)
2760 if err != nil {
2761 return nil, err
2762 }
2763 req.Header = reqHeaders
2764 googleapi.Expand(req.URL, map[string]string{
2765 "name": c.name,
2766 })
2767 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2768 }
2769
2770
2771
2772
2773
2774
2775 func (c *ProjectsLocationsTransferConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2776 gensupport.SetOptions(c.urlParams_, opts...)
2777 res, err := c.doRequest("json")
2778 if res != nil && res.StatusCode == http.StatusNotModified {
2779 if res.Body != nil {
2780 res.Body.Close()
2781 }
2782 return nil, gensupport.WrapError(&googleapi.Error{
2783 Code: res.StatusCode,
2784 Header: res.Header,
2785 })
2786 }
2787 if err != nil {
2788 return nil, err
2789 }
2790 defer googleapi.CloseBody(res)
2791 if err := googleapi.CheckResponse(res); err != nil {
2792 return nil, gensupport.WrapError(err)
2793 }
2794 ret := &Empty{
2795 ServerResponse: googleapi.ServerResponse{
2796 Header: res.Header,
2797 HTTPStatusCode: res.StatusCode,
2798 },
2799 }
2800 target := &ret
2801 if err := gensupport.DecodeResponse(target, res); err != nil {
2802 return nil, err
2803 }
2804 return ret, nil
2805 }
2806
2807 type ProjectsLocationsTransferConfigsGetCall struct {
2808 s *Service
2809 name string
2810 urlParams_ gensupport.URLParams
2811 ifNoneMatch_ string
2812 ctx_ context.Context
2813 header_ http.Header
2814 }
2815
2816
2817
2818
2819
2820
2821 func (r *ProjectsLocationsTransferConfigsService) Get(name string) *ProjectsLocationsTransferConfigsGetCall {
2822 c := &ProjectsLocationsTransferConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2823 c.name = name
2824 return c
2825 }
2826
2827
2828
2829
2830 func (c *ProjectsLocationsTransferConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsGetCall {
2831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2832 return c
2833 }
2834
2835
2836
2837
2838 func (c *ProjectsLocationsTransferConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTransferConfigsGetCall {
2839 c.ifNoneMatch_ = entityTag
2840 return c
2841 }
2842
2843
2844 func (c *ProjectsLocationsTransferConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsGetCall {
2845 c.ctx_ = ctx
2846 return c
2847 }
2848
2849
2850
2851 func (c *ProjectsLocationsTransferConfigsGetCall) Header() http.Header {
2852 if c.header_ == nil {
2853 c.header_ = make(http.Header)
2854 }
2855 return c.header_
2856 }
2857
2858 func (c *ProjectsLocationsTransferConfigsGetCall) doRequest(alt string) (*http.Response, error) {
2859 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2860 if c.ifNoneMatch_ != "" {
2861 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2862 }
2863 var body io.Reader = nil
2864 c.urlParams_.Set("alt", alt)
2865 c.urlParams_.Set("prettyPrint", "false")
2866 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2867 urls += "?" + c.urlParams_.Encode()
2868 req, err := http.NewRequest("GET", urls, body)
2869 if err != nil {
2870 return nil, err
2871 }
2872 req.Header = reqHeaders
2873 googleapi.Expand(req.URL, map[string]string{
2874 "name": c.name,
2875 })
2876 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2877 }
2878
2879
2880
2881
2882
2883
2884 func (c *ProjectsLocationsTransferConfigsGetCall) Do(opts ...googleapi.CallOption) (*TransferConfig, error) {
2885 gensupport.SetOptions(c.urlParams_, opts...)
2886 res, err := c.doRequest("json")
2887 if res != nil && res.StatusCode == http.StatusNotModified {
2888 if res.Body != nil {
2889 res.Body.Close()
2890 }
2891 return nil, gensupport.WrapError(&googleapi.Error{
2892 Code: res.StatusCode,
2893 Header: res.Header,
2894 })
2895 }
2896 if err != nil {
2897 return nil, err
2898 }
2899 defer googleapi.CloseBody(res)
2900 if err := googleapi.CheckResponse(res); err != nil {
2901 return nil, gensupport.WrapError(err)
2902 }
2903 ret := &TransferConfig{
2904 ServerResponse: googleapi.ServerResponse{
2905 Header: res.Header,
2906 HTTPStatusCode: res.StatusCode,
2907 },
2908 }
2909 target := &ret
2910 if err := gensupport.DecodeResponse(target, res); err != nil {
2911 return nil, err
2912 }
2913 return ret, nil
2914 }
2915
2916 type ProjectsLocationsTransferConfigsListCall struct {
2917 s *Service
2918 parent string
2919 urlParams_ gensupport.URLParams
2920 ifNoneMatch_ string
2921 ctx_ context.Context
2922 header_ http.Header
2923 }
2924
2925
2926
2927
2928
2929
2930
2931 func (r *ProjectsLocationsTransferConfigsService) List(parent string) *ProjectsLocationsTransferConfigsListCall {
2932 c := &ProjectsLocationsTransferConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2933 c.parent = parent
2934 return c
2935 }
2936
2937
2938
2939 func (c *ProjectsLocationsTransferConfigsListCall) DataSourceIds(dataSourceIds ...string) *ProjectsLocationsTransferConfigsListCall {
2940 c.urlParams_.SetMulti("dataSourceIds", append([]string{}, dataSourceIds...))
2941 return c
2942 }
2943
2944
2945
2946 func (c *ProjectsLocationsTransferConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsTransferConfigsListCall {
2947 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2948 return c
2949 }
2950
2951
2952
2953
2954
2955
2956 func (c *ProjectsLocationsTransferConfigsListCall) PageToken(pageToken string) *ProjectsLocationsTransferConfigsListCall {
2957 c.urlParams_.Set("pageToken", pageToken)
2958 return c
2959 }
2960
2961
2962
2963
2964 func (c *ProjectsLocationsTransferConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsListCall {
2965 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2966 return c
2967 }
2968
2969
2970
2971
2972 func (c *ProjectsLocationsTransferConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTransferConfigsListCall {
2973 c.ifNoneMatch_ = entityTag
2974 return c
2975 }
2976
2977
2978 func (c *ProjectsLocationsTransferConfigsListCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsListCall {
2979 c.ctx_ = ctx
2980 return c
2981 }
2982
2983
2984
2985 func (c *ProjectsLocationsTransferConfigsListCall) Header() http.Header {
2986 if c.header_ == nil {
2987 c.header_ = make(http.Header)
2988 }
2989 return c.header_
2990 }
2991
2992 func (c *ProjectsLocationsTransferConfigsListCall) doRequest(alt string) (*http.Response, error) {
2993 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2994 if c.ifNoneMatch_ != "" {
2995 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2996 }
2997 var body io.Reader = nil
2998 c.urlParams_.Set("alt", alt)
2999 c.urlParams_.Set("prettyPrint", "false")
3000 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/transferConfigs")
3001 urls += "?" + c.urlParams_.Encode()
3002 req, err := http.NewRequest("GET", urls, body)
3003 if err != nil {
3004 return nil, err
3005 }
3006 req.Header = reqHeaders
3007 googleapi.Expand(req.URL, map[string]string{
3008 "parent": c.parent,
3009 })
3010 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3011 }
3012
3013
3014
3015
3016
3017
3018
3019 func (c *ProjectsLocationsTransferConfigsListCall) Do(opts ...googleapi.CallOption) (*ListTransferConfigsResponse, error) {
3020 gensupport.SetOptions(c.urlParams_, opts...)
3021 res, err := c.doRequest("json")
3022 if res != nil && res.StatusCode == http.StatusNotModified {
3023 if res.Body != nil {
3024 res.Body.Close()
3025 }
3026 return nil, gensupport.WrapError(&googleapi.Error{
3027 Code: res.StatusCode,
3028 Header: res.Header,
3029 })
3030 }
3031 if err != nil {
3032 return nil, err
3033 }
3034 defer googleapi.CloseBody(res)
3035 if err := googleapi.CheckResponse(res); err != nil {
3036 return nil, gensupport.WrapError(err)
3037 }
3038 ret := &ListTransferConfigsResponse{
3039 ServerResponse: googleapi.ServerResponse{
3040 Header: res.Header,
3041 HTTPStatusCode: res.StatusCode,
3042 },
3043 }
3044 target := &ret
3045 if err := gensupport.DecodeResponse(target, res); err != nil {
3046 return nil, err
3047 }
3048 return ret, nil
3049 }
3050
3051
3052
3053
3054 func (c *ProjectsLocationsTransferConfigsListCall) Pages(ctx context.Context, f func(*ListTransferConfigsResponse) error) error {
3055 c.ctx_ = ctx
3056 defer c.PageToken(c.urlParams_.Get("pageToken"))
3057 for {
3058 x, err := c.Do()
3059 if err != nil {
3060 return err
3061 }
3062 if err := f(x); err != nil {
3063 return err
3064 }
3065 if x.NextPageToken == "" {
3066 return nil
3067 }
3068 c.PageToken(x.NextPageToken)
3069 }
3070 }
3071
3072 type ProjectsLocationsTransferConfigsPatchCall struct {
3073 s *Service
3074 name string
3075 transferconfig *TransferConfig
3076 urlParams_ gensupport.URLParams
3077 ctx_ context.Context
3078 header_ http.Header
3079 }
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090 func (r *ProjectsLocationsTransferConfigsService) Patch(name string, transferconfig *TransferConfig) *ProjectsLocationsTransferConfigsPatchCall {
3091 c := &ProjectsLocationsTransferConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3092 c.name = name
3093 c.transferconfig = transferconfig
3094 return c
3095 }
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107 func (c *ProjectsLocationsTransferConfigsPatchCall) AuthorizationCode(authorizationCode string) *ProjectsLocationsTransferConfigsPatchCall {
3108 c.urlParams_.Set("authorizationCode", authorizationCode)
3109 return c
3110 }
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120 func (c *ProjectsLocationsTransferConfigsPatchCall) ServiceAccountName(serviceAccountName string) *ProjectsLocationsTransferConfigsPatchCall {
3121 c.urlParams_.Set("serviceAccountName", serviceAccountName)
3122 return c
3123 }
3124
3125
3126
3127 func (c *ProjectsLocationsTransferConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTransferConfigsPatchCall {
3128 c.urlParams_.Set("updateMask", updateMask)
3129 return c
3130 }
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142 func (c *ProjectsLocationsTransferConfigsPatchCall) VersionInfo(versionInfo string) *ProjectsLocationsTransferConfigsPatchCall {
3143 c.urlParams_.Set("versionInfo", versionInfo)
3144 return c
3145 }
3146
3147
3148
3149
3150 func (c *ProjectsLocationsTransferConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsPatchCall {
3151 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3152 return c
3153 }
3154
3155
3156 func (c *ProjectsLocationsTransferConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsPatchCall {
3157 c.ctx_ = ctx
3158 return c
3159 }
3160
3161
3162
3163 func (c *ProjectsLocationsTransferConfigsPatchCall) Header() http.Header {
3164 if c.header_ == nil {
3165 c.header_ = make(http.Header)
3166 }
3167 return c.header_
3168 }
3169
3170 func (c *ProjectsLocationsTransferConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
3171 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3172 var body io.Reader = nil
3173 body, err := googleapi.WithoutDataWrapper.JSONReader(c.transferconfig)
3174 if err != nil {
3175 return nil, err
3176 }
3177 c.urlParams_.Set("alt", alt)
3178 c.urlParams_.Set("prettyPrint", "false")
3179 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3180 urls += "?" + c.urlParams_.Encode()
3181 req, err := http.NewRequest("PATCH", urls, body)
3182 if err != nil {
3183 return nil, err
3184 }
3185 req.Header = reqHeaders
3186 googleapi.Expand(req.URL, map[string]string{
3187 "name": c.name,
3188 })
3189 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3190 }
3191
3192
3193
3194
3195
3196
3197 func (c *ProjectsLocationsTransferConfigsPatchCall) Do(opts ...googleapi.CallOption) (*TransferConfig, error) {
3198 gensupport.SetOptions(c.urlParams_, opts...)
3199 res, err := c.doRequest("json")
3200 if res != nil && res.StatusCode == http.StatusNotModified {
3201 if res.Body != nil {
3202 res.Body.Close()
3203 }
3204 return nil, gensupport.WrapError(&googleapi.Error{
3205 Code: res.StatusCode,
3206 Header: res.Header,
3207 })
3208 }
3209 if err != nil {
3210 return nil, err
3211 }
3212 defer googleapi.CloseBody(res)
3213 if err := googleapi.CheckResponse(res); err != nil {
3214 return nil, gensupport.WrapError(err)
3215 }
3216 ret := &TransferConfig{
3217 ServerResponse: googleapi.ServerResponse{
3218 Header: res.Header,
3219 HTTPStatusCode: res.StatusCode,
3220 },
3221 }
3222 target := &ret
3223 if err := gensupport.DecodeResponse(target, res); err != nil {
3224 return nil, err
3225 }
3226 return ret, nil
3227 }
3228
3229 type ProjectsLocationsTransferConfigsScheduleRunsCall struct {
3230 s *Service
3231 parent string
3232 scheduletransferrunsrequest *ScheduleTransferRunsRequest
3233 urlParams_ gensupport.URLParams
3234 ctx_ context.Context
3235 header_ http.Header
3236 }
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247 func (r *ProjectsLocationsTransferConfigsService) ScheduleRuns(parent string, scheduletransferrunsrequest *ScheduleTransferRunsRequest) *ProjectsLocationsTransferConfigsScheduleRunsCall {
3248 c := &ProjectsLocationsTransferConfigsScheduleRunsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3249 c.parent = parent
3250 c.scheduletransferrunsrequest = scheduletransferrunsrequest
3251 return c
3252 }
3253
3254
3255
3256
3257 func (c *ProjectsLocationsTransferConfigsScheduleRunsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsScheduleRunsCall {
3258 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3259 return c
3260 }
3261
3262
3263 func (c *ProjectsLocationsTransferConfigsScheduleRunsCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsScheduleRunsCall {
3264 c.ctx_ = ctx
3265 return c
3266 }
3267
3268
3269
3270 func (c *ProjectsLocationsTransferConfigsScheduleRunsCall) Header() http.Header {
3271 if c.header_ == nil {
3272 c.header_ = make(http.Header)
3273 }
3274 return c.header_
3275 }
3276
3277 func (c *ProjectsLocationsTransferConfigsScheduleRunsCall) doRequest(alt string) (*http.Response, error) {
3278 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3279 var body io.Reader = nil
3280 body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduletransferrunsrequest)
3281 if err != nil {
3282 return nil, err
3283 }
3284 c.urlParams_.Set("alt", alt)
3285 c.urlParams_.Set("prettyPrint", "false")
3286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:scheduleRuns")
3287 urls += "?" + c.urlParams_.Encode()
3288 req, err := http.NewRequest("POST", urls, body)
3289 if err != nil {
3290 return nil, err
3291 }
3292 req.Header = reqHeaders
3293 googleapi.Expand(req.URL, map[string]string{
3294 "parent": c.parent,
3295 })
3296 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3297 }
3298
3299
3300
3301
3302
3303
3304
3305 func (c *ProjectsLocationsTransferConfigsScheduleRunsCall) Do(opts ...googleapi.CallOption) (*ScheduleTransferRunsResponse, error) {
3306 gensupport.SetOptions(c.urlParams_, opts...)
3307 res, err := c.doRequest("json")
3308 if res != nil && res.StatusCode == http.StatusNotModified {
3309 if res.Body != nil {
3310 res.Body.Close()
3311 }
3312 return nil, gensupport.WrapError(&googleapi.Error{
3313 Code: res.StatusCode,
3314 Header: res.Header,
3315 })
3316 }
3317 if err != nil {
3318 return nil, err
3319 }
3320 defer googleapi.CloseBody(res)
3321 if err := googleapi.CheckResponse(res); err != nil {
3322 return nil, gensupport.WrapError(err)
3323 }
3324 ret := &ScheduleTransferRunsResponse{
3325 ServerResponse: googleapi.ServerResponse{
3326 Header: res.Header,
3327 HTTPStatusCode: res.StatusCode,
3328 },
3329 }
3330 target := &ret
3331 if err := gensupport.DecodeResponse(target, res); err != nil {
3332 return nil, err
3333 }
3334 return ret, nil
3335 }
3336
3337 type ProjectsLocationsTransferConfigsStartManualRunsCall struct {
3338 s *Service
3339 parent string
3340 startmanualtransferrunsrequest *StartManualTransferRunsRequest
3341 urlParams_ gensupport.URLParams
3342 ctx_ context.Context
3343 header_ http.Header
3344 }
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355 func (r *ProjectsLocationsTransferConfigsService) StartManualRuns(parent string, startmanualtransferrunsrequest *StartManualTransferRunsRequest) *ProjectsLocationsTransferConfigsStartManualRunsCall {
3356 c := &ProjectsLocationsTransferConfigsStartManualRunsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3357 c.parent = parent
3358 c.startmanualtransferrunsrequest = startmanualtransferrunsrequest
3359 return c
3360 }
3361
3362
3363
3364
3365 func (c *ProjectsLocationsTransferConfigsStartManualRunsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsStartManualRunsCall {
3366 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3367 return c
3368 }
3369
3370
3371 func (c *ProjectsLocationsTransferConfigsStartManualRunsCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsStartManualRunsCall {
3372 c.ctx_ = ctx
3373 return c
3374 }
3375
3376
3377
3378 func (c *ProjectsLocationsTransferConfigsStartManualRunsCall) Header() http.Header {
3379 if c.header_ == nil {
3380 c.header_ = make(http.Header)
3381 }
3382 return c.header_
3383 }
3384
3385 func (c *ProjectsLocationsTransferConfigsStartManualRunsCall) doRequest(alt string) (*http.Response, error) {
3386 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3387 var body io.Reader = nil
3388 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmanualtransferrunsrequest)
3389 if err != nil {
3390 return nil, err
3391 }
3392 c.urlParams_.Set("alt", alt)
3393 c.urlParams_.Set("prettyPrint", "false")
3394 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:startManualRuns")
3395 urls += "?" + c.urlParams_.Encode()
3396 req, err := http.NewRequest("POST", urls, body)
3397 if err != nil {
3398 return nil, err
3399 }
3400 req.Header = reqHeaders
3401 googleapi.Expand(req.URL, map[string]string{
3402 "parent": c.parent,
3403 })
3404 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3405 }
3406
3407
3408
3409
3410
3411
3412
3413 func (c *ProjectsLocationsTransferConfigsStartManualRunsCall) Do(opts ...googleapi.CallOption) (*StartManualTransferRunsResponse, error) {
3414 gensupport.SetOptions(c.urlParams_, opts...)
3415 res, err := c.doRequest("json")
3416 if res != nil && res.StatusCode == http.StatusNotModified {
3417 if res.Body != nil {
3418 res.Body.Close()
3419 }
3420 return nil, gensupport.WrapError(&googleapi.Error{
3421 Code: res.StatusCode,
3422 Header: res.Header,
3423 })
3424 }
3425 if err != nil {
3426 return nil, err
3427 }
3428 defer googleapi.CloseBody(res)
3429 if err := googleapi.CheckResponse(res); err != nil {
3430 return nil, gensupport.WrapError(err)
3431 }
3432 ret := &StartManualTransferRunsResponse{
3433 ServerResponse: googleapi.ServerResponse{
3434 Header: res.Header,
3435 HTTPStatusCode: res.StatusCode,
3436 },
3437 }
3438 target := &ret
3439 if err := gensupport.DecodeResponse(target, res); err != nil {
3440 return nil, err
3441 }
3442 return ret, nil
3443 }
3444
3445 type ProjectsLocationsTransferConfigsRunsDeleteCall struct {
3446 s *Service
3447 name string
3448 urlParams_ gensupport.URLParams
3449 ctx_ context.Context
3450 header_ http.Header
3451 }
3452
3453
3454
3455
3456
3457
3458
3459 func (r *ProjectsLocationsTransferConfigsRunsService) Delete(name string) *ProjectsLocationsTransferConfigsRunsDeleteCall {
3460 c := &ProjectsLocationsTransferConfigsRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3461 c.name = name
3462 return c
3463 }
3464
3465
3466
3467
3468 func (c *ProjectsLocationsTransferConfigsRunsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsRunsDeleteCall {
3469 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3470 return c
3471 }
3472
3473
3474 func (c *ProjectsLocationsTransferConfigsRunsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsRunsDeleteCall {
3475 c.ctx_ = ctx
3476 return c
3477 }
3478
3479
3480
3481 func (c *ProjectsLocationsTransferConfigsRunsDeleteCall) Header() http.Header {
3482 if c.header_ == nil {
3483 c.header_ = make(http.Header)
3484 }
3485 return c.header_
3486 }
3487
3488 func (c *ProjectsLocationsTransferConfigsRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
3489 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3490 var body io.Reader = nil
3491 c.urlParams_.Set("alt", alt)
3492 c.urlParams_.Set("prettyPrint", "false")
3493 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3494 urls += "?" + c.urlParams_.Encode()
3495 req, err := http.NewRequest("DELETE", urls, body)
3496 if err != nil {
3497 return nil, err
3498 }
3499 req.Header = reqHeaders
3500 googleapi.Expand(req.URL, map[string]string{
3501 "name": c.name,
3502 })
3503 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3504 }
3505
3506
3507
3508
3509
3510
3511 func (c *ProjectsLocationsTransferConfigsRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3512 gensupport.SetOptions(c.urlParams_, opts...)
3513 res, err := c.doRequest("json")
3514 if res != nil && res.StatusCode == http.StatusNotModified {
3515 if res.Body != nil {
3516 res.Body.Close()
3517 }
3518 return nil, gensupport.WrapError(&googleapi.Error{
3519 Code: res.StatusCode,
3520 Header: res.Header,
3521 })
3522 }
3523 if err != nil {
3524 return nil, err
3525 }
3526 defer googleapi.CloseBody(res)
3527 if err := googleapi.CheckResponse(res); err != nil {
3528 return nil, gensupport.WrapError(err)
3529 }
3530 ret := &Empty{
3531 ServerResponse: googleapi.ServerResponse{
3532 Header: res.Header,
3533 HTTPStatusCode: res.StatusCode,
3534 },
3535 }
3536 target := &ret
3537 if err := gensupport.DecodeResponse(target, res); err != nil {
3538 return nil, err
3539 }
3540 return ret, nil
3541 }
3542
3543 type ProjectsLocationsTransferConfigsRunsGetCall struct {
3544 s *Service
3545 name string
3546 urlParams_ gensupport.URLParams
3547 ifNoneMatch_ string
3548 ctx_ context.Context
3549 header_ http.Header
3550 }
3551
3552
3553
3554
3555
3556
3557
3558 func (r *ProjectsLocationsTransferConfigsRunsService) Get(name string) *ProjectsLocationsTransferConfigsRunsGetCall {
3559 c := &ProjectsLocationsTransferConfigsRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3560 c.name = name
3561 return c
3562 }
3563
3564
3565
3566
3567 func (c *ProjectsLocationsTransferConfigsRunsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsRunsGetCall {
3568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3569 return c
3570 }
3571
3572
3573
3574
3575 func (c *ProjectsLocationsTransferConfigsRunsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTransferConfigsRunsGetCall {
3576 c.ifNoneMatch_ = entityTag
3577 return c
3578 }
3579
3580
3581 func (c *ProjectsLocationsTransferConfigsRunsGetCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsRunsGetCall {
3582 c.ctx_ = ctx
3583 return c
3584 }
3585
3586
3587
3588 func (c *ProjectsLocationsTransferConfigsRunsGetCall) Header() http.Header {
3589 if c.header_ == nil {
3590 c.header_ = make(http.Header)
3591 }
3592 return c.header_
3593 }
3594
3595 func (c *ProjectsLocationsTransferConfigsRunsGetCall) doRequest(alt string) (*http.Response, error) {
3596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3597 if c.ifNoneMatch_ != "" {
3598 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3599 }
3600 var body io.Reader = nil
3601 c.urlParams_.Set("alt", alt)
3602 c.urlParams_.Set("prettyPrint", "false")
3603 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3604 urls += "?" + c.urlParams_.Encode()
3605 req, err := http.NewRequest("GET", urls, body)
3606 if err != nil {
3607 return nil, err
3608 }
3609 req.Header = reqHeaders
3610 googleapi.Expand(req.URL, map[string]string{
3611 "name": c.name,
3612 })
3613 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3614 }
3615
3616
3617
3618
3619
3620
3621 func (c *ProjectsLocationsTransferConfigsRunsGetCall) Do(opts ...googleapi.CallOption) (*TransferRun, error) {
3622 gensupport.SetOptions(c.urlParams_, opts...)
3623 res, err := c.doRequest("json")
3624 if res != nil && res.StatusCode == http.StatusNotModified {
3625 if res.Body != nil {
3626 res.Body.Close()
3627 }
3628 return nil, gensupport.WrapError(&googleapi.Error{
3629 Code: res.StatusCode,
3630 Header: res.Header,
3631 })
3632 }
3633 if err != nil {
3634 return nil, err
3635 }
3636 defer googleapi.CloseBody(res)
3637 if err := googleapi.CheckResponse(res); err != nil {
3638 return nil, gensupport.WrapError(err)
3639 }
3640 ret := &TransferRun{
3641 ServerResponse: googleapi.ServerResponse{
3642 Header: res.Header,
3643 HTTPStatusCode: res.StatusCode,
3644 },
3645 }
3646 target := &ret
3647 if err := gensupport.DecodeResponse(target, res); err != nil {
3648 return nil, err
3649 }
3650 return ret, nil
3651 }
3652
3653 type ProjectsLocationsTransferConfigsRunsListCall struct {
3654 s *Service
3655 parent string
3656 urlParams_ gensupport.URLParams
3657 ifNoneMatch_ string
3658 ctx_ context.Context
3659 header_ http.Header
3660 }
3661
3662
3663
3664
3665
3666
3667
3668
3669 func (r *ProjectsLocationsTransferConfigsRunsService) List(parent string) *ProjectsLocationsTransferConfigsRunsListCall {
3670 c := &ProjectsLocationsTransferConfigsRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3671 c.parent = parent
3672 return c
3673 }
3674
3675
3676
3677 func (c *ProjectsLocationsTransferConfigsRunsListCall) PageSize(pageSize int64) *ProjectsLocationsTransferConfigsRunsListCall {
3678 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3679 return c
3680 }
3681
3682
3683
3684
3685
3686
3687 func (c *ProjectsLocationsTransferConfigsRunsListCall) PageToken(pageToken string) *ProjectsLocationsTransferConfigsRunsListCall {
3688 c.urlParams_.Set("pageToken", pageToken)
3689 return c
3690 }
3691
3692
3693
3694
3695
3696
3697
3698
3699 func (c *ProjectsLocationsTransferConfigsRunsListCall) RunAttempt(runAttempt string) *ProjectsLocationsTransferConfigsRunsListCall {
3700 c.urlParams_.Set("runAttempt", runAttempt)
3701 return c
3702 }
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718 func (c *ProjectsLocationsTransferConfigsRunsListCall) States(states ...string) *ProjectsLocationsTransferConfigsRunsListCall {
3719 c.urlParams_.SetMulti("states", append([]string{}, states...))
3720 return c
3721 }
3722
3723
3724
3725
3726 func (c *ProjectsLocationsTransferConfigsRunsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsRunsListCall {
3727 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3728 return c
3729 }
3730
3731
3732
3733
3734 func (c *ProjectsLocationsTransferConfigsRunsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTransferConfigsRunsListCall {
3735 c.ifNoneMatch_ = entityTag
3736 return c
3737 }
3738
3739
3740 func (c *ProjectsLocationsTransferConfigsRunsListCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsRunsListCall {
3741 c.ctx_ = ctx
3742 return c
3743 }
3744
3745
3746
3747 func (c *ProjectsLocationsTransferConfigsRunsListCall) Header() http.Header {
3748 if c.header_ == nil {
3749 c.header_ = make(http.Header)
3750 }
3751 return c.header_
3752 }
3753
3754 func (c *ProjectsLocationsTransferConfigsRunsListCall) doRequest(alt string) (*http.Response, error) {
3755 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3756 if c.ifNoneMatch_ != "" {
3757 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3758 }
3759 var body io.Reader = nil
3760 c.urlParams_.Set("alt", alt)
3761 c.urlParams_.Set("prettyPrint", "false")
3762 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runs")
3763 urls += "?" + c.urlParams_.Encode()
3764 req, err := http.NewRequest("GET", urls, body)
3765 if err != nil {
3766 return nil, err
3767 }
3768 req.Header = reqHeaders
3769 googleapi.Expand(req.URL, map[string]string{
3770 "parent": c.parent,
3771 })
3772 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3773 }
3774
3775
3776
3777
3778
3779
3780
3781 func (c *ProjectsLocationsTransferConfigsRunsListCall) Do(opts ...googleapi.CallOption) (*ListTransferRunsResponse, error) {
3782 gensupport.SetOptions(c.urlParams_, opts...)
3783 res, err := c.doRequest("json")
3784 if res != nil && res.StatusCode == http.StatusNotModified {
3785 if res.Body != nil {
3786 res.Body.Close()
3787 }
3788 return nil, gensupport.WrapError(&googleapi.Error{
3789 Code: res.StatusCode,
3790 Header: res.Header,
3791 })
3792 }
3793 if err != nil {
3794 return nil, err
3795 }
3796 defer googleapi.CloseBody(res)
3797 if err := googleapi.CheckResponse(res); err != nil {
3798 return nil, gensupport.WrapError(err)
3799 }
3800 ret := &ListTransferRunsResponse{
3801 ServerResponse: googleapi.ServerResponse{
3802 Header: res.Header,
3803 HTTPStatusCode: res.StatusCode,
3804 },
3805 }
3806 target := &ret
3807 if err := gensupport.DecodeResponse(target, res); err != nil {
3808 return nil, err
3809 }
3810 return ret, nil
3811 }
3812
3813
3814
3815
3816 func (c *ProjectsLocationsTransferConfigsRunsListCall) Pages(ctx context.Context, f func(*ListTransferRunsResponse) error) error {
3817 c.ctx_ = ctx
3818 defer c.PageToken(c.urlParams_.Get("pageToken"))
3819 for {
3820 x, err := c.Do()
3821 if err != nil {
3822 return err
3823 }
3824 if err := f(x); err != nil {
3825 return err
3826 }
3827 if x.NextPageToken == "" {
3828 return nil
3829 }
3830 c.PageToken(x.NextPageToken)
3831 }
3832 }
3833
3834 type ProjectsLocationsTransferConfigsRunsTransferLogsListCall struct {
3835 s *Service
3836 parent string
3837 urlParams_ gensupport.URLParams
3838 ifNoneMatch_ string
3839 ctx_ context.Context
3840 header_ http.Header
3841 }
3842
3843
3844
3845
3846
3847
3848
3849 func (r *ProjectsLocationsTransferConfigsRunsTransferLogsService) List(parent string) *ProjectsLocationsTransferConfigsRunsTransferLogsListCall {
3850 c := &ProjectsLocationsTransferConfigsRunsTransferLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3851 c.parent = parent
3852 return c
3853 }
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) MessageTypes(messageTypes ...string) *ProjectsLocationsTransferConfigsRunsTransferLogsListCall {
3865 c.urlParams_.SetMulti("messageTypes", append([]string{}, messageTypes...))
3866 return c
3867 }
3868
3869
3870
3871 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) PageSize(pageSize int64) *ProjectsLocationsTransferConfigsRunsTransferLogsListCall {
3872 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3873 return c
3874 }
3875
3876
3877
3878
3879
3880
3881 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) PageToken(pageToken string) *ProjectsLocationsTransferConfigsRunsTransferLogsListCall {
3882 c.urlParams_.Set("pageToken", pageToken)
3883 return c
3884 }
3885
3886
3887
3888
3889 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransferConfigsRunsTransferLogsListCall {
3890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3891 return c
3892 }
3893
3894
3895
3896
3897 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTransferConfigsRunsTransferLogsListCall {
3898 c.ifNoneMatch_ = entityTag
3899 return c
3900 }
3901
3902
3903 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) Context(ctx context.Context) *ProjectsLocationsTransferConfigsRunsTransferLogsListCall {
3904 c.ctx_ = ctx
3905 return c
3906 }
3907
3908
3909
3910 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) Header() http.Header {
3911 if c.header_ == nil {
3912 c.header_ = make(http.Header)
3913 }
3914 return c.header_
3915 }
3916
3917 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) doRequest(alt string) (*http.Response, error) {
3918 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3919 if c.ifNoneMatch_ != "" {
3920 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3921 }
3922 var body io.Reader = nil
3923 c.urlParams_.Set("alt", alt)
3924 c.urlParams_.Set("prettyPrint", "false")
3925 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/transferLogs")
3926 urls += "?" + c.urlParams_.Encode()
3927 req, err := http.NewRequest("GET", urls, body)
3928 if err != nil {
3929 return nil, err
3930 }
3931 req.Header = reqHeaders
3932 googleapi.Expand(req.URL, map[string]string{
3933 "parent": c.parent,
3934 })
3935 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3936 }
3937
3938
3939
3940
3941
3942
3943
3944 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) Do(opts ...googleapi.CallOption) (*ListTransferLogsResponse, error) {
3945 gensupport.SetOptions(c.urlParams_, opts...)
3946 res, err := c.doRequest("json")
3947 if res != nil && res.StatusCode == http.StatusNotModified {
3948 if res.Body != nil {
3949 res.Body.Close()
3950 }
3951 return nil, gensupport.WrapError(&googleapi.Error{
3952 Code: res.StatusCode,
3953 Header: res.Header,
3954 })
3955 }
3956 if err != nil {
3957 return nil, err
3958 }
3959 defer googleapi.CloseBody(res)
3960 if err := googleapi.CheckResponse(res); err != nil {
3961 return nil, gensupport.WrapError(err)
3962 }
3963 ret := &ListTransferLogsResponse{
3964 ServerResponse: googleapi.ServerResponse{
3965 Header: res.Header,
3966 HTTPStatusCode: res.StatusCode,
3967 },
3968 }
3969 target := &ret
3970 if err := gensupport.DecodeResponse(target, res); err != nil {
3971 return nil, err
3972 }
3973 return ret, nil
3974 }
3975
3976
3977
3978
3979 func (c *ProjectsLocationsTransferConfigsRunsTransferLogsListCall) Pages(ctx context.Context, f func(*ListTransferLogsResponse) error) error {
3980 c.ctx_ = ctx
3981 defer c.PageToken(c.urlParams_.Get("pageToken"))
3982 for {
3983 x, err := c.Do()
3984 if err != nil {
3985 return err
3986 }
3987 if err := f(x); err != nil {
3988 return err
3989 }
3990 if x.NextPageToken == "" {
3991 return nil
3992 }
3993 c.PageToken(x.NextPageToken)
3994 }
3995 }
3996
3997 type ProjectsTransferConfigsCreateCall struct {
3998 s *Service
3999 parent string
4000 transferconfig *TransferConfig
4001 urlParams_ gensupport.URLParams
4002 ctx_ context.Context
4003 header_ http.Header
4004 }
4005
4006
4007
4008
4009
4010
4011
4012
4013 func (r *ProjectsTransferConfigsService) Create(parent string, transferconfig *TransferConfig) *ProjectsTransferConfigsCreateCall {
4014 c := &ProjectsTransferConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4015 c.parent = parent
4016 c.transferconfig = transferconfig
4017 return c
4018 }
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030 func (c *ProjectsTransferConfigsCreateCall) AuthorizationCode(authorizationCode string) *ProjectsTransferConfigsCreateCall {
4031 c.urlParams_.Set("authorizationCode", authorizationCode)
4032 return c
4033 }
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043 func (c *ProjectsTransferConfigsCreateCall) ServiceAccountName(serviceAccountName string) *ProjectsTransferConfigsCreateCall {
4044 c.urlParams_.Set("serviceAccountName", serviceAccountName)
4045 return c
4046 }
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058 func (c *ProjectsTransferConfigsCreateCall) VersionInfo(versionInfo string) *ProjectsTransferConfigsCreateCall {
4059 c.urlParams_.Set("versionInfo", versionInfo)
4060 return c
4061 }
4062
4063
4064
4065
4066 func (c *ProjectsTransferConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsCreateCall {
4067 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4068 return c
4069 }
4070
4071
4072 func (c *ProjectsTransferConfigsCreateCall) Context(ctx context.Context) *ProjectsTransferConfigsCreateCall {
4073 c.ctx_ = ctx
4074 return c
4075 }
4076
4077
4078
4079 func (c *ProjectsTransferConfigsCreateCall) Header() http.Header {
4080 if c.header_ == nil {
4081 c.header_ = make(http.Header)
4082 }
4083 return c.header_
4084 }
4085
4086 func (c *ProjectsTransferConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
4087 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4088 var body io.Reader = nil
4089 body, err := googleapi.WithoutDataWrapper.JSONReader(c.transferconfig)
4090 if err != nil {
4091 return nil, err
4092 }
4093 c.urlParams_.Set("alt", alt)
4094 c.urlParams_.Set("prettyPrint", "false")
4095 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/transferConfigs")
4096 urls += "?" + c.urlParams_.Encode()
4097 req, err := http.NewRequest("POST", urls, body)
4098 if err != nil {
4099 return nil, err
4100 }
4101 req.Header = reqHeaders
4102 googleapi.Expand(req.URL, map[string]string{
4103 "parent": c.parent,
4104 })
4105 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4106 }
4107
4108
4109
4110
4111
4112
4113 func (c *ProjectsTransferConfigsCreateCall) Do(opts ...googleapi.CallOption) (*TransferConfig, error) {
4114 gensupport.SetOptions(c.urlParams_, opts...)
4115 res, err := c.doRequest("json")
4116 if res != nil && res.StatusCode == http.StatusNotModified {
4117 if res.Body != nil {
4118 res.Body.Close()
4119 }
4120 return nil, gensupport.WrapError(&googleapi.Error{
4121 Code: res.StatusCode,
4122 Header: res.Header,
4123 })
4124 }
4125 if err != nil {
4126 return nil, err
4127 }
4128 defer googleapi.CloseBody(res)
4129 if err := googleapi.CheckResponse(res); err != nil {
4130 return nil, gensupport.WrapError(err)
4131 }
4132 ret := &TransferConfig{
4133 ServerResponse: googleapi.ServerResponse{
4134 Header: res.Header,
4135 HTTPStatusCode: res.StatusCode,
4136 },
4137 }
4138 target := &ret
4139 if err := gensupport.DecodeResponse(target, res); err != nil {
4140 return nil, err
4141 }
4142 return ret, nil
4143 }
4144
4145 type ProjectsTransferConfigsDeleteCall struct {
4146 s *Service
4147 name string
4148 urlParams_ gensupport.URLParams
4149 ctx_ context.Context
4150 header_ http.Header
4151 }
4152
4153
4154
4155
4156
4157
4158
4159 func (r *ProjectsTransferConfigsService) Delete(name string) *ProjectsTransferConfigsDeleteCall {
4160 c := &ProjectsTransferConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4161 c.name = name
4162 return c
4163 }
4164
4165
4166
4167
4168 func (c *ProjectsTransferConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsDeleteCall {
4169 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4170 return c
4171 }
4172
4173
4174 func (c *ProjectsTransferConfigsDeleteCall) Context(ctx context.Context) *ProjectsTransferConfigsDeleteCall {
4175 c.ctx_ = ctx
4176 return c
4177 }
4178
4179
4180
4181 func (c *ProjectsTransferConfigsDeleteCall) Header() http.Header {
4182 if c.header_ == nil {
4183 c.header_ = make(http.Header)
4184 }
4185 return c.header_
4186 }
4187
4188 func (c *ProjectsTransferConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
4189 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4190 var body io.Reader = nil
4191 c.urlParams_.Set("alt", alt)
4192 c.urlParams_.Set("prettyPrint", "false")
4193 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4194 urls += "?" + c.urlParams_.Encode()
4195 req, err := http.NewRequest("DELETE", urls, body)
4196 if err != nil {
4197 return nil, err
4198 }
4199 req.Header = reqHeaders
4200 googleapi.Expand(req.URL, map[string]string{
4201 "name": c.name,
4202 })
4203 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4204 }
4205
4206
4207
4208
4209
4210
4211 func (c *ProjectsTransferConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4212 gensupport.SetOptions(c.urlParams_, opts...)
4213 res, err := c.doRequest("json")
4214 if res != nil && res.StatusCode == http.StatusNotModified {
4215 if res.Body != nil {
4216 res.Body.Close()
4217 }
4218 return nil, gensupport.WrapError(&googleapi.Error{
4219 Code: res.StatusCode,
4220 Header: res.Header,
4221 })
4222 }
4223 if err != nil {
4224 return nil, err
4225 }
4226 defer googleapi.CloseBody(res)
4227 if err := googleapi.CheckResponse(res); err != nil {
4228 return nil, gensupport.WrapError(err)
4229 }
4230 ret := &Empty{
4231 ServerResponse: googleapi.ServerResponse{
4232 Header: res.Header,
4233 HTTPStatusCode: res.StatusCode,
4234 },
4235 }
4236 target := &ret
4237 if err := gensupport.DecodeResponse(target, res); err != nil {
4238 return nil, err
4239 }
4240 return ret, nil
4241 }
4242
4243 type ProjectsTransferConfigsGetCall struct {
4244 s *Service
4245 name string
4246 urlParams_ gensupport.URLParams
4247 ifNoneMatch_ string
4248 ctx_ context.Context
4249 header_ http.Header
4250 }
4251
4252
4253
4254
4255
4256
4257 func (r *ProjectsTransferConfigsService) Get(name string) *ProjectsTransferConfigsGetCall {
4258 c := &ProjectsTransferConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4259 c.name = name
4260 return c
4261 }
4262
4263
4264
4265
4266 func (c *ProjectsTransferConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsGetCall {
4267 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4268 return c
4269 }
4270
4271
4272
4273
4274 func (c *ProjectsTransferConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsTransferConfigsGetCall {
4275 c.ifNoneMatch_ = entityTag
4276 return c
4277 }
4278
4279
4280 func (c *ProjectsTransferConfigsGetCall) Context(ctx context.Context) *ProjectsTransferConfigsGetCall {
4281 c.ctx_ = ctx
4282 return c
4283 }
4284
4285
4286
4287 func (c *ProjectsTransferConfigsGetCall) Header() http.Header {
4288 if c.header_ == nil {
4289 c.header_ = make(http.Header)
4290 }
4291 return c.header_
4292 }
4293
4294 func (c *ProjectsTransferConfigsGetCall) doRequest(alt string) (*http.Response, error) {
4295 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4296 if c.ifNoneMatch_ != "" {
4297 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4298 }
4299 var body io.Reader = nil
4300 c.urlParams_.Set("alt", alt)
4301 c.urlParams_.Set("prettyPrint", "false")
4302 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4303 urls += "?" + c.urlParams_.Encode()
4304 req, err := http.NewRequest("GET", urls, body)
4305 if err != nil {
4306 return nil, err
4307 }
4308 req.Header = reqHeaders
4309 googleapi.Expand(req.URL, map[string]string{
4310 "name": c.name,
4311 })
4312 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4313 }
4314
4315
4316
4317
4318
4319
4320 func (c *ProjectsTransferConfigsGetCall) Do(opts ...googleapi.CallOption) (*TransferConfig, error) {
4321 gensupport.SetOptions(c.urlParams_, opts...)
4322 res, err := c.doRequest("json")
4323 if res != nil && res.StatusCode == http.StatusNotModified {
4324 if res.Body != nil {
4325 res.Body.Close()
4326 }
4327 return nil, gensupport.WrapError(&googleapi.Error{
4328 Code: res.StatusCode,
4329 Header: res.Header,
4330 })
4331 }
4332 if err != nil {
4333 return nil, err
4334 }
4335 defer googleapi.CloseBody(res)
4336 if err := googleapi.CheckResponse(res); err != nil {
4337 return nil, gensupport.WrapError(err)
4338 }
4339 ret := &TransferConfig{
4340 ServerResponse: googleapi.ServerResponse{
4341 Header: res.Header,
4342 HTTPStatusCode: res.StatusCode,
4343 },
4344 }
4345 target := &ret
4346 if err := gensupport.DecodeResponse(target, res); err != nil {
4347 return nil, err
4348 }
4349 return ret, nil
4350 }
4351
4352 type ProjectsTransferConfigsListCall struct {
4353 s *Service
4354 parent string
4355 urlParams_ gensupport.URLParams
4356 ifNoneMatch_ string
4357 ctx_ context.Context
4358 header_ http.Header
4359 }
4360
4361
4362
4363
4364
4365
4366
4367 func (r *ProjectsTransferConfigsService) List(parent string) *ProjectsTransferConfigsListCall {
4368 c := &ProjectsTransferConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4369 c.parent = parent
4370 return c
4371 }
4372
4373
4374
4375 func (c *ProjectsTransferConfigsListCall) DataSourceIds(dataSourceIds ...string) *ProjectsTransferConfigsListCall {
4376 c.urlParams_.SetMulti("dataSourceIds", append([]string{}, dataSourceIds...))
4377 return c
4378 }
4379
4380
4381
4382 func (c *ProjectsTransferConfigsListCall) PageSize(pageSize int64) *ProjectsTransferConfigsListCall {
4383 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4384 return c
4385 }
4386
4387
4388
4389
4390
4391
4392 func (c *ProjectsTransferConfigsListCall) PageToken(pageToken string) *ProjectsTransferConfigsListCall {
4393 c.urlParams_.Set("pageToken", pageToken)
4394 return c
4395 }
4396
4397
4398
4399
4400 func (c *ProjectsTransferConfigsListCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsListCall {
4401 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4402 return c
4403 }
4404
4405
4406
4407
4408 func (c *ProjectsTransferConfigsListCall) IfNoneMatch(entityTag string) *ProjectsTransferConfigsListCall {
4409 c.ifNoneMatch_ = entityTag
4410 return c
4411 }
4412
4413
4414 func (c *ProjectsTransferConfigsListCall) Context(ctx context.Context) *ProjectsTransferConfigsListCall {
4415 c.ctx_ = ctx
4416 return c
4417 }
4418
4419
4420
4421 func (c *ProjectsTransferConfigsListCall) Header() http.Header {
4422 if c.header_ == nil {
4423 c.header_ = make(http.Header)
4424 }
4425 return c.header_
4426 }
4427
4428 func (c *ProjectsTransferConfigsListCall) doRequest(alt string) (*http.Response, error) {
4429 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4430 if c.ifNoneMatch_ != "" {
4431 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4432 }
4433 var body io.Reader = nil
4434 c.urlParams_.Set("alt", alt)
4435 c.urlParams_.Set("prettyPrint", "false")
4436 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/transferConfigs")
4437 urls += "?" + c.urlParams_.Encode()
4438 req, err := http.NewRequest("GET", urls, body)
4439 if err != nil {
4440 return nil, err
4441 }
4442 req.Header = reqHeaders
4443 googleapi.Expand(req.URL, map[string]string{
4444 "parent": c.parent,
4445 })
4446 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4447 }
4448
4449
4450
4451
4452
4453
4454
4455 func (c *ProjectsTransferConfigsListCall) Do(opts ...googleapi.CallOption) (*ListTransferConfigsResponse, error) {
4456 gensupport.SetOptions(c.urlParams_, opts...)
4457 res, err := c.doRequest("json")
4458 if res != nil && res.StatusCode == http.StatusNotModified {
4459 if res.Body != nil {
4460 res.Body.Close()
4461 }
4462 return nil, gensupport.WrapError(&googleapi.Error{
4463 Code: res.StatusCode,
4464 Header: res.Header,
4465 })
4466 }
4467 if err != nil {
4468 return nil, err
4469 }
4470 defer googleapi.CloseBody(res)
4471 if err := googleapi.CheckResponse(res); err != nil {
4472 return nil, gensupport.WrapError(err)
4473 }
4474 ret := &ListTransferConfigsResponse{
4475 ServerResponse: googleapi.ServerResponse{
4476 Header: res.Header,
4477 HTTPStatusCode: res.StatusCode,
4478 },
4479 }
4480 target := &ret
4481 if err := gensupport.DecodeResponse(target, res); err != nil {
4482 return nil, err
4483 }
4484 return ret, nil
4485 }
4486
4487
4488
4489
4490 func (c *ProjectsTransferConfigsListCall) Pages(ctx context.Context, f func(*ListTransferConfigsResponse) error) error {
4491 c.ctx_ = ctx
4492 defer c.PageToken(c.urlParams_.Get("pageToken"))
4493 for {
4494 x, err := c.Do()
4495 if err != nil {
4496 return err
4497 }
4498 if err := f(x); err != nil {
4499 return err
4500 }
4501 if x.NextPageToken == "" {
4502 return nil
4503 }
4504 c.PageToken(x.NextPageToken)
4505 }
4506 }
4507
4508 type ProjectsTransferConfigsPatchCall struct {
4509 s *Service
4510 name string
4511 transferconfig *TransferConfig
4512 urlParams_ gensupport.URLParams
4513 ctx_ context.Context
4514 header_ http.Header
4515 }
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526 func (r *ProjectsTransferConfigsService) Patch(name string, transferconfig *TransferConfig) *ProjectsTransferConfigsPatchCall {
4527 c := &ProjectsTransferConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4528 c.name = name
4529 c.transferconfig = transferconfig
4530 return c
4531 }
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543 func (c *ProjectsTransferConfigsPatchCall) AuthorizationCode(authorizationCode string) *ProjectsTransferConfigsPatchCall {
4544 c.urlParams_.Set("authorizationCode", authorizationCode)
4545 return c
4546 }
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556 func (c *ProjectsTransferConfigsPatchCall) ServiceAccountName(serviceAccountName string) *ProjectsTransferConfigsPatchCall {
4557 c.urlParams_.Set("serviceAccountName", serviceAccountName)
4558 return c
4559 }
4560
4561
4562
4563 func (c *ProjectsTransferConfigsPatchCall) UpdateMask(updateMask string) *ProjectsTransferConfigsPatchCall {
4564 c.urlParams_.Set("updateMask", updateMask)
4565 return c
4566 }
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578 func (c *ProjectsTransferConfigsPatchCall) VersionInfo(versionInfo string) *ProjectsTransferConfigsPatchCall {
4579 c.urlParams_.Set("versionInfo", versionInfo)
4580 return c
4581 }
4582
4583
4584
4585
4586 func (c *ProjectsTransferConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsPatchCall {
4587 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4588 return c
4589 }
4590
4591
4592 func (c *ProjectsTransferConfigsPatchCall) Context(ctx context.Context) *ProjectsTransferConfigsPatchCall {
4593 c.ctx_ = ctx
4594 return c
4595 }
4596
4597
4598
4599 func (c *ProjectsTransferConfigsPatchCall) Header() http.Header {
4600 if c.header_ == nil {
4601 c.header_ = make(http.Header)
4602 }
4603 return c.header_
4604 }
4605
4606 func (c *ProjectsTransferConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
4607 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4608 var body io.Reader = nil
4609 body, err := googleapi.WithoutDataWrapper.JSONReader(c.transferconfig)
4610 if err != nil {
4611 return nil, err
4612 }
4613 c.urlParams_.Set("alt", alt)
4614 c.urlParams_.Set("prettyPrint", "false")
4615 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4616 urls += "?" + c.urlParams_.Encode()
4617 req, err := http.NewRequest("PATCH", urls, body)
4618 if err != nil {
4619 return nil, err
4620 }
4621 req.Header = reqHeaders
4622 googleapi.Expand(req.URL, map[string]string{
4623 "name": c.name,
4624 })
4625 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4626 }
4627
4628
4629
4630
4631
4632
4633 func (c *ProjectsTransferConfigsPatchCall) Do(opts ...googleapi.CallOption) (*TransferConfig, error) {
4634 gensupport.SetOptions(c.urlParams_, opts...)
4635 res, err := c.doRequest("json")
4636 if res != nil && res.StatusCode == http.StatusNotModified {
4637 if res.Body != nil {
4638 res.Body.Close()
4639 }
4640 return nil, gensupport.WrapError(&googleapi.Error{
4641 Code: res.StatusCode,
4642 Header: res.Header,
4643 })
4644 }
4645 if err != nil {
4646 return nil, err
4647 }
4648 defer googleapi.CloseBody(res)
4649 if err := googleapi.CheckResponse(res); err != nil {
4650 return nil, gensupport.WrapError(err)
4651 }
4652 ret := &TransferConfig{
4653 ServerResponse: googleapi.ServerResponse{
4654 Header: res.Header,
4655 HTTPStatusCode: res.StatusCode,
4656 },
4657 }
4658 target := &ret
4659 if err := gensupport.DecodeResponse(target, res); err != nil {
4660 return nil, err
4661 }
4662 return ret, nil
4663 }
4664
4665 type ProjectsTransferConfigsScheduleRunsCall struct {
4666 s *Service
4667 parent string
4668 scheduletransferrunsrequest *ScheduleTransferRunsRequest
4669 urlParams_ gensupport.URLParams
4670 ctx_ context.Context
4671 header_ http.Header
4672 }
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683 func (r *ProjectsTransferConfigsService) ScheduleRuns(parent string, scheduletransferrunsrequest *ScheduleTransferRunsRequest) *ProjectsTransferConfigsScheduleRunsCall {
4684 c := &ProjectsTransferConfigsScheduleRunsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4685 c.parent = parent
4686 c.scheduletransferrunsrequest = scheduletransferrunsrequest
4687 return c
4688 }
4689
4690
4691
4692
4693 func (c *ProjectsTransferConfigsScheduleRunsCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsScheduleRunsCall {
4694 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4695 return c
4696 }
4697
4698
4699 func (c *ProjectsTransferConfigsScheduleRunsCall) Context(ctx context.Context) *ProjectsTransferConfigsScheduleRunsCall {
4700 c.ctx_ = ctx
4701 return c
4702 }
4703
4704
4705
4706 func (c *ProjectsTransferConfigsScheduleRunsCall) Header() http.Header {
4707 if c.header_ == nil {
4708 c.header_ = make(http.Header)
4709 }
4710 return c.header_
4711 }
4712
4713 func (c *ProjectsTransferConfigsScheduleRunsCall) doRequest(alt string) (*http.Response, error) {
4714 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4715 var body io.Reader = nil
4716 body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduletransferrunsrequest)
4717 if err != nil {
4718 return nil, err
4719 }
4720 c.urlParams_.Set("alt", alt)
4721 c.urlParams_.Set("prettyPrint", "false")
4722 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:scheduleRuns")
4723 urls += "?" + c.urlParams_.Encode()
4724 req, err := http.NewRequest("POST", urls, body)
4725 if err != nil {
4726 return nil, err
4727 }
4728 req.Header = reqHeaders
4729 googleapi.Expand(req.URL, map[string]string{
4730 "parent": c.parent,
4731 })
4732 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4733 }
4734
4735
4736
4737
4738
4739
4740
4741 func (c *ProjectsTransferConfigsScheduleRunsCall) Do(opts ...googleapi.CallOption) (*ScheduleTransferRunsResponse, error) {
4742 gensupport.SetOptions(c.urlParams_, opts...)
4743 res, err := c.doRequest("json")
4744 if res != nil && res.StatusCode == http.StatusNotModified {
4745 if res.Body != nil {
4746 res.Body.Close()
4747 }
4748 return nil, gensupport.WrapError(&googleapi.Error{
4749 Code: res.StatusCode,
4750 Header: res.Header,
4751 })
4752 }
4753 if err != nil {
4754 return nil, err
4755 }
4756 defer googleapi.CloseBody(res)
4757 if err := googleapi.CheckResponse(res); err != nil {
4758 return nil, gensupport.WrapError(err)
4759 }
4760 ret := &ScheduleTransferRunsResponse{
4761 ServerResponse: googleapi.ServerResponse{
4762 Header: res.Header,
4763 HTTPStatusCode: res.StatusCode,
4764 },
4765 }
4766 target := &ret
4767 if err := gensupport.DecodeResponse(target, res); err != nil {
4768 return nil, err
4769 }
4770 return ret, nil
4771 }
4772
4773 type ProjectsTransferConfigsStartManualRunsCall struct {
4774 s *Service
4775 parent string
4776 startmanualtransferrunsrequest *StartManualTransferRunsRequest
4777 urlParams_ gensupport.URLParams
4778 ctx_ context.Context
4779 header_ http.Header
4780 }
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791 func (r *ProjectsTransferConfigsService) StartManualRuns(parent string, startmanualtransferrunsrequest *StartManualTransferRunsRequest) *ProjectsTransferConfigsStartManualRunsCall {
4792 c := &ProjectsTransferConfigsStartManualRunsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4793 c.parent = parent
4794 c.startmanualtransferrunsrequest = startmanualtransferrunsrequest
4795 return c
4796 }
4797
4798
4799
4800
4801 func (c *ProjectsTransferConfigsStartManualRunsCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsStartManualRunsCall {
4802 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4803 return c
4804 }
4805
4806
4807 func (c *ProjectsTransferConfigsStartManualRunsCall) Context(ctx context.Context) *ProjectsTransferConfigsStartManualRunsCall {
4808 c.ctx_ = ctx
4809 return c
4810 }
4811
4812
4813
4814 func (c *ProjectsTransferConfigsStartManualRunsCall) Header() http.Header {
4815 if c.header_ == nil {
4816 c.header_ = make(http.Header)
4817 }
4818 return c.header_
4819 }
4820
4821 func (c *ProjectsTransferConfigsStartManualRunsCall) doRequest(alt string) (*http.Response, error) {
4822 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4823 var body io.Reader = nil
4824 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmanualtransferrunsrequest)
4825 if err != nil {
4826 return nil, err
4827 }
4828 c.urlParams_.Set("alt", alt)
4829 c.urlParams_.Set("prettyPrint", "false")
4830 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:startManualRuns")
4831 urls += "?" + c.urlParams_.Encode()
4832 req, err := http.NewRequest("POST", urls, body)
4833 if err != nil {
4834 return nil, err
4835 }
4836 req.Header = reqHeaders
4837 googleapi.Expand(req.URL, map[string]string{
4838 "parent": c.parent,
4839 })
4840 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4841 }
4842
4843
4844
4845
4846
4847
4848
4849 func (c *ProjectsTransferConfigsStartManualRunsCall) Do(opts ...googleapi.CallOption) (*StartManualTransferRunsResponse, error) {
4850 gensupport.SetOptions(c.urlParams_, opts...)
4851 res, err := c.doRequest("json")
4852 if res != nil && res.StatusCode == http.StatusNotModified {
4853 if res.Body != nil {
4854 res.Body.Close()
4855 }
4856 return nil, gensupport.WrapError(&googleapi.Error{
4857 Code: res.StatusCode,
4858 Header: res.Header,
4859 })
4860 }
4861 if err != nil {
4862 return nil, err
4863 }
4864 defer googleapi.CloseBody(res)
4865 if err := googleapi.CheckResponse(res); err != nil {
4866 return nil, gensupport.WrapError(err)
4867 }
4868 ret := &StartManualTransferRunsResponse{
4869 ServerResponse: googleapi.ServerResponse{
4870 Header: res.Header,
4871 HTTPStatusCode: res.StatusCode,
4872 },
4873 }
4874 target := &ret
4875 if err := gensupport.DecodeResponse(target, res); err != nil {
4876 return nil, err
4877 }
4878 return ret, nil
4879 }
4880
4881 type ProjectsTransferConfigsRunsDeleteCall struct {
4882 s *Service
4883 name string
4884 urlParams_ gensupport.URLParams
4885 ctx_ context.Context
4886 header_ http.Header
4887 }
4888
4889
4890
4891
4892
4893
4894
4895 func (r *ProjectsTransferConfigsRunsService) Delete(name string) *ProjectsTransferConfigsRunsDeleteCall {
4896 c := &ProjectsTransferConfigsRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4897 c.name = name
4898 return c
4899 }
4900
4901
4902
4903
4904 func (c *ProjectsTransferConfigsRunsDeleteCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsRunsDeleteCall {
4905 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4906 return c
4907 }
4908
4909
4910 func (c *ProjectsTransferConfigsRunsDeleteCall) Context(ctx context.Context) *ProjectsTransferConfigsRunsDeleteCall {
4911 c.ctx_ = ctx
4912 return c
4913 }
4914
4915
4916
4917 func (c *ProjectsTransferConfigsRunsDeleteCall) Header() http.Header {
4918 if c.header_ == nil {
4919 c.header_ = make(http.Header)
4920 }
4921 return c.header_
4922 }
4923
4924 func (c *ProjectsTransferConfigsRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
4925 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4926 var body io.Reader = nil
4927 c.urlParams_.Set("alt", alt)
4928 c.urlParams_.Set("prettyPrint", "false")
4929 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4930 urls += "?" + c.urlParams_.Encode()
4931 req, err := http.NewRequest("DELETE", urls, body)
4932 if err != nil {
4933 return nil, err
4934 }
4935 req.Header = reqHeaders
4936 googleapi.Expand(req.URL, map[string]string{
4937 "name": c.name,
4938 })
4939 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4940 }
4941
4942
4943
4944
4945
4946
4947 func (c *ProjectsTransferConfigsRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4948 gensupport.SetOptions(c.urlParams_, opts...)
4949 res, err := c.doRequest("json")
4950 if res != nil && res.StatusCode == http.StatusNotModified {
4951 if res.Body != nil {
4952 res.Body.Close()
4953 }
4954 return nil, gensupport.WrapError(&googleapi.Error{
4955 Code: res.StatusCode,
4956 Header: res.Header,
4957 })
4958 }
4959 if err != nil {
4960 return nil, err
4961 }
4962 defer googleapi.CloseBody(res)
4963 if err := googleapi.CheckResponse(res); err != nil {
4964 return nil, gensupport.WrapError(err)
4965 }
4966 ret := &Empty{
4967 ServerResponse: googleapi.ServerResponse{
4968 Header: res.Header,
4969 HTTPStatusCode: res.StatusCode,
4970 },
4971 }
4972 target := &ret
4973 if err := gensupport.DecodeResponse(target, res); err != nil {
4974 return nil, err
4975 }
4976 return ret, nil
4977 }
4978
4979 type ProjectsTransferConfigsRunsGetCall struct {
4980 s *Service
4981 name string
4982 urlParams_ gensupport.URLParams
4983 ifNoneMatch_ string
4984 ctx_ context.Context
4985 header_ http.Header
4986 }
4987
4988
4989
4990
4991
4992
4993
4994 func (r *ProjectsTransferConfigsRunsService) Get(name string) *ProjectsTransferConfigsRunsGetCall {
4995 c := &ProjectsTransferConfigsRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4996 c.name = name
4997 return c
4998 }
4999
5000
5001
5002
5003 func (c *ProjectsTransferConfigsRunsGetCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsRunsGetCall {
5004 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5005 return c
5006 }
5007
5008
5009
5010
5011 func (c *ProjectsTransferConfigsRunsGetCall) IfNoneMatch(entityTag string) *ProjectsTransferConfigsRunsGetCall {
5012 c.ifNoneMatch_ = entityTag
5013 return c
5014 }
5015
5016
5017 func (c *ProjectsTransferConfigsRunsGetCall) Context(ctx context.Context) *ProjectsTransferConfigsRunsGetCall {
5018 c.ctx_ = ctx
5019 return c
5020 }
5021
5022
5023
5024 func (c *ProjectsTransferConfigsRunsGetCall) Header() http.Header {
5025 if c.header_ == nil {
5026 c.header_ = make(http.Header)
5027 }
5028 return c.header_
5029 }
5030
5031 func (c *ProjectsTransferConfigsRunsGetCall) doRequest(alt string) (*http.Response, error) {
5032 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5033 if c.ifNoneMatch_ != "" {
5034 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5035 }
5036 var body io.Reader = nil
5037 c.urlParams_.Set("alt", alt)
5038 c.urlParams_.Set("prettyPrint", "false")
5039 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5040 urls += "?" + c.urlParams_.Encode()
5041 req, err := http.NewRequest("GET", urls, body)
5042 if err != nil {
5043 return nil, err
5044 }
5045 req.Header = reqHeaders
5046 googleapi.Expand(req.URL, map[string]string{
5047 "name": c.name,
5048 })
5049 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5050 }
5051
5052
5053
5054
5055
5056
5057 func (c *ProjectsTransferConfigsRunsGetCall) Do(opts ...googleapi.CallOption) (*TransferRun, error) {
5058 gensupport.SetOptions(c.urlParams_, opts...)
5059 res, err := c.doRequest("json")
5060 if res != nil && res.StatusCode == http.StatusNotModified {
5061 if res.Body != nil {
5062 res.Body.Close()
5063 }
5064 return nil, gensupport.WrapError(&googleapi.Error{
5065 Code: res.StatusCode,
5066 Header: res.Header,
5067 })
5068 }
5069 if err != nil {
5070 return nil, err
5071 }
5072 defer googleapi.CloseBody(res)
5073 if err := googleapi.CheckResponse(res); err != nil {
5074 return nil, gensupport.WrapError(err)
5075 }
5076 ret := &TransferRun{
5077 ServerResponse: googleapi.ServerResponse{
5078 Header: res.Header,
5079 HTTPStatusCode: res.StatusCode,
5080 },
5081 }
5082 target := &ret
5083 if err := gensupport.DecodeResponse(target, res); err != nil {
5084 return nil, err
5085 }
5086 return ret, nil
5087 }
5088
5089 type ProjectsTransferConfigsRunsListCall struct {
5090 s *Service
5091 parent string
5092 urlParams_ gensupport.URLParams
5093 ifNoneMatch_ string
5094 ctx_ context.Context
5095 header_ http.Header
5096 }
5097
5098
5099
5100
5101
5102
5103
5104
5105 func (r *ProjectsTransferConfigsRunsService) List(parent string) *ProjectsTransferConfigsRunsListCall {
5106 c := &ProjectsTransferConfigsRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5107 c.parent = parent
5108 return c
5109 }
5110
5111
5112
5113 func (c *ProjectsTransferConfigsRunsListCall) PageSize(pageSize int64) *ProjectsTransferConfigsRunsListCall {
5114 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5115 return c
5116 }
5117
5118
5119
5120
5121
5122
5123 func (c *ProjectsTransferConfigsRunsListCall) PageToken(pageToken string) *ProjectsTransferConfigsRunsListCall {
5124 c.urlParams_.Set("pageToken", pageToken)
5125 return c
5126 }
5127
5128
5129
5130
5131
5132
5133
5134
5135 func (c *ProjectsTransferConfigsRunsListCall) RunAttempt(runAttempt string) *ProjectsTransferConfigsRunsListCall {
5136 c.urlParams_.Set("runAttempt", runAttempt)
5137 return c
5138 }
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154 func (c *ProjectsTransferConfigsRunsListCall) States(states ...string) *ProjectsTransferConfigsRunsListCall {
5155 c.urlParams_.SetMulti("states", append([]string{}, states...))
5156 return c
5157 }
5158
5159
5160
5161
5162 func (c *ProjectsTransferConfigsRunsListCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsRunsListCall {
5163 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5164 return c
5165 }
5166
5167
5168
5169
5170 func (c *ProjectsTransferConfigsRunsListCall) IfNoneMatch(entityTag string) *ProjectsTransferConfigsRunsListCall {
5171 c.ifNoneMatch_ = entityTag
5172 return c
5173 }
5174
5175
5176 func (c *ProjectsTransferConfigsRunsListCall) Context(ctx context.Context) *ProjectsTransferConfigsRunsListCall {
5177 c.ctx_ = ctx
5178 return c
5179 }
5180
5181
5182
5183 func (c *ProjectsTransferConfigsRunsListCall) Header() http.Header {
5184 if c.header_ == nil {
5185 c.header_ = make(http.Header)
5186 }
5187 return c.header_
5188 }
5189
5190 func (c *ProjectsTransferConfigsRunsListCall) doRequest(alt string) (*http.Response, error) {
5191 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5192 if c.ifNoneMatch_ != "" {
5193 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5194 }
5195 var body io.Reader = nil
5196 c.urlParams_.Set("alt", alt)
5197 c.urlParams_.Set("prettyPrint", "false")
5198 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runs")
5199 urls += "?" + c.urlParams_.Encode()
5200 req, err := http.NewRequest("GET", urls, body)
5201 if err != nil {
5202 return nil, err
5203 }
5204 req.Header = reqHeaders
5205 googleapi.Expand(req.URL, map[string]string{
5206 "parent": c.parent,
5207 })
5208 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5209 }
5210
5211
5212
5213
5214
5215
5216
5217 func (c *ProjectsTransferConfigsRunsListCall) Do(opts ...googleapi.CallOption) (*ListTransferRunsResponse, error) {
5218 gensupport.SetOptions(c.urlParams_, opts...)
5219 res, err := c.doRequest("json")
5220 if res != nil && res.StatusCode == http.StatusNotModified {
5221 if res.Body != nil {
5222 res.Body.Close()
5223 }
5224 return nil, gensupport.WrapError(&googleapi.Error{
5225 Code: res.StatusCode,
5226 Header: res.Header,
5227 })
5228 }
5229 if err != nil {
5230 return nil, err
5231 }
5232 defer googleapi.CloseBody(res)
5233 if err := googleapi.CheckResponse(res); err != nil {
5234 return nil, gensupport.WrapError(err)
5235 }
5236 ret := &ListTransferRunsResponse{
5237 ServerResponse: googleapi.ServerResponse{
5238 Header: res.Header,
5239 HTTPStatusCode: res.StatusCode,
5240 },
5241 }
5242 target := &ret
5243 if err := gensupport.DecodeResponse(target, res); err != nil {
5244 return nil, err
5245 }
5246 return ret, nil
5247 }
5248
5249
5250
5251
5252 func (c *ProjectsTransferConfigsRunsListCall) Pages(ctx context.Context, f func(*ListTransferRunsResponse) error) error {
5253 c.ctx_ = ctx
5254 defer c.PageToken(c.urlParams_.Get("pageToken"))
5255 for {
5256 x, err := c.Do()
5257 if err != nil {
5258 return err
5259 }
5260 if err := f(x); err != nil {
5261 return err
5262 }
5263 if x.NextPageToken == "" {
5264 return nil
5265 }
5266 c.PageToken(x.NextPageToken)
5267 }
5268 }
5269
5270 type ProjectsTransferConfigsRunsTransferLogsListCall struct {
5271 s *Service
5272 parent string
5273 urlParams_ gensupport.URLParams
5274 ifNoneMatch_ string
5275 ctx_ context.Context
5276 header_ http.Header
5277 }
5278
5279
5280
5281
5282
5283
5284
5285 func (r *ProjectsTransferConfigsRunsTransferLogsService) List(parent string) *ProjectsTransferConfigsRunsTransferLogsListCall {
5286 c := &ProjectsTransferConfigsRunsTransferLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5287 c.parent = parent
5288 return c
5289 }
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) MessageTypes(messageTypes ...string) *ProjectsTransferConfigsRunsTransferLogsListCall {
5301 c.urlParams_.SetMulti("messageTypes", append([]string{}, messageTypes...))
5302 return c
5303 }
5304
5305
5306
5307 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) PageSize(pageSize int64) *ProjectsTransferConfigsRunsTransferLogsListCall {
5308 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5309 return c
5310 }
5311
5312
5313
5314
5315
5316
5317 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) PageToken(pageToken string) *ProjectsTransferConfigsRunsTransferLogsListCall {
5318 c.urlParams_.Set("pageToken", pageToken)
5319 return c
5320 }
5321
5322
5323
5324
5325 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) Fields(s ...googleapi.Field) *ProjectsTransferConfigsRunsTransferLogsListCall {
5326 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5327 return c
5328 }
5329
5330
5331
5332
5333 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) IfNoneMatch(entityTag string) *ProjectsTransferConfigsRunsTransferLogsListCall {
5334 c.ifNoneMatch_ = entityTag
5335 return c
5336 }
5337
5338
5339 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) Context(ctx context.Context) *ProjectsTransferConfigsRunsTransferLogsListCall {
5340 c.ctx_ = ctx
5341 return c
5342 }
5343
5344
5345
5346 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) Header() http.Header {
5347 if c.header_ == nil {
5348 c.header_ = make(http.Header)
5349 }
5350 return c.header_
5351 }
5352
5353 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) doRequest(alt string) (*http.Response, error) {
5354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5355 if c.ifNoneMatch_ != "" {
5356 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5357 }
5358 var body io.Reader = nil
5359 c.urlParams_.Set("alt", alt)
5360 c.urlParams_.Set("prettyPrint", "false")
5361 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/transferLogs")
5362 urls += "?" + c.urlParams_.Encode()
5363 req, err := http.NewRequest("GET", urls, body)
5364 if err != nil {
5365 return nil, err
5366 }
5367 req.Header = reqHeaders
5368 googleapi.Expand(req.URL, map[string]string{
5369 "parent": c.parent,
5370 })
5371 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5372 }
5373
5374
5375
5376
5377
5378
5379
5380 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) Do(opts ...googleapi.CallOption) (*ListTransferLogsResponse, error) {
5381 gensupport.SetOptions(c.urlParams_, opts...)
5382 res, err := c.doRequest("json")
5383 if res != nil && res.StatusCode == http.StatusNotModified {
5384 if res.Body != nil {
5385 res.Body.Close()
5386 }
5387 return nil, gensupport.WrapError(&googleapi.Error{
5388 Code: res.StatusCode,
5389 Header: res.Header,
5390 })
5391 }
5392 if err != nil {
5393 return nil, err
5394 }
5395 defer googleapi.CloseBody(res)
5396 if err := googleapi.CheckResponse(res); err != nil {
5397 return nil, gensupport.WrapError(err)
5398 }
5399 ret := &ListTransferLogsResponse{
5400 ServerResponse: googleapi.ServerResponse{
5401 Header: res.Header,
5402 HTTPStatusCode: res.StatusCode,
5403 },
5404 }
5405 target := &ret
5406 if err := gensupport.DecodeResponse(target, res); err != nil {
5407 return nil, err
5408 }
5409 return ret, nil
5410 }
5411
5412
5413
5414
5415 func (c *ProjectsTransferConfigsRunsTransferLogsListCall) Pages(ctx context.Context, f func(*ListTransferLogsResponse) error) error {
5416 c.ctx_ = ctx
5417 defer c.PageToken(c.urlParams_.Get("pageToken"))
5418 for {
5419 x, err := c.Do()
5420 if err != nil {
5421 return err
5422 }
5423 if err := f(x); err != nil {
5424 return err
5425 }
5426 if x.NextPageToken == "" {
5427 return nil
5428 }
5429 c.PageToken(x.NextPageToken)
5430 }
5431 }
5432
View as plain text