1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 package websecurityscanner
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "net/http"
61 "net/url"
62 "strconv"
63 "strings"
64
65 googleapi "google.golang.org/api/googleapi"
66 internal "google.golang.org/api/internal"
67 gensupport "google.golang.org/api/internal/gensupport"
68 option "google.golang.org/api/option"
69 internaloption "google.golang.org/api/option/internaloption"
70 htransport "google.golang.org/api/transport/http"
71 )
72
73
74
75 var _ = bytes.NewBuffer
76 var _ = strconv.Itoa
77 var _ = fmt.Sprintf
78 var _ = json.NewDecoder
79 var _ = io.Copy
80 var _ = url.Parse
81 var _ = gensupport.MarshalJSON
82 var _ = googleapi.Version
83 var _ = errors.New
84 var _ = strings.Replace
85 var _ = context.Canceled
86 var _ = internaloption.WithDefaultEndpoint
87 var _ = internal.Version
88
89 const apiId = "websecurityscanner:v1alpha"
90 const apiName = "websecurityscanner"
91 const apiVersion = "v1alpha"
92 const basePath = "https://websecurityscanner.googleapis.com/"
93 const basePathTemplate = "https://websecurityscanner.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://websecurityscanner.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.ScanConfigs = NewProjectsScanConfigsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 ScanConfigs *ProjectsScanConfigsService
167 }
168
169 func NewProjectsScanConfigsService(s *Service) *ProjectsScanConfigsService {
170 rs := &ProjectsScanConfigsService{s: s}
171 rs.ScanRuns = NewProjectsScanConfigsScanRunsService(s)
172 return rs
173 }
174
175 type ProjectsScanConfigsService struct {
176 s *Service
177
178 ScanRuns *ProjectsScanConfigsScanRunsService
179 }
180
181 func NewProjectsScanConfigsScanRunsService(s *Service) *ProjectsScanConfigsScanRunsService {
182 rs := &ProjectsScanConfigsScanRunsService{s: s}
183 rs.CrawledUrls = NewProjectsScanConfigsScanRunsCrawledUrlsService(s)
184 rs.FindingTypeStats = NewProjectsScanConfigsScanRunsFindingTypeStatsService(s)
185 rs.Findings = NewProjectsScanConfigsScanRunsFindingsService(s)
186 return rs
187 }
188
189 type ProjectsScanConfigsScanRunsService struct {
190 s *Service
191
192 CrawledUrls *ProjectsScanConfigsScanRunsCrawledUrlsService
193
194 FindingTypeStats *ProjectsScanConfigsScanRunsFindingTypeStatsService
195
196 Findings *ProjectsScanConfigsScanRunsFindingsService
197 }
198
199 func NewProjectsScanConfigsScanRunsCrawledUrlsService(s *Service) *ProjectsScanConfigsScanRunsCrawledUrlsService {
200 rs := &ProjectsScanConfigsScanRunsCrawledUrlsService{s: s}
201 return rs
202 }
203
204 type ProjectsScanConfigsScanRunsCrawledUrlsService struct {
205 s *Service
206 }
207
208 func NewProjectsScanConfigsScanRunsFindingTypeStatsService(s *Service) *ProjectsScanConfigsScanRunsFindingTypeStatsService {
209 rs := &ProjectsScanConfigsScanRunsFindingTypeStatsService{s: s}
210 return rs
211 }
212
213 type ProjectsScanConfigsScanRunsFindingTypeStatsService struct {
214 s *Service
215 }
216
217 func NewProjectsScanConfigsScanRunsFindingsService(s *Service) *ProjectsScanConfigsScanRunsFindingsService {
218 rs := &ProjectsScanConfigsScanRunsFindingsService{s: s}
219 return rs
220 }
221
222 type ProjectsScanConfigsScanRunsFindingsService struct {
223 s *Service
224 }
225
226
227 type Authentication struct {
228
229 CustomAccount *CustomAccount `json:"customAccount,omitempty"`
230
231 GoogleAccount *GoogleAccount `json:"googleAccount,omitempty"`
232
233
234
235
236
237 ForceSendFields []string `json:"-"`
238
239
240
241
242 NullFields []string `json:"-"`
243 }
244
245 func (s *Authentication) MarshalJSON() ([]byte, error) {
246 type NoMethod Authentication
247 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
248 }
249
250
251
252
253 type CrawledUrl struct {
254
255 Body string `json:"body,omitempty"`
256
257
258 HttpMethod string `json:"httpMethod,omitempty"`
259
260 Url string `json:"url,omitempty"`
261
262
263
264
265
266 ForceSendFields []string `json:"-"`
267
268
269
270
271 NullFields []string `json:"-"`
272 }
273
274 func (s *CrawledUrl) MarshalJSON() ([]byte, error) {
275 type NoMethod CrawledUrl
276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
277 }
278
279
280
281 type CustomAccount struct {
282
283 LoginUrl string `json:"loginUrl,omitempty"`
284
285
286
287 Password string `json:"password,omitempty"`
288
289 Username string `json:"username,omitempty"`
290
291
292
293
294
295 ForceSendFields []string `json:"-"`
296
297
298
299
300 NullFields []string `json:"-"`
301 }
302
303 func (s *CustomAccount) MarshalJSON() ([]byte, error) {
304 type NoMethod CustomAccount
305 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
306 }
307
308
309
310
311
312 type Empty struct {
313
314 googleapi.ServerResponse `json:"-"`
315 }
316
317
318
319 type Finding struct {
320
321 Body string `json:"body,omitempty"`
322
323 Description string `json:"description,omitempty"`
324
325
326 FinalUrl string `json:"finalUrl,omitempty"`
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378 FindingType string `json:"findingType,omitempty"`
379
380
381 FrameUrl string `json:"frameUrl,omitempty"`
382
383
384 FuzzedUrl string `json:"fuzzedUrl,omitempty"`
385
386
387 HttpMethod string `json:"httpMethod,omitempty"`
388
389
390
391 Name string `json:"name,omitempty"`
392
393 OutdatedLibrary *OutdatedLibrary `json:"outdatedLibrary,omitempty"`
394
395
396 ReproductionUrl string `json:"reproductionUrl,omitempty"`
397
398
399 TrackingId string `json:"trackingId,omitempty"`
400
401
402
403 ViolatingResource *ViolatingResource `json:"violatingResource,omitempty"`
404
405
406 VulnerableHeaders *VulnerableHeaders `json:"vulnerableHeaders,omitempty"`
407
408
409 VulnerableParameters *VulnerableParameters `json:"vulnerableParameters,omitempty"`
410
411 Xss *Xss `json:"xss,omitempty"`
412
413
414 googleapi.ServerResponse `json:"-"`
415
416
417
418
419
420 ForceSendFields []string `json:"-"`
421
422
423
424
425 NullFields []string `json:"-"`
426 }
427
428 func (s *Finding) MarshalJSON() ([]byte, error) {
429 type NoMethod Finding
430 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
431 }
432
433
434
435 type FindingTypeStats struct {
436
437 FindingCount int64 `json:"findingCount,omitempty"`
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489 FindingType string `json:"findingType,omitempty"`
490
491
492
493
494
495 ForceSendFields []string `json:"-"`
496
497
498
499
500 NullFields []string `json:"-"`
501 }
502
503 func (s *FindingTypeStats) MarshalJSON() ([]byte, error) {
504 type NoMethod FindingTypeStats
505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
506 }
507
508
509
510 type GoogleAccount struct {
511
512
513
514 Password string `json:"password,omitempty"`
515
516 Username string `json:"username,omitempty"`
517
518
519
520
521
522 ForceSendFields []string `json:"-"`
523
524
525
526
527 NullFields []string `json:"-"`
528 }
529
530 func (s *GoogleAccount) MarshalJSON() ([]byte, error) {
531 type NoMethod GoogleAccount
532 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
533 }
534
535
536 type Header struct {
537
538 Name string `json:"name,omitempty"`
539
540 Value string `json:"value,omitempty"`
541
542
543
544
545
546 ForceSendFields []string `json:"-"`
547
548
549
550
551 NullFields []string `json:"-"`
552 }
553
554 func (s *Header) MarshalJSON() ([]byte, error) {
555 type NoMethod Header
556 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
557 }
558
559
560 type ListCrawledUrlsResponse struct {
561
562 CrawledUrls []*CrawledUrl `json:"crawledUrls,omitempty"`
563
564
565 NextPageToken string `json:"nextPageToken,omitempty"`
566
567
568 googleapi.ServerResponse `json:"-"`
569
570
571
572
573
574 ForceSendFields []string `json:"-"`
575
576
577
578
579 NullFields []string `json:"-"`
580 }
581
582 func (s *ListCrawledUrlsResponse) MarshalJSON() ([]byte, error) {
583 type NoMethod ListCrawledUrlsResponse
584 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
585 }
586
587
588
589 type ListFindingTypeStatsResponse struct {
590
591 FindingTypeStats []*FindingTypeStats `json:"findingTypeStats,omitempty"`
592
593
594 googleapi.ServerResponse `json:"-"`
595
596
597
598
599
600 ForceSendFields []string `json:"-"`
601
602
603
604
605 NullFields []string `json:"-"`
606 }
607
608 func (s *ListFindingTypeStatsResponse) MarshalJSON() ([]byte, error) {
609 type NoMethod ListFindingTypeStatsResponse
610 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
611 }
612
613
614 type ListFindingsResponse struct {
615
616 Findings []*Finding `json:"findings,omitempty"`
617
618
619 NextPageToken string `json:"nextPageToken,omitempty"`
620
621
622 googleapi.ServerResponse `json:"-"`
623
624
625
626
627
628 ForceSendFields []string `json:"-"`
629
630
631
632
633 NullFields []string `json:"-"`
634 }
635
636 func (s *ListFindingsResponse) MarshalJSON() ([]byte, error) {
637 type NoMethod ListFindingsResponse
638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
639 }
640
641
642 type ListScanConfigsResponse struct {
643
644
645 NextPageToken string `json:"nextPageToken,omitempty"`
646
647 ScanConfigs []*ScanConfig `json:"scanConfigs,omitempty"`
648
649
650 googleapi.ServerResponse `json:"-"`
651
652
653
654
655
656 ForceSendFields []string `json:"-"`
657
658
659
660
661 NullFields []string `json:"-"`
662 }
663
664 func (s *ListScanConfigsResponse) MarshalJSON() ([]byte, error) {
665 type NoMethod ListScanConfigsResponse
666 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
667 }
668
669
670 type ListScanRunsResponse struct {
671
672
673 NextPageToken string `json:"nextPageToken,omitempty"`
674
675 ScanRuns []*ScanRun `json:"scanRuns,omitempty"`
676
677
678 googleapi.ServerResponse `json:"-"`
679
680
681
682
683
684 ForceSendFields []string `json:"-"`
685
686
687
688
689 NullFields []string `json:"-"`
690 }
691
692 func (s *ListScanRunsResponse) MarshalJSON() ([]byte, error) {
693 type NoMethod ListScanRunsResponse
694 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
695 }
696
697
698 type OutdatedLibrary struct {
699
700
701 LearnMoreUrls []string `json:"learnMoreUrls,omitempty"`
702
703 LibraryName string `json:"libraryName,omitempty"`
704
705 Version string `json:"version,omitempty"`
706
707
708
709
710
711 ForceSendFields []string `json:"-"`
712
713
714
715
716 NullFields []string `json:"-"`
717 }
718
719 func (s *OutdatedLibrary) MarshalJSON() ([]byte, error) {
720 type NoMethod OutdatedLibrary
721 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
722 }
723
724
725
726 type ScanConfig struct {
727
728
729 Authentication *Authentication `json:"authentication,omitempty"`
730
731
732 BlacklistPatterns []string `json:"blacklistPatterns,omitempty"`
733
734 DisplayName string `json:"displayName,omitempty"`
735
736 LatestRun *ScanRun `json:"latestRun,omitempty"`
737
738
739
740
741 MaxQps int64 `json:"maxQps,omitempty"`
742
743
744
745 Name string `json:"name,omitempty"`
746
747 Schedule *Schedule `json:"schedule,omitempty"`
748
749
750 StartingUrls []string `json:"startingUrls,omitempty"`
751
752
753
754
755
756
757
758
759
760
761 TargetPlatforms []string `json:"targetPlatforms,omitempty"`
762
763
764
765
766
767
768
769
770
771 UserAgent string `json:"userAgent,omitempty"`
772
773
774 googleapi.ServerResponse `json:"-"`
775
776
777
778
779
780 ForceSendFields []string `json:"-"`
781
782
783
784
785 NullFields []string `json:"-"`
786 }
787
788 func (s *ScanConfig) MarshalJSON() ([]byte, error) {
789 type NoMethod ScanConfig
790 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
791 }
792
793
794
795 type ScanRun struct {
796
797
798 EndTime string `json:"endTime,omitempty"`
799
800
801
802
803
804
805
806
807 ExecutionState string `json:"executionState,omitempty"`
808
809 HasVulnerabilities bool `json:"hasVulnerabilities,omitempty"`
810
811
812
813 Name string `json:"name,omitempty"`
814
815
816
817 ProgressPercent int64 `json:"progressPercent,omitempty"`
818
819
820
821
822
823
824
825
826
827 ResultState string `json:"resultState,omitempty"`
828
829 StartTime string `json:"startTime,omitempty"`
830
831
832
833 UrlsCrawledCount int64 `json:"urlsCrawledCount,omitempty,string"`
834
835
836
837
838 UrlsTestedCount int64 `json:"urlsTestedCount,omitempty,string"`
839
840
841 googleapi.ServerResponse `json:"-"`
842
843
844
845
846
847 ForceSendFields []string `json:"-"`
848
849
850
851
852 NullFields []string `json:"-"`
853 }
854
855 func (s *ScanRun) MarshalJSON() ([]byte, error) {
856 type NoMethod ScanRun
857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
858 }
859
860
861 type Schedule struct {
862
863
864 IntervalDurationDays int64 `json:"intervalDurationDays,omitempty"`
865
866
867
868
869 ScheduleTime string `json:"scheduleTime,omitempty"`
870
871
872
873
874
875 ForceSendFields []string `json:"-"`
876
877
878
879
880 NullFields []string `json:"-"`
881 }
882
883 func (s *Schedule) MarshalJSON() ([]byte, error) {
884 type NoMethod Schedule
885 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
886 }
887
888
889 type StartScanRunRequest struct {
890 }
891
892
893 type StopScanRunRequest struct {
894 }
895
896
897
898 type ViolatingResource struct {
899
900 ContentType string `json:"contentType,omitempty"`
901
902 ResourceUrl string `json:"resourceUrl,omitempty"`
903
904
905
906
907
908 ForceSendFields []string `json:"-"`
909
910
911
912
913 NullFields []string `json:"-"`
914 }
915
916 func (s *ViolatingResource) MarshalJSON() ([]byte, error) {
917 type NoMethod ViolatingResource
918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
919 }
920
921
922 type VulnerableHeaders struct {
923
924 Headers []*Header `json:"headers,omitempty"`
925
926 MissingHeaders []*Header `json:"missingHeaders,omitempty"`
927
928
929
930
931
932 ForceSendFields []string `json:"-"`
933
934
935
936
937 NullFields []string `json:"-"`
938 }
939
940 func (s *VulnerableHeaders) MarshalJSON() ([]byte, error) {
941 type NoMethod VulnerableHeaders
942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
943 }
944
945
946 type VulnerableParameters struct {
947
948 ParameterNames []string `json:"parameterNames,omitempty"`
949
950
951
952
953
954 ForceSendFields []string `json:"-"`
955
956
957
958
959 NullFields []string `json:"-"`
960 }
961
962 func (s *VulnerableParameters) MarshalJSON() ([]byte, error) {
963 type NoMethod VulnerableParameters
964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
965 }
966
967
968 type Xss struct {
969
970 ErrorMessage string `json:"errorMessage,omitempty"`
971
972 StackTraces []string `json:"stackTraces,omitempty"`
973
974
975
976
977
978 ForceSendFields []string `json:"-"`
979
980
981
982
983 NullFields []string `json:"-"`
984 }
985
986 func (s *Xss) MarshalJSON() ([]byte, error) {
987 type NoMethod Xss
988 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
989 }
990
991 type ProjectsScanConfigsCreateCall struct {
992 s *Service
993 parent string
994 scanconfig *ScanConfig
995 urlParams_ gensupport.URLParams
996 ctx_ context.Context
997 header_ http.Header
998 }
999
1000
1001
1002
1003
1004 func (r *ProjectsScanConfigsService) Create(parent string, scanconfig *ScanConfig) *ProjectsScanConfigsCreateCall {
1005 c := &ProjectsScanConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1006 c.parent = parent
1007 c.scanconfig = scanconfig
1008 return c
1009 }
1010
1011
1012
1013
1014 func (c *ProjectsScanConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsCreateCall {
1015 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1016 return c
1017 }
1018
1019
1020 func (c *ProjectsScanConfigsCreateCall) Context(ctx context.Context) *ProjectsScanConfigsCreateCall {
1021 c.ctx_ = ctx
1022 return c
1023 }
1024
1025
1026
1027 func (c *ProjectsScanConfigsCreateCall) Header() http.Header {
1028 if c.header_ == nil {
1029 c.header_ = make(http.Header)
1030 }
1031 return c.header_
1032 }
1033
1034 func (c *ProjectsScanConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
1035 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1036 var body io.Reader = nil
1037 body, err := googleapi.WithoutDataWrapper.JSONReader(c.scanconfig)
1038 if err != nil {
1039 return nil, err
1040 }
1041 c.urlParams_.Set("alt", alt)
1042 c.urlParams_.Set("prettyPrint", "false")
1043 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scanConfigs")
1044 urls += "?" + c.urlParams_.Encode()
1045 req, err := http.NewRequest("POST", urls, body)
1046 if err != nil {
1047 return nil, err
1048 }
1049 req.Header = reqHeaders
1050 googleapi.Expand(req.URL, map[string]string{
1051 "parent": c.parent,
1052 })
1053 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1054 }
1055
1056
1057
1058
1059
1060
1061 func (c *ProjectsScanConfigsCreateCall) Do(opts ...googleapi.CallOption) (*ScanConfig, error) {
1062 gensupport.SetOptions(c.urlParams_, opts...)
1063 res, err := c.doRequest("json")
1064 if res != nil && res.StatusCode == http.StatusNotModified {
1065 if res.Body != nil {
1066 res.Body.Close()
1067 }
1068 return nil, gensupport.WrapError(&googleapi.Error{
1069 Code: res.StatusCode,
1070 Header: res.Header,
1071 })
1072 }
1073 if err != nil {
1074 return nil, err
1075 }
1076 defer googleapi.CloseBody(res)
1077 if err := googleapi.CheckResponse(res); err != nil {
1078 return nil, gensupport.WrapError(err)
1079 }
1080 ret := &ScanConfig{
1081 ServerResponse: googleapi.ServerResponse{
1082 Header: res.Header,
1083 HTTPStatusCode: res.StatusCode,
1084 },
1085 }
1086 target := &ret
1087 if err := gensupport.DecodeResponse(target, res); err != nil {
1088 return nil, err
1089 }
1090 return ret, nil
1091 }
1092
1093 type ProjectsScanConfigsDeleteCall struct {
1094 s *Service
1095 name string
1096 urlParams_ gensupport.URLParams
1097 ctx_ context.Context
1098 header_ http.Header
1099 }
1100
1101
1102
1103
1104
1105 func (r *ProjectsScanConfigsService) Delete(name string) *ProjectsScanConfigsDeleteCall {
1106 c := &ProjectsScanConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1107 c.name = name
1108 return c
1109 }
1110
1111
1112
1113
1114 func (c *ProjectsScanConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsDeleteCall {
1115 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1116 return c
1117 }
1118
1119
1120 func (c *ProjectsScanConfigsDeleteCall) Context(ctx context.Context) *ProjectsScanConfigsDeleteCall {
1121 c.ctx_ = ctx
1122 return c
1123 }
1124
1125
1126
1127 func (c *ProjectsScanConfigsDeleteCall) Header() http.Header {
1128 if c.header_ == nil {
1129 c.header_ = make(http.Header)
1130 }
1131 return c.header_
1132 }
1133
1134 func (c *ProjectsScanConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
1135 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1136 var body io.Reader = nil
1137 c.urlParams_.Set("alt", alt)
1138 c.urlParams_.Set("prettyPrint", "false")
1139 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
1140 urls += "?" + c.urlParams_.Encode()
1141 req, err := http.NewRequest("DELETE", urls, body)
1142 if err != nil {
1143 return nil, err
1144 }
1145 req.Header = reqHeaders
1146 googleapi.Expand(req.URL, map[string]string{
1147 "name": c.name,
1148 })
1149 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1150 }
1151
1152
1153
1154
1155
1156
1157 func (c *ProjectsScanConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
1158 gensupport.SetOptions(c.urlParams_, opts...)
1159 res, err := c.doRequest("json")
1160 if res != nil && res.StatusCode == http.StatusNotModified {
1161 if res.Body != nil {
1162 res.Body.Close()
1163 }
1164 return nil, gensupport.WrapError(&googleapi.Error{
1165 Code: res.StatusCode,
1166 Header: res.Header,
1167 })
1168 }
1169 if err != nil {
1170 return nil, err
1171 }
1172 defer googleapi.CloseBody(res)
1173 if err := googleapi.CheckResponse(res); err != nil {
1174 return nil, gensupport.WrapError(err)
1175 }
1176 ret := &Empty{
1177 ServerResponse: googleapi.ServerResponse{
1178 Header: res.Header,
1179 HTTPStatusCode: res.StatusCode,
1180 },
1181 }
1182 target := &ret
1183 if err := gensupport.DecodeResponse(target, res); err != nil {
1184 return nil, err
1185 }
1186 return ret, nil
1187 }
1188
1189 type ProjectsScanConfigsGetCall struct {
1190 s *Service
1191 name string
1192 urlParams_ gensupport.URLParams
1193 ifNoneMatch_ string
1194 ctx_ context.Context
1195 header_ http.Header
1196 }
1197
1198
1199
1200
1201
1202 func (r *ProjectsScanConfigsService) Get(name string) *ProjectsScanConfigsGetCall {
1203 c := &ProjectsScanConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1204 c.name = name
1205 return c
1206 }
1207
1208
1209
1210
1211 func (c *ProjectsScanConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsGetCall {
1212 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1213 return c
1214 }
1215
1216
1217
1218
1219 func (c *ProjectsScanConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsGetCall {
1220 c.ifNoneMatch_ = entityTag
1221 return c
1222 }
1223
1224
1225 func (c *ProjectsScanConfigsGetCall) Context(ctx context.Context) *ProjectsScanConfigsGetCall {
1226 c.ctx_ = ctx
1227 return c
1228 }
1229
1230
1231
1232 func (c *ProjectsScanConfigsGetCall) Header() http.Header {
1233 if c.header_ == nil {
1234 c.header_ = make(http.Header)
1235 }
1236 return c.header_
1237 }
1238
1239 func (c *ProjectsScanConfigsGetCall) doRequest(alt string) (*http.Response, error) {
1240 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1241 if c.ifNoneMatch_ != "" {
1242 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1243 }
1244 var body io.Reader = nil
1245 c.urlParams_.Set("alt", alt)
1246 c.urlParams_.Set("prettyPrint", "false")
1247 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
1248 urls += "?" + c.urlParams_.Encode()
1249 req, err := http.NewRequest("GET", urls, body)
1250 if err != nil {
1251 return nil, err
1252 }
1253 req.Header = reqHeaders
1254 googleapi.Expand(req.URL, map[string]string{
1255 "name": c.name,
1256 })
1257 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1258 }
1259
1260
1261
1262
1263
1264
1265 func (c *ProjectsScanConfigsGetCall) Do(opts ...googleapi.CallOption) (*ScanConfig, error) {
1266 gensupport.SetOptions(c.urlParams_, opts...)
1267 res, err := c.doRequest("json")
1268 if res != nil && res.StatusCode == http.StatusNotModified {
1269 if res.Body != nil {
1270 res.Body.Close()
1271 }
1272 return nil, gensupport.WrapError(&googleapi.Error{
1273 Code: res.StatusCode,
1274 Header: res.Header,
1275 })
1276 }
1277 if err != nil {
1278 return nil, err
1279 }
1280 defer googleapi.CloseBody(res)
1281 if err := googleapi.CheckResponse(res); err != nil {
1282 return nil, gensupport.WrapError(err)
1283 }
1284 ret := &ScanConfig{
1285 ServerResponse: googleapi.ServerResponse{
1286 Header: res.Header,
1287 HTTPStatusCode: res.StatusCode,
1288 },
1289 }
1290 target := &ret
1291 if err := gensupport.DecodeResponse(target, res); err != nil {
1292 return nil, err
1293 }
1294 return ret, nil
1295 }
1296
1297 type ProjectsScanConfigsListCall struct {
1298 s *Service
1299 parent string
1300 urlParams_ gensupport.URLParams
1301 ifNoneMatch_ string
1302 ctx_ context.Context
1303 header_ http.Header
1304 }
1305
1306
1307
1308
1309
1310 func (r *ProjectsScanConfigsService) List(parent string) *ProjectsScanConfigsListCall {
1311 c := &ProjectsScanConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1312 c.parent = parent
1313 return c
1314 }
1315
1316
1317
1318
1319 func (c *ProjectsScanConfigsListCall) PageSize(pageSize int64) *ProjectsScanConfigsListCall {
1320 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1321 return c
1322 }
1323
1324
1325
1326
1327
1328 func (c *ProjectsScanConfigsListCall) PageToken(pageToken string) *ProjectsScanConfigsListCall {
1329 c.urlParams_.Set("pageToken", pageToken)
1330 return c
1331 }
1332
1333
1334
1335
1336 func (c *ProjectsScanConfigsListCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsListCall {
1337 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1338 return c
1339 }
1340
1341
1342
1343
1344 func (c *ProjectsScanConfigsListCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsListCall {
1345 c.ifNoneMatch_ = entityTag
1346 return c
1347 }
1348
1349
1350 func (c *ProjectsScanConfigsListCall) Context(ctx context.Context) *ProjectsScanConfigsListCall {
1351 c.ctx_ = ctx
1352 return c
1353 }
1354
1355
1356
1357 func (c *ProjectsScanConfigsListCall) Header() http.Header {
1358 if c.header_ == nil {
1359 c.header_ = make(http.Header)
1360 }
1361 return c.header_
1362 }
1363
1364 func (c *ProjectsScanConfigsListCall) doRequest(alt string) (*http.Response, error) {
1365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1366 if c.ifNoneMatch_ != "" {
1367 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1368 }
1369 var body io.Reader = nil
1370 c.urlParams_.Set("alt", alt)
1371 c.urlParams_.Set("prettyPrint", "false")
1372 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scanConfigs")
1373 urls += "?" + c.urlParams_.Encode()
1374 req, err := http.NewRequest("GET", urls, body)
1375 if err != nil {
1376 return nil, err
1377 }
1378 req.Header = reqHeaders
1379 googleapi.Expand(req.URL, map[string]string{
1380 "parent": c.parent,
1381 })
1382 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1383 }
1384
1385
1386
1387
1388
1389
1390
1391 func (c *ProjectsScanConfigsListCall) Do(opts ...googleapi.CallOption) (*ListScanConfigsResponse, error) {
1392 gensupport.SetOptions(c.urlParams_, opts...)
1393 res, err := c.doRequest("json")
1394 if res != nil && res.StatusCode == http.StatusNotModified {
1395 if res.Body != nil {
1396 res.Body.Close()
1397 }
1398 return nil, gensupport.WrapError(&googleapi.Error{
1399 Code: res.StatusCode,
1400 Header: res.Header,
1401 })
1402 }
1403 if err != nil {
1404 return nil, err
1405 }
1406 defer googleapi.CloseBody(res)
1407 if err := googleapi.CheckResponse(res); err != nil {
1408 return nil, gensupport.WrapError(err)
1409 }
1410 ret := &ListScanConfigsResponse{
1411 ServerResponse: googleapi.ServerResponse{
1412 Header: res.Header,
1413 HTTPStatusCode: res.StatusCode,
1414 },
1415 }
1416 target := &ret
1417 if err := gensupport.DecodeResponse(target, res); err != nil {
1418 return nil, err
1419 }
1420 return ret, nil
1421 }
1422
1423
1424
1425
1426 func (c *ProjectsScanConfigsListCall) Pages(ctx context.Context, f func(*ListScanConfigsResponse) error) error {
1427 c.ctx_ = ctx
1428 defer c.PageToken(c.urlParams_.Get("pageToken"))
1429 for {
1430 x, err := c.Do()
1431 if err != nil {
1432 return err
1433 }
1434 if err := f(x); err != nil {
1435 return err
1436 }
1437 if x.NextPageToken == "" {
1438 return nil
1439 }
1440 c.PageToken(x.NextPageToken)
1441 }
1442 }
1443
1444 type ProjectsScanConfigsPatchCall struct {
1445 s *Service
1446 name string
1447 scanconfig *ScanConfig
1448 urlParams_ gensupport.URLParams
1449 ctx_ context.Context
1450 header_ http.Header
1451 }
1452
1453
1454
1455
1456
1457
1458
1459 func (r *ProjectsScanConfigsService) Patch(name string, scanconfig *ScanConfig) *ProjectsScanConfigsPatchCall {
1460 c := &ProjectsScanConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1461 c.name = name
1462 c.scanconfig = scanconfig
1463 return c
1464 }
1465
1466
1467
1468
1469 func (c *ProjectsScanConfigsPatchCall) UpdateMask(updateMask string) *ProjectsScanConfigsPatchCall {
1470 c.urlParams_.Set("updateMask", updateMask)
1471 return c
1472 }
1473
1474
1475
1476
1477 func (c *ProjectsScanConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsPatchCall {
1478 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1479 return c
1480 }
1481
1482
1483 func (c *ProjectsScanConfigsPatchCall) Context(ctx context.Context) *ProjectsScanConfigsPatchCall {
1484 c.ctx_ = ctx
1485 return c
1486 }
1487
1488
1489
1490 func (c *ProjectsScanConfigsPatchCall) Header() http.Header {
1491 if c.header_ == nil {
1492 c.header_ = make(http.Header)
1493 }
1494 return c.header_
1495 }
1496
1497 func (c *ProjectsScanConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
1498 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1499 var body io.Reader = nil
1500 body, err := googleapi.WithoutDataWrapper.JSONReader(c.scanconfig)
1501 if err != nil {
1502 return nil, err
1503 }
1504 c.urlParams_.Set("alt", alt)
1505 c.urlParams_.Set("prettyPrint", "false")
1506 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
1507 urls += "?" + c.urlParams_.Encode()
1508 req, err := http.NewRequest("PATCH", urls, body)
1509 if err != nil {
1510 return nil, err
1511 }
1512 req.Header = reqHeaders
1513 googleapi.Expand(req.URL, map[string]string{
1514 "name": c.name,
1515 })
1516 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1517 }
1518
1519
1520
1521
1522
1523
1524 func (c *ProjectsScanConfigsPatchCall) Do(opts ...googleapi.CallOption) (*ScanConfig, error) {
1525 gensupport.SetOptions(c.urlParams_, opts...)
1526 res, err := c.doRequest("json")
1527 if res != nil && res.StatusCode == http.StatusNotModified {
1528 if res.Body != nil {
1529 res.Body.Close()
1530 }
1531 return nil, gensupport.WrapError(&googleapi.Error{
1532 Code: res.StatusCode,
1533 Header: res.Header,
1534 })
1535 }
1536 if err != nil {
1537 return nil, err
1538 }
1539 defer googleapi.CloseBody(res)
1540 if err := googleapi.CheckResponse(res); err != nil {
1541 return nil, gensupport.WrapError(err)
1542 }
1543 ret := &ScanConfig{
1544 ServerResponse: googleapi.ServerResponse{
1545 Header: res.Header,
1546 HTTPStatusCode: res.StatusCode,
1547 },
1548 }
1549 target := &ret
1550 if err := gensupport.DecodeResponse(target, res); err != nil {
1551 return nil, err
1552 }
1553 return ret, nil
1554 }
1555
1556 type ProjectsScanConfigsStartCall struct {
1557 s *Service
1558 name string
1559 startscanrunrequest *StartScanRunRequest
1560 urlParams_ gensupport.URLParams
1561 ctx_ context.Context
1562 header_ http.Header
1563 }
1564
1565
1566
1567
1568
1569 func (r *ProjectsScanConfigsService) Start(name string, startscanrunrequest *StartScanRunRequest) *ProjectsScanConfigsStartCall {
1570 c := &ProjectsScanConfigsStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1571 c.name = name
1572 c.startscanrunrequest = startscanrunrequest
1573 return c
1574 }
1575
1576
1577
1578
1579 func (c *ProjectsScanConfigsStartCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsStartCall {
1580 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1581 return c
1582 }
1583
1584
1585 func (c *ProjectsScanConfigsStartCall) Context(ctx context.Context) *ProjectsScanConfigsStartCall {
1586 c.ctx_ = ctx
1587 return c
1588 }
1589
1590
1591
1592 func (c *ProjectsScanConfigsStartCall) Header() http.Header {
1593 if c.header_ == nil {
1594 c.header_ = make(http.Header)
1595 }
1596 return c.header_
1597 }
1598
1599 func (c *ProjectsScanConfigsStartCall) doRequest(alt string) (*http.Response, error) {
1600 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1601 var body io.Reader = nil
1602 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startscanrunrequest)
1603 if err != nil {
1604 return nil, err
1605 }
1606 c.urlParams_.Set("alt", alt)
1607 c.urlParams_.Set("prettyPrint", "false")
1608 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:start")
1609 urls += "?" + c.urlParams_.Encode()
1610 req, err := http.NewRequest("POST", urls, body)
1611 if err != nil {
1612 return nil, err
1613 }
1614 req.Header = reqHeaders
1615 googleapi.Expand(req.URL, map[string]string{
1616 "name": c.name,
1617 })
1618 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1619 }
1620
1621
1622
1623
1624
1625
1626 func (c *ProjectsScanConfigsStartCall) Do(opts ...googleapi.CallOption) (*ScanRun, error) {
1627 gensupport.SetOptions(c.urlParams_, opts...)
1628 res, err := c.doRequest("json")
1629 if res != nil && res.StatusCode == http.StatusNotModified {
1630 if res.Body != nil {
1631 res.Body.Close()
1632 }
1633 return nil, gensupport.WrapError(&googleapi.Error{
1634 Code: res.StatusCode,
1635 Header: res.Header,
1636 })
1637 }
1638 if err != nil {
1639 return nil, err
1640 }
1641 defer googleapi.CloseBody(res)
1642 if err := googleapi.CheckResponse(res); err != nil {
1643 return nil, gensupport.WrapError(err)
1644 }
1645 ret := &ScanRun{
1646 ServerResponse: googleapi.ServerResponse{
1647 Header: res.Header,
1648 HTTPStatusCode: res.StatusCode,
1649 },
1650 }
1651 target := &ret
1652 if err := gensupport.DecodeResponse(target, res); err != nil {
1653 return nil, err
1654 }
1655 return ret, nil
1656 }
1657
1658 type ProjectsScanConfigsScanRunsGetCall struct {
1659 s *Service
1660 name string
1661 urlParams_ gensupport.URLParams
1662 ifNoneMatch_ string
1663 ctx_ context.Context
1664 header_ http.Header
1665 }
1666
1667
1668
1669
1670
1671
1672 func (r *ProjectsScanConfigsScanRunsService) Get(name string) *ProjectsScanConfigsScanRunsGetCall {
1673 c := &ProjectsScanConfigsScanRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1674 c.name = name
1675 return c
1676 }
1677
1678
1679
1680
1681 func (c *ProjectsScanConfigsScanRunsGetCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsScanRunsGetCall {
1682 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1683 return c
1684 }
1685
1686
1687
1688
1689 func (c *ProjectsScanConfigsScanRunsGetCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsScanRunsGetCall {
1690 c.ifNoneMatch_ = entityTag
1691 return c
1692 }
1693
1694
1695 func (c *ProjectsScanConfigsScanRunsGetCall) Context(ctx context.Context) *ProjectsScanConfigsScanRunsGetCall {
1696 c.ctx_ = ctx
1697 return c
1698 }
1699
1700
1701
1702 func (c *ProjectsScanConfigsScanRunsGetCall) Header() http.Header {
1703 if c.header_ == nil {
1704 c.header_ = make(http.Header)
1705 }
1706 return c.header_
1707 }
1708
1709 func (c *ProjectsScanConfigsScanRunsGetCall) doRequest(alt string) (*http.Response, error) {
1710 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1711 if c.ifNoneMatch_ != "" {
1712 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1713 }
1714 var body io.Reader = nil
1715 c.urlParams_.Set("alt", alt)
1716 c.urlParams_.Set("prettyPrint", "false")
1717 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
1718 urls += "?" + c.urlParams_.Encode()
1719 req, err := http.NewRequest("GET", urls, body)
1720 if err != nil {
1721 return nil, err
1722 }
1723 req.Header = reqHeaders
1724 googleapi.Expand(req.URL, map[string]string{
1725 "name": c.name,
1726 })
1727 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1728 }
1729
1730
1731
1732
1733
1734
1735 func (c *ProjectsScanConfigsScanRunsGetCall) Do(opts ...googleapi.CallOption) (*ScanRun, error) {
1736 gensupport.SetOptions(c.urlParams_, opts...)
1737 res, err := c.doRequest("json")
1738 if res != nil && res.StatusCode == http.StatusNotModified {
1739 if res.Body != nil {
1740 res.Body.Close()
1741 }
1742 return nil, gensupport.WrapError(&googleapi.Error{
1743 Code: res.StatusCode,
1744 Header: res.Header,
1745 })
1746 }
1747 if err != nil {
1748 return nil, err
1749 }
1750 defer googleapi.CloseBody(res)
1751 if err := googleapi.CheckResponse(res); err != nil {
1752 return nil, gensupport.WrapError(err)
1753 }
1754 ret := &ScanRun{
1755 ServerResponse: googleapi.ServerResponse{
1756 Header: res.Header,
1757 HTTPStatusCode: res.StatusCode,
1758 },
1759 }
1760 target := &ret
1761 if err := gensupport.DecodeResponse(target, res); err != nil {
1762 return nil, err
1763 }
1764 return ret, nil
1765 }
1766
1767 type ProjectsScanConfigsScanRunsListCall struct {
1768 s *Service
1769 parent string
1770 urlParams_ gensupport.URLParams
1771 ifNoneMatch_ string
1772 ctx_ context.Context
1773 header_ http.Header
1774 }
1775
1776
1777
1778
1779
1780
1781 func (r *ProjectsScanConfigsScanRunsService) List(parent string) *ProjectsScanConfigsScanRunsListCall {
1782 c := &ProjectsScanConfigsScanRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1783 c.parent = parent
1784 return c
1785 }
1786
1787
1788
1789
1790 func (c *ProjectsScanConfigsScanRunsListCall) PageSize(pageSize int64) *ProjectsScanConfigsScanRunsListCall {
1791 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1792 return c
1793 }
1794
1795
1796
1797
1798
1799 func (c *ProjectsScanConfigsScanRunsListCall) PageToken(pageToken string) *ProjectsScanConfigsScanRunsListCall {
1800 c.urlParams_.Set("pageToken", pageToken)
1801 return c
1802 }
1803
1804
1805
1806
1807 func (c *ProjectsScanConfigsScanRunsListCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsScanRunsListCall {
1808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1809 return c
1810 }
1811
1812
1813
1814
1815 func (c *ProjectsScanConfigsScanRunsListCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsScanRunsListCall {
1816 c.ifNoneMatch_ = entityTag
1817 return c
1818 }
1819
1820
1821 func (c *ProjectsScanConfigsScanRunsListCall) Context(ctx context.Context) *ProjectsScanConfigsScanRunsListCall {
1822 c.ctx_ = ctx
1823 return c
1824 }
1825
1826
1827
1828 func (c *ProjectsScanConfigsScanRunsListCall) Header() http.Header {
1829 if c.header_ == nil {
1830 c.header_ = make(http.Header)
1831 }
1832 return c.header_
1833 }
1834
1835 func (c *ProjectsScanConfigsScanRunsListCall) doRequest(alt string) (*http.Response, error) {
1836 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1837 if c.ifNoneMatch_ != "" {
1838 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1839 }
1840 var body io.Reader = nil
1841 c.urlParams_.Set("alt", alt)
1842 c.urlParams_.Set("prettyPrint", "false")
1843 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scanRuns")
1844 urls += "?" + c.urlParams_.Encode()
1845 req, err := http.NewRequest("GET", urls, body)
1846 if err != nil {
1847 return nil, err
1848 }
1849 req.Header = reqHeaders
1850 googleapi.Expand(req.URL, map[string]string{
1851 "parent": c.parent,
1852 })
1853 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1854 }
1855
1856
1857
1858
1859
1860
1861
1862 func (c *ProjectsScanConfigsScanRunsListCall) Do(opts ...googleapi.CallOption) (*ListScanRunsResponse, error) {
1863 gensupport.SetOptions(c.urlParams_, opts...)
1864 res, err := c.doRequest("json")
1865 if res != nil && res.StatusCode == http.StatusNotModified {
1866 if res.Body != nil {
1867 res.Body.Close()
1868 }
1869 return nil, gensupport.WrapError(&googleapi.Error{
1870 Code: res.StatusCode,
1871 Header: res.Header,
1872 })
1873 }
1874 if err != nil {
1875 return nil, err
1876 }
1877 defer googleapi.CloseBody(res)
1878 if err := googleapi.CheckResponse(res); err != nil {
1879 return nil, gensupport.WrapError(err)
1880 }
1881 ret := &ListScanRunsResponse{
1882 ServerResponse: googleapi.ServerResponse{
1883 Header: res.Header,
1884 HTTPStatusCode: res.StatusCode,
1885 },
1886 }
1887 target := &ret
1888 if err := gensupport.DecodeResponse(target, res); err != nil {
1889 return nil, err
1890 }
1891 return ret, nil
1892 }
1893
1894
1895
1896
1897 func (c *ProjectsScanConfigsScanRunsListCall) Pages(ctx context.Context, f func(*ListScanRunsResponse) error) error {
1898 c.ctx_ = ctx
1899 defer c.PageToken(c.urlParams_.Get("pageToken"))
1900 for {
1901 x, err := c.Do()
1902 if err != nil {
1903 return err
1904 }
1905 if err := f(x); err != nil {
1906 return err
1907 }
1908 if x.NextPageToken == "" {
1909 return nil
1910 }
1911 c.PageToken(x.NextPageToken)
1912 }
1913 }
1914
1915 type ProjectsScanConfigsScanRunsStopCall struct {
1916 s *Service
1917 name string
1918 stopscanrunrequest *StopScanRunRequest
1919 urlParams_ gensupport.URLParams
1920 ctx_ context.Context
1921 header_ http.Header
1922 }
1923
1924
1925
1926
1927
1928
1929 func (r *ProjectsScanConfigsScanRunsService) Stop(name string, stopscanrunrequest *StopScanRunRequest) *ProjectsScanConfigsScanRunsStopCall {
1930 c := &ProjectsScanConfigsScanRunsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1931 c.name = name
1932 c.stopscanrunrequest = stopscanrunrequest
1933 return c
1934 }
1935
1936
1937
1938
1939 func (c *ProjectsScanConfigsScanRunsStopCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsScanRunsStopCall {
1940 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1941 return c
1942 }
1943
1944
1945 func (c *ProjectsScanConfigsScanRunsStopCall) Context(ctx context.Context) *ProjectsScanConfigsScanRunsStopCall {
1946 c.ctx_ = ctx
1947 return c
1948 }
1949
1950
1951
1952 func (c *ProjectsScanConfigsScanRunsStopCall) Header() http.Header {
1953 if c.header_ == nil {
1954 c.header_ = make(http.Header)
1955 }
1956 return c.header_
1957 }
1958
1959 func (c *ProjectsScanConfigsScanRunsStopCall) doRequest(alt string) (*http.Response, error) {
1960 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1961 var body io.Reader = nil
1962 body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopscanrunrequest)
1963 if err != nil {
1964 return nil, err
1965 }
1966 c.urlParams_.Set("alt", alt)
1967 c.urlParams_.Set("prettyPrint", "false")
1968 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:stop")
1969 urls += "?" + c.urlParams_.Encode()
1970 req, err := http.NewRequest("POST", urls, body)
1971 if err != nil {
1972 return nil, err
1973 }
1974 req.Header = reqHeaders
1975 googleapi.Expand(req.URL, map[string]string{
1976 "name": c.name,
1977 })
1978 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1979 }
1980
1981
1982
1983
1984
1985
1986 func (c *ProjectsScanConfigsScanRunsStopCall) Do(opts ...googleapi.CallOption) (*ScanRun, error) {
1987 gensupport.SetOptions(c.urlParams_, opts...)
1988 res, err := c.doRequest("json")
1989 if res != nil && res.StatusCode == http.StatusNotModified {
1990 if res.Body != nil {
1991 res.Body.Close()
1992 }
1993 return nil, gensupport.WrapError(&googleapi.Error{
1994 Code: res.StatusCode,
1995 Header: res.Header,
1996 })
1997 }
1998 if err != nil {
1999 return nil, err
2000 }
2001 defer googleapi.CloseBody(res)
2002 if err := googleapi.CheckResponse(res); err != nil {
2003 return nil, gensupport.WrapError(err)
2004 }
2005 ret := &ScanRun{
2006 ServerResponse: googleapi.ServerResponse{
2007 Header: res.Header,
2008 HTTPStatusCode: res.StatusCode,
2009 },
2010 }
2011 target := &ret
2012 if err := gensupport.DecodeResponse(target, res); err != nil {
2013 return nil, err
2014 }
2015 return ret, nil
2016 }
2017
2018 type ProjectsScanConfigsScanRunsCrawledUrlsListCall struct {
2019 s *Service
2020 parent string
2021 urlParams_ gensupport.URLParams
2022 ifNoneMatch_ string
2023 ctx_ context.Context
2024 header_ http.Header
2025 }
2026
2027
2028
2029
2030
2031
2032 func (r *ProjectsScanConfigsScanRunsCrawledUrlsService) List(parent string) *ProjectsScanConfigsScanRunsCrawledUrlsListCall {
2033 c := &ProjectsScanConfigsScanRunsCrawledUrlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2034 c.parent = parent
2035 return c
2036 }
2037
2038
2039
2040
2041 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) PageSize(pageSize int64) *ProjectsScanConfigsScanRunsCrawledUrlsListCall {
2042 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2043 return c
2044 }
2045
2046
2047
2048
2049
2050 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) PageToken(pageToken string) *ProjectsScanConfigsScanRunsCrawledUrlsListCall {
2051 c.urlParams_.Set("pageToken", pageToken)
2052 return c
2053 }
2054
2055
2056
2057
2058 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsScanRunsCrawledUrlsListCall {
2059 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2060 return c
2061 }
2062
2063
2064
2065
2066 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsScanRunsCrawledUrlsListCall {
2067 c.ifNoneMatch_ = entityTag
2068 return c
2069 }
2070
2071
2072 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) Context(ctx context.Context) *ProjectsScanConfigsScanRunsCrawledUrlsListCall {
2073 c.ctx_ = ctx
2074 return c
2075 }
2076
2077
2078
2079 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) Header() http.Header {
2080 if c.header_ == nil {
2081 c.header_ = make(http.Header)
2082 }
2083 return c.header_
2084 }
2085
2086 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) doRequest(alt string) (*http.Response, error) {
2087 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2088 if c.ifNoneMatch_ != "" {
2089 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2090 }
2091 var body io.Reader = nil
2092 c.urlParams_.Set("alt", alt)
2093 c.urlParams_.Set("prettyPrint", "false")
2094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/crawledUrls")
2095 urls += "?" + c.urlParams_.Encode()
2096 req, err := http.NewRequest("GET", urls, body)
2097 if err != nil {
2098 return nil, err
2099 }
2100 req.Header = reqHeaders
2101 googleapi.Expand(req.URL, map[string]string{
2102 "parent": c.parent,
2103 })
2104 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2105 }
2106
2107
2108
2109
2110
2111
2112
2113 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) Do(opts ...googleapi.CallOption) (*ListCrawledUrlsResponse, error) {
2114 gensupport.SetOptions(c.urlParams_, opts...)
2115 res, err := c.doRequest("json")
2116 if res != nil && res.StatusCode == http.StatusNotModified {
2117 if res.Body != nil {
2118 res.Body.Close()
2119 }
2120 return nil, gensupport.WrapError(&googleapi.Error{
2121 Code: res.StatusCode,
2122 Header: res.Header,
2123 })
2124 }
2125 if err != nil {
2126 return nil, err
2127 }
2128 defer googleapi.CloseBody(res)
2129 if err := googleapi.CheckResponse(res); err != nil {
2130 return nil, gensupport.WrapError(err)
2131 }
2132 ret := &ListCrawledUrlsResponse{
2133 ServerResponse: googleapi.ServerResponse{
2134 Header: res.Header,
2135 HTTPStatusCode: res.StatusCode,
2136 },
2137 }
2138 target := &ret
2139 if err := gensupport.DecodeResponse(target, res); err != nil {
2140 return nil, err
2141 }
2142 return ret, nil
2143 }
2144
2145
2146
2147
2148 func (c *ProjectsScanConfigsScanRunsCrawledUrlsListCall) Pages(ctx context.Context, f func(*ListCrawledUrlsResponse) error) error {
2149 c.ctx_ = ctx
2150 defer c.PageToken(c.urlParams_.Get("pageToken"))
2151 for {
2152 x, err := c.Do()
2153 if err != nil {
2154 return err
2155 }
2156 if err := f(x); err != nil {
2157 return err
2158 }
2159 if x.NextPageToken == "" {
2160 return nil
2161 }
2162 c.PageToken(x.NextPageToken)
2163 }
2164 }
2165
2166 type ProjectsScanConfigsScanRunsFindingTypeStatsListCall struct {
2167 s *Service
2168 parent string
2169 urlParams_ gensupport.URLParams
2170 ifNoneMatch_ string
2171 ctx_ context.Context
2172 header_ http.Header
2173 }
2174
2175
2176
2177
2178
2179
2180 func (r *ProjectsScanConfigsScanRunsFindingTypeStatsService) List(parent string) *ProjectsScanConfigsScanRunsFindingTypeStatsListCall {
2181 c := &ProjectsScanConfigsScanRunsFindingTypeStatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2182 c.parent = parent
2183 return c
2184 }
2185
2186
2187
2188
2189 func (c *ProjectsScanConfigsScanRunsFindingTypeStatsListCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsScanRunsFindingTypeStatsListCall {
2190 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2191 return c
2192 }
2193
2194
2195
2196
2197 func (c *ProjectsScanConfigsScanRunsFindingTypeStatsListCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsScanRunsFindingTypeStatsListCall {
2198 c.ifNoneMatch_ = entityTag
2199 return c
2200 }
2201
2202
2203 func (c *ProjectsScanConfigsScanRunsFindingTypeStatsListCall) Context(ctx context.Context) *ProjectsScanConfigsScanRunsFindingTypeStatsListCall {
2204 c.ctx_ = ctx
2205 return c
2206 }
2207
2208
2209
2210 func (c *ProjectsScanConfigsScanRunsFindingTypeStatsListCall) Header() http.Header {
2211 if c.header_ == nil {
2212 c.header_ = make(http.Header)
2213 }
2214 return c.header_
2215 }
2216
2217 func (c *ProjectsScanConfigsScanRunsFindingTypeStatsListCall) doRequest(alt string) (*http.Response, error) {
2218 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2219 if c.ifNoneMatch_ != "" {
2220 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2221 }
2222 var body io.Reader = nil
2223 c.urlParams_.Set("alt", alt)
2224 c.urlParams_.Set("prettyPrint", "false")
2225 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/findingTypeStats")
2226 urls += "?" + c.urlParams_.Encode()
2227 req, err := http.NewRequest("GET", urls, body)
2228 if err != nil {
2229 return nil, err
2230 }
2231 req.Header = reqHeaders
2232 googleapi.Expand(req.URL, map[string]string{
2233 "parent": c.parent,
2234 })
2235 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2236 }
2237
2238
2239
2240
2241
2242
2243
2244 func (c *ProjectsScanConfigsScanRunsFindingTypeStatsListCall) Do(opts ...googleapi.CallOption) (*ListFindingTypeStatsResponse, error) {
2245 gensupport.SetOptions(c.urlParams_, opts...)
2246 res, err := c.doRequest("json")
2247 if res != nil && res.StatusCode == http.StatusNotModified {
2248 if res.Body != nil {
2249 res.Body.Close()
2250 }
2251 return nil, gensupport.WrapError(&googleapi.Error{
2252 Code: res.StatusCode,
2253 Header: res.Header,
2254 })
2255 }
2256 if err != nil {
2257 return nil, err
2258 }
2259 defer googleapi.CloseBody(res)
2260 if err := googleapi.CheckResponse(res); err != nil {
2261 return nil, gensupport.WrapError(err)
2262 }
2263 ret := &ListFindingTypeStatsResponse{
2264 ServerResponse: googleapi.ServerResponse{
2265 Header: res.Header,
2266 HTTPStatusCode: res.StatusCode,
2267 },
2268 }
2269 target := &ret
2270 if err := gensupport.DecodeResponse(target, res); err != nil {
2271 return nil, err
2272 }
2273 return ret, nil
2274 }
2275
2276 type ProjectsScanConfigsScanRunsFindingsGetCall struct {
2277 s *Service
2278 name string
2279 urlParams_ gensupport.URLParams
2280 ifNoneMatch_ string
2281 ctx_ context.Context
2282 header_ http.Header
2283 }
2284
2285
2286
2287
2288
2289
2290
2291 func (r *ProjectsScanConfigsScanRunsFindingsService) Get(name string) *ProjectsScanConfigsScanRunsFindingsGetCall {
2292 c := &ProjectsScanConfigsScanRunsFindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2293 c.name = name
2294 return c
2295 }
2296
2297
2298
2299
2300 func (c *ProjectsScanConfigsScanRunsFindingsGetCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsScanRunsFindingsGetCall {
2301 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2302 return c
2303 }
2304
2305
2306
2307
2308 func (c *ProjectsScanConfigsScanRunsFindingsGetCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsScanRunsFindingsGetCall {
2309 c.ifNoneMatch_ = entityTag
2310 return c
2311 }
2312
2313
2314 func (c *ProjectsScanConfigsScanRunsFindingsGetCall) Context(ctx context.Context) *ProjectsScanConfigsScanRunsFindingsGetCall {
2315 c.ctx_ = ctx
2316 return c
2317 }
2318
2319
2320
2321 func (c *ProjectsScanConfigsScanRunsFindingsGetCall) Header() http.Header {
2322 if c.header_ == nil {
2323 c.header_ = make(http.Header)
2324 }
2325 return c.header_
2326 }
2327
2328 func (c *ProjectsScanConfigsScanRunsFindingsGetCall) doRequest(alt string) (*http.Response, error) {
2329 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2330 if c.ifNoneMatch_ != "" {
2331 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2332 }
2333 var body io.Reader = nil
2334 c.urlParams_.Set("alt", alt)
2335 c.urlParams_.Set("prettyPrint", "false")
2336 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
2337 urls += "?" + c.urlParams_.Encode()
2338 req, err := http.NewRequest("GET", urls, body)
2339 if err != nil {
2340 return nil, err
2341 }
2342 req.Header = reqHeaders
2343 googleapi.Expand(req.URL, map[string]string{
2344 "name": c.name,
2345 })
2346 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2347 }
2348
2349
2350
2351
2352
2353
2354 func (c *ProjectsScanConfigsScanRunsFindingsGetCall) Do(opts ...googleapi.CallOption) (*Finding, error) {
2355 gensupport.SetOptions(c.urlParams_, opts...)
2356 res, err := c.doRequest("json")
2357 if res != nil && res.StatusCode == http.StatusNotModified {
2358 if res.Body != nil {
2359 res.Body.Close()
2360 }
2361 return nil, gensupport.WrapError(&googleapi.Error{
2362 Code: res.StatusCode,
2363 Header: res.Header,
2364 })
2365 }
2366 if err != nil {
2367 return nil, err
2368 }
2369 defer googleapi.CloseBody(res)
2370 if err := googleapi.CheckResponse(res); err != nil {
2371 return nil, gensupport.WrapError(err)
2372 }
2373 ret := &Finding{
2374 ServerResponse: googleapi.ServerResponse{
2375 Header: res.Header,
2376 HTTPStatusCode: res.StatusCode,
2377 },
2378 }
2379 target := &ret
2380 if err := gensupport.DecodeResponse(target, res); err != nil {
2381 return nil, err
2382 }
2383 return ret, nil
2384 }
2385
2386 type ProjectsScanConfigsScanRunsFindingsListCall struct {
2387 s *Service
2388 parent string
2389 urlParams_ gensupport.URLParams
2390 ifNoneMatch_ string
2391 ctx_ context.Context
2392 header_ http.Header
2393 }
2394
2395
2396
2397
2398
2399
2400 func (r *ProjectsScanConfigsScanRunsFindingsService) List(parent string) *ProjectsScanConfigsScanRunsFindingsListCall {
2401 c := &ProjectsScanConfigsScanRunsFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2402 c.parent = parent
2403 return c
2404 }
2405
2406
2407
2408
2409 func (c *ProjectsScanConfigsScanRunsFindingsListCall) Filter(filter string) *ProjectsScanConfigsScanRunsFindingsListCall {
2410 c.urlParams_.Set("filter", filter)
2411 return c
2412 }
2413
2414
2415
2416
2417 func (c *ProjectsScanConfigsScanRunsFindingsListCall) PageSize(pageSize int64) *ProjectsScanConfigsScanRunsFindingsListCall {
2418 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2419 return c
2420 }
2421
2422
2423
2424
2425
2426 func (c *ProjectsScanConfigsScanRunsFindingsListCall) PageToken(pageToken string) *ProjectsScanConfigsScanRunsFindingsListCall {
2427 c.urlParams_.Set("pageToken", pageToken)
2428 return c
2429 }
2430
2431
2432
2433
2434 func (c *ProjectsScanConfigsScanRunsFindingsListCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsScanRunsFindingsListCall {
2435 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2436 return c
2437 }
2438
2439
2440
2441
2442 func (c *ProjectsScanConfigsScanRunsFindingsListCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsScanRunsFindingsListCall {
2443 c.ifNoneMatch_ = entityTag
2444 return c
2445 }
2446
2447
2448 func (c *ProjectsScanConfigsScanRunsFindingsListCall) Context(ctx context.Context) *ProjectsScanConfigsScanRunsFindingsListCall {
2449 c.ctx_ = ctx
2450 return c
2451 }
2452
2453
2454
2455 func (c *ProjectsScanConfigsScanRunsFindingsListCall) Header() http.Header {
2456 if c.header_ == nil {
2457 c.header_ = make(http.Header)
2458 }
2459 return c.header_
2460 }
2461
2462 func (c *ProjectsScanConfigsScanRunsFindingsListCall) doRequest(alt string) (*http.Response, error) {
2463 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2464 if c.ifNoneMatch_ != "" {
2465 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2466 }
2467 var body io.Reader = nil
2468 c.urlParams_.Set("alt", alt)
2469 c.urlParams_.Set("prettyPrint", "false")
2470 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/findings")
2471 urls += "?" + c.urlParams_.Encode()
2472 req, err := http.NewRequest("GET", urls, body)
2473 if err != nil {
2474 return nil, err
2475 }
2476 req.Header = reqHeaders
2477 googleapi.Expand(req.URL, map[string]string{
2478 "parent": c.parent,
2479 })
2480 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2481 }
2482
2483
2484
2485
2486
2487
2488
2489 func (c *ProjectsScanConfigsScanRunsFindingsListCall) Do(opts ...googleapi.CallOption) (*ListFindingsResponse, error) {
2490 gensupport.SetOptions(c.urlParams_, opts...)
2491 res, err := c.doRequest("json")
2492 if res != nil && res.StatusCode == http.StatusNotModified {
2493 if res.Body != nil {
2494 res.Body.Close()
2495 }
2496 return nil, gensupport.WrapError(&googleapi.Error{
2497 Code: res.StatusCode,
2498 Header: res.Header,
2499 })
2500 }
2501 if err != nil {
2502 return nil, err
2503 }
2504 defer googleapi.CloseBody(res)
2505 if err := googleapi.CheckResponse(res); err != nil {
2506 return nil, gensupport.WrapError(err)
2507 }
2508 ret := &ListFindingsResponse{
2509 ServerResponse: googleapi.ServerResponse{
2510 Header: res.Header,
2511 HTTPStatusCode: res.StatusCode,
2512 },
2513 }
2514 target := &ret
2515 if err := gensupport.DecodeResponse(target, res); err != nil {
2516 return nil, err
2517 }
2518 return ret, nil
2519 }
2520
2521
2522
2523
2524 func (c *ProjectsScanConfigsScanRunsFindingsListCall) Pages(ctx context.Context, f func(*ListFindingsResponse) error) error {
2525 c.ctx_ = ctx
2526 defer c.PageToken(c.urlParams_.Get("pageToken"))
2527 for {
2528 x, err := c.Do()
2529 if err != nil {
2530 return err
2531 }
2532 if err := f(x); err != nil {
2533 return err
2534 }
2535 if x.NextPageToken == "" {
2536 return nil
2537 }
2538 c.PageToken(x.NextPageToken)
2539 }
2540 }
2541
View as plain text