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 workflowexecutions
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 = "workflowexecutions:v1beta"
90 const apiName = "workflowexecutions"
91 const apiVersion = "v1beta"
92 const basePath = "https://workflowexecutions.googleapis.com/"
93 const basePathTemplate = "https://workflowexecutions.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://workflowexecutions.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.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Workflows = NewProjectsLocationsWorkflowsService(s)
172 return rs
173 }
174
175 type ProjectsLocationsService struct {
176 s *Service
177
178 Workflows *ProjectsLocationsWorkflowsService
179 }
180
181 func NewProjectsLocationsWorkflowsService(s *Service) *ProjectsLocationsWorkflowsService {
182 rs := &ProjectsLocationsWorkflowsService{s: s}
183 rs.Executions = NewProjectsLocationsWorkflowsExecutionsService(s)
184 return rs
185 }
186
187 type ProjectsLocationsWorkflowsService struct {
188 s *Service
189
190 Executions *ProjectsLocationsWorkflowsExecutionsService
191 }
192
193 func NewProjectsLocationsWorkflowsExecutionsService(s *Service) *ProjectsLocationsWorkflowsExecutionsService {
194 rs := &ProjectsLocationsWorkflowsExecutionsService{s: s}
195 return rs
196 }
197
198 type ProjectsLocationsWorkflowsExecutionsService struct {
199 s *Service
200 }
201
202
203 type CancelExecutionRequest struct {
204 }
205
206
207 type Error struct {
208
209 Context string `json:"context,omitempty"`
210
211 Payload string `json:"payload,omitempty"`
212
213
214 StackTrace *StackTrace `json:"stackTrace,omitempty"`
215
216
217
218
219
220 ForceSendFields []string `json:"-"`
221
222
223
224
225 NullFields []string `json:"-"`
226 }
227
228 func (s *Error) MarshalJSON() ([]byte, error) {
229 type NoMethod Error
230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
231 }
232
233
234
235 type Execution struct {
236
237
238
239
240 Argument string `json:"argument,omitempty"`
241
242
243
244
245
246
247
248
249 CallLogLevel string `json:"callLogLevel,omitempty"`
250
251 EndTime string `json:"endTime,omitempty"`
252
253
254
255 Error *Error `json:"error,omitempty"`
256
257
258
259 Name string `json:"name,omitempty"`
260
261
262 Result string `json:"result,omitempty"`
263
264 StartTime string `json:"startTime,omitempty"`
265
266
267
268
269
270
271
272
273
274
275
276 State string `json:"state,omitempty"`
277
278
279 Status *Status `json:"status,omitempty"`
280
281
282 WorkflowRevisionId string `json:"workflowRevisionId,omitempty"`
283
284
285 googleapi.ServerResponse `json:"-"`
286
287
288
289
290
291 ForceSendFields []string `json:"-"`
292
293
294
295
296 NullFields []string `json:"-"`
297 }
298
299 func (s *Execution) MarshalJSON() ([]byte, error) {
300 type NoMethod Execution
301 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
302 }
303
304
305 type ListExecutionsResponse struct {
306
307 Executions []*Execution `json:"executions,omitempty"`
308
309
310 NextPageToken string `json:"nextPageToken,omitempty"`
311
312
313 googleapi.ServerResponse `json:"-"`
314
315
316
317
318
319 ForceSendFields []string `json:"-"`
320
321
322
323
324 NullFields []string `json:"-"`
325 }
326
327 func (s *ListExecutionsResponse) MarshalJSON() ([]byte, error) {
328 type NoMethod ListExecutionsResponse
329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
330 }
331
332
333
334
335 type Position struct {
336
337
338 Column int64 `json:"column,omitempty,string"`
339
340
341 Length int64 `json:"length,omitempty,string"`
342
343
344 Line int64 `json:"line,omitempty,string"`
345
346
347
348
349
350 ForceSendFields []string `json:"-"`
351
352
353
354
355 NullFields []string `json:"-"`
356 }
357
358 func (s *Position) MarshalJSON() ([]byte, error) {
359 type NoMethod Position
360 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
361 }
362
363
364 type StackTrace struct {
365
366 Elements []*StackTraceElement `json:"elements,omitempty"`
367
368
369
370
371
372 ForceSendFields []string `json:"-"`
373
374
375
376
377 NullFields []string `json:"-"`
378 }
379
380 func (s *StackTrace) MarshalJSON() ([]byte, error) {
381 type NoMethod StackTrace
382 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
383 }
384
385
386 type StackTraceElement struct {
387
388 Position *Position `json:"position,omitempty"`
389
390 Routine string `json:"routine,omitempty"`
391
392 Step string `json:"step,omitempty"`
393
394
395
396
397
398 ForceSendFields []string `json:"-"`
399
400
401
402
403 NullFields []string `json:"-"`
404 }
405
406 func (s *StackTraceElement) MarshalJSON() ([]byte, error) {
407 type NoMethod StackTraceElement
408 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
409 }
410
411
412 type Status struct {
413
414
415
416
417
418
419
420 CurrentSteps []*Step `json:"currentSteps,omitempty"`
421
422
423
424
425
426 ForceSendFields []string `json:"-"`
427
428
429
430
431 NullFields []string `json:"-"`
432 }
433
434 func (s *Status) MarshalJSON() ([]byte, error) {
435 type NoMethod Status
436 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
437 }
438
439
440 type Step struct {
441
442 Routine string `json:"routine,omitempty"`
443
444 Step string `json:"step,omitempty"`
445
446
447
448
449
450 ForceSendFields []string `json:"-"`
451
452
453
454
455 NullFields []string `json:"-"`
456 }
457
458 func (s *Step) MarshalJSON() ([]byte, error) {
459 type NoMethod Step
460 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
461 }
462
463 type ProjectsLocationsWorkflowsExecutionsCancelCall struct {
464 s *Service
465 name string
466 cancelexecutionrequest *CancelExecutionRequest
467 urlParams_ gensupport.URLParams
468 ctx_ context.Context
469 header_ http.Header
470 }
471
472
473
474
475
476
477 func (r *ProjectsLocationsWorkflowsExecutionsService) Cancel(name string, cancelexecutionrequest *CancelExecutionRequest) *ProjectsLocationsWorkflowsExecutionsCancelCall {
478 c := &ProjectsLocationsWorkflowsExecutionsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
479 c.name = name
480 c.cancelexecutionrequest = cancelexecutionrequest
481 return c
482 }
483
484
485
486
487 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCancelCall {
488 c.urlParams_.Set("fields", googleapi.CombineFields(s))
489 return c
490 }
491
492
493 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCancelCall {
494 c.ctx_ = ctx
495 return c
496 }
497
498
499
500 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Header() http.Header {
501 if c.header_ == nil {
502 c.header_ = make(http.Header)
503 }
504 return c.header_
505 }
506
507 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) doRequest(alt string) (*http.Response, error) {
508 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
509 var body io.Reader = nil
510 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelexecutionrequest)
511 if err != nil {
512 return nil, err
513 }
514 c.urlParams_.Set("alt", alt)
515 c.urlParams_.Set("prettyPrint", "false")
516 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel")
517 urls += "?" + c.urlParams_.Encode()
518 req, err := http.NewRequest("POST", urls, body)
519 if err != nil {
520 return nil, err
521 }
522 req.Header = reqHeaders
523 googleapi.Expand(req.URL, map[string]string{
524 "name": c.name,
525 })
526 return gensupport.SendRequest(c.ctx_, c.s.client, req)
527 }
528
529
530
531
532
533
534 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
535 gensupport.SetOptions(c.urlParams_, opts...)
536 res, err := c.doRequest("json")
537 if res != nil && res.StatusCode == http.StatusNotModified {
538 if res.Body != nil {
539 res.Body.Close()
540 }
541 return nil, gensupport.WrapError(&googleapi.Error{
542 Code: res.StatusCode,
543 Header: res.Header,
544 })
545 }
546 if err != nil {
547 return nil, err
548 }
549 defer googleapi.CloseBody(res)
550 if err := googleapi.CheckResponse(res); err != nil {
551 return nil, gensupport.WrapError(err)
552 }
553 ret := &Execution{
554 ServerResponse: googleapi.ServerResponse{
555 Header: res.Header,
556 HTTPStatusCode: res.StatusCode,
557 },
558 }
559 target := &ret
560 if err := gensupport.DecodeResponse(target, res); err != nil {
561 return nil, err
562 }
563 return ret, nil
564 }
565
566 type ProjectsLocationsWorkflowsExecutionsCreateCall struct {
567 s *Service
568 parent string
569 execution *Execution
570 urlParams_ gensupport.URLParams
571 ctx_ context.Context
572 header_ http.Header
573 }
574
575
576
577
578
579
580
581 func (r *ProjectsLocationsWorkflowsExecutionsService) Create(parent string, execution *Execution) *ProjectsLocationsWorkflowsExecutionsCreateCall {
582 c := &ProjectsLocationsWorkflowsExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
583 c.parent = parent
584 c.execution = execution
585 return c
586 }
587
588
589
590
591 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCreateCall {
592 c.urlParams_.Set("fields", googleapi.CombineFields(s))
593 return c
594 }
595
596
597 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCreateCall {
598 c.ctx_ = ctx
599 return c
600 }
601
602
603
604 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Header() http.Header {
605 if c.header_ == nil {
606 c.header_ = make(http.Header)
607 }
608 return c.header_
609 }
610
611 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) doRequest(alt string) (*http.Response, error) {
612 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
613 var body io.Reader = nil
614 body, err := googleapi.WithoutDataWrapper.JSONReader(c.execution)
615 if err != nil {
616 return nil, err
617 }
618 c.urlParams_.Set("alt", alt)
619 c.urlParams_.Set("prettyPrint", "false")
620 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/executions")
621 urls += "?" + c.urlParams_.Encode()
622 req, err := http.NewRequest("POST", urls, body)
623 if err != nil {
624 return nil, err
625 }
626 req.Header = reqHeaders
627 googleapi.Expand(req.URL, map[string]string{
628 "parent": c.parent,
629 })
630 return gensupport.SendRequest(c.ctx_, c.s.client, req)
631 }
632
633
634
635
636
637
638 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
639 gensupport.SetOptions(c.urlParams_, opts...)
640 res, err := c.doRequest("json")
641 if res != nil && res.StatusCode == http.StatusNotModified {
642 if res.Body != nil {
643 res.Body.Close()
644 }
645 return nil, gensupport.WrapError(&googleapi.Error{
646 Code: res.StatusCode,
647 Header: res.Header,
648 })
649 }
650 if err != nil {
651 return nil, err
652 }
653 defer googleapi.CloseBody(res)
654 if err := googleapi.CheckResponse(res); err != nil {
655 return nil, gensupport.WrapError(err)
656 }
657 ret := &Execution{
658 ServerResponse: googleapi.ServerResponse{
659 Header: res.Header,
660 HTTPStatusCode: res.StatusCode,
661 },
662 }
663 target := &ret
664 if err := gensupport.DecodeResponse(target, res); err != nil {
665 return nil, err
666 }
667 return ret, nil
668 }
669
670 type ProjectsLocationsWorkflowsExecutionsGetCall struct {
671 s *Service
672 name string
673 urlParams_ gensupport.URLParams
674 ifNoneMatch_ string
675 ctx_ context.Context
676 header_ http.Header
677 }
678
679
680
681
682
683
684 func (r *ProjectsLocationsWorkflowsExecutionsService) Get(name string) *ProjectsLocationsWorkflowsExecutionsGetCall {
685 c := &ProjectsLocationsWorkflowsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
686 c.name = name
687 return c
688 }
689
690
691
692
693
694
695
696
697
698
699
700
701
702 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) View(view string) *ProjectsLocationsWorkflowsExecutionsGetCall {
703 c.urlParams_.Set("view", view)
704 return c
705 }
706
707
708
709
710 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsGetCall {
711 c.urlParams_.Set("fields", googleapi.CombineFields(s))
712 return c
713 }
714
715
716
717
718 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsGetCall {
719 c.ifNoneMatch_ = entityTag
720 return c
721 }
722
723
724 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsGetCall {
725 c.ctx_ = ctx
726 return c
727 }
728
729
730
731 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Header() http.Header {
732 if c.header_ == nil {
733 c.header_ = make(http.Header)
734 }
735 return c.header_
736 }
737
738 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) doRequest(alt string) (*http.Response, error) {
739 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
740 if c.ifNoneMatch_ != "" {
741 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
742 }
743 var body io.Reader = nil
744 c.urlParams_.Set("alt", alt)
745 c.urlParams_.Set("prettyPrint", "false")
746 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
747 urls += "?" + c.urlParams_.Encode()
748 req, err := http.NewRequest("GET", urls, body)
749 if err != nil {
750 return nil, err
751 }
752 req.Header = reqHeaders
753 googleapi.Expand(req.URL, map[string]string{
754 "name": c.name,
755 })
756 return gensupport.SendRequest(c.ctx_, c.s.client, req)
757 }
758
759
760
761
762
763
764 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
765 gensupport.SetOptions(c.urlParams_, opts...)
766 res, err := c.doRequest("json")
767 if res != nil && res.StatusCode == http.StatusNotModified {
768 if res.Body != nil {
769 res.Body.Close()
770 }
771 return nil, gensupport.WrapError(&googleapi.Error{
772 Code: res.StatusCode,
773 Header: res.Header,
774 })
775 }
776 if err != nil {
777 return nil, err
778 }
779 defer googleapi.CloseBody(res)
780 if err := googleapi.CheckResponse(res); err != nil {
781 return nil, gensupport.WrapError(err)
782 }
783 ret := &Execution{
784 ServerResponse: googleapi.ServerResponse{
785 Header: res.Header,
786 HTTPStatusCode: res.StatusCode,
787 },
788 }
789 target := &ret
790 if err := gensupport.DecodeResponse(target, res); err != nil {
791 return nil, err
792 }
793 return ret, nil
794 }
795
796 type ProjectsLocationsWorkflowsExecutionsListCall struct {
797 s *Service
798 parent string
799 urlParams_ gensupport.URLParams
800 ifNoneMatch_ string
801 ctx_ context.Context
802 header_ http.Header
803 }
804
805
806
807
808
809
810
811 func (r *ProjectsLocationsWorkflowsExecutionsService) List(parent string) *ProjectsLocationsWorkflowsExecutionsListCall {
812 c := &ProjectsLocationsWorkflowsExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
813 c.parent = parent
814 return c
815 }
816
817
818
819
820
821
822 func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsExecutionsListCall {
823 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
824 return c
825 }
826
827
828
829
830
831 func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsListCall {
832 c.urlParams_.Set("pageToken", pageToken)
833 return c
834 }
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849 func (c *ProjectsLocationsWorkflowsExecutionsListCall) View(view string) *ProjectsLocationsWorkflowsExecutionsListCall {
850 c.urlParams_.Set("view", view)
851 return c
852 }
853
854
855
856
857 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsListCall {
858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
859 return c
860 }
861
862
863
864
865 func (c *ProjectsLocationsWorkflowsExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsListCall {
866 c.ifNoneMatch_ = entityTag
867 return c
868 }
869
870
871 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsListCall {
872 c.ctx_ = ctx
873 return c
874 }
875
876
877
878 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Header() http.Header {
879 if c.header_ == nil {
880 c.header_ = make(http.Header)
881 }
882 return c.header_
883 }
884
885 func (c *ProjectsLocationsWorkflowsExecutionsListCall) doRequest(alt string) (*http.Response, error) {
886 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
887 if c.ifNoneMatch_ != "" {
888 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
889 }
890 var body io.Reader = nil
891 c.urlParams_.Set("alt", alt)
892 c.urlParams_.Set("prettyPrint", "false")
893 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/executions")
894 urls += "?" + c.urlParams_.Encode()
895 req, err := http.NewRequest("GET", urls, body)
896 if err != nil {
897 return nil, err
898 }
899 req.Header = reqHeaders
900 googleapi.Expand(req.URL, map[string]string{
901 "parent": c.parent,
902 })
903 return gensupport.SendRequest(c.ctx_, c.s.client, req)
904 }
905
906
907
908
909
910
911
912 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, error) {
913 gensupport.SetOptions(c.urlParams_, opts...)
914 res, err := c.doRequest("json")
915 if res != nil && res.StatusCode == http.StatusNotModified {
916 if res.Body != nil {
917 res.Body.Close()
918 }
919 return nil, gensupport.WrapError(&googleapi.Error{
920 Code: res.StatusCode,
921 Header: res.Header,
922 })
923 }
924 if err != nil {
925 return nil, err
926 }
927 defer googleapi.CloseBody(res)
928 if err := googleapi.CheckResponse(res); err != nil {
929 return nil, gensupport.WrapError(err)
930 }
931 ret := &ListExecutionsResponse{
932 ServerResponse: googleapi.ServerResponse{
933 Header: res.Header,
934 HTTPStatusCode: res.StatusCode,
935 },
936 }
937 target := &ret
938 if err := gensupport.DecodeResponse(target, res); err != nil {
939 return nil, err
940 }
941 return ret, nil
942 }
943
944
945
946
947 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) error) error {
948 c.ctx_ = ctx
949 defer c.PageToken(c.urlParams_.Get("pageToken"))
950 for {
951 x, err := c.Do()
952 if err != nil {
953 return err
954 }
955 if err := f(x); err != nil {
956 return err
957 }
958 if x.NextPageToken == "" {
959 return nil
960 }
961 c.PageToken(x.NextPageToken)
962 }
963 }
964
View as plain text