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:v1"
90 const apiName = "workflowexecutions"
91 const apiVersion = "v1"
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 rs.Callbacks = NewProjectsLocationsWorkflowsExecutionsCallbacksService(s)
196 rs.StepEntries = NewProjectsLocationsWorkflowsExecutionsStepEntriesService(s)
197 return rs
198 }
199
200 type ProjectsLocationsWorkflowsExecutionsService struct {
201 s *Service
202
203 Callbacks *ProjectsLocationsWorkflowsExecutionsCallbacksService
204
205 StepEntries *ProjectsLocationsWorkflowsExecutionsStepEntriesService
206 }
207
208 func NewProjectsLocationsWorkflowsExecutionsCallbacksService(s *Service) *ProjectsLocationsWorkflowsExecutionsCallbacksService {
209 rs := &ProjectsLocationsWorkflowsExecutionsCallbacksService{s: s}
210 return rs
211 }
212
213 type ProjectsLocationsWorkflowsExecutionsCallbacksService struct {
214 s *Service
215 }
216
217 func NewProjectsLocationsWorkflowsExecutionsStepEntriesService(s *Service) *ProjectsLocationsWorkflowsExecutionsStepEntriesService {
218 rs := &ProjectsLocationsWorkflowsExecutionsStepEntriesService{s: s}
219 return rs
220 }
221
222 type ProjectsLocationsWorkflowsExecutionsStepEntriesService struct {
223 s *Service
224 }
225
226
227 type Callback struct {
228
229
230 AvailablePayloads []string `json:"availablePayloads,omitempty"`
231
232
233 Method string `json:"method,omitempty"`
234
235
236
237 Name string `json:"name,omitempty"`
238
239 Waiters int64 `json:"waiters,omitempty,string"`
240
241
242
243
244
245 ForceSendFields []string `json:"-"`
246
247
248
249
250 NullFields []string `json:"-"`
251 }
252
253 func (s *Callback) MarshalJSON() ([]byte, error) {
254 type NoMethod Callback
255 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
256 }
257
258
259 type CancelExecutionRequest struct {
260 }
261
262
263 type Error struct {
264
265 Context string `json:"context,omitempty"`
266
267 Payload string `json:"payload,omitempty"`
268
269
270 StackTrace *StackTrace `json:"stackTrace,omitempty"`
271
272
273
274
275
276 ForceSendFields []string `json:"-"`
277
278
279
280
281 NullFields []string `json:"-"`
282 }
283
284 func (s *Error) MarshalJSON() ([]byte, error) {
285 type NoMethod Error
286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
287 }
288
289
290 type Exception struct {
291
292 Payload string `json:"payload,omitempty"`
293
294
295
296
297
298 ForceSendFields []string `json:"-"`
299
300
301
302
303 NullFields []string `json:"-"`
304 }
305
306 func (s *Exception) MarshalJSON() ([]byte, error) {
307 type NoMethod Exception
308 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
309 }
310
311
312
313 type Execution struct {
314
315
316
317
318 Argument string `json:"argument,omitempty"`
319
320
321
322
323
324
325
326
327
328 CallLogLevel string `json:"callLogLevel,omitempty"`
329
330 CreateTime string `json:"createTime,omitempty"`
331
332
333
334 DisableConcurrencyQuotaOverflowBuffering bool `json:"disableConcurrencyQuotaOverflowBuffering,omitempty"`
335
336 Duration string `json:"duration,omitempty"`
337
338 EndTime string `json:"endTime,omitempty"`
339
340
341
342 Error *Error `json:"error,omitempty"`
343
344
345
346
347
348
349 Labels map[string]string `json:"labels,omitempty"`
350
351
352
353 Name string `json:"name,omitempty"`
354
355
356 Result string `json:"result,omitempty"`
357
358 StartTime string `json:"startTime,omitempty"`
359
360
361
362
363
364
365
366
367
368
369
370
371 State string `json:"state,omitempty"`
372
373
374
375 StateError *StateError `json:"stateError,omitempty"`
376
377
378 Status *Status `json:"status,omitempty"`
379
380
381 WorkflowRevisionId string `json:"workflowRevisionId,omitempty"`
382
383
384 googleapi.ServerResponse `json:"-"`
385
386
387
388
389
390 ForceSendFields []string `json:"-"`
391
392
393
394
395 NullFields []string `json:"-"`
396 }
397
398 func (s *Execution) MarshalJSON() ([]byte, error) {
399 type NoMethod Execution
400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
401 }
402
403
404 type ExportDataResponse struct {
405
406
407 Data string `json:"data,omitempty"`
408
409
410 googleapi.ServerResponse `json:"-"`
411
412
413
414
415
416 ForceSendFields []string `json:"-"`
417
418
419
420
421 NullFields []string `json:"-"`
422 }
423
424 func (s *ExportDataResponse) MarshalJSON() ([]byte, error) {
425 type NoMethod ExportDataResponse
426 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
427 }
428
429
430 type ListCallbacksResponse struct {
431
432 Callbacks []*Callback `json:"callbacks,omitempty"`
433
434
435 NextPageToken string `json:"nextPageToken,omitempty"`
436
437
438 googleapi.ServerResponse `json:"-"`
439
440
441
442
443
444 ForceSendFields []string `json:"-"`
445
446
447
448
449 NullFields []string `json:"-"`
450 }
451
452 func (s *ListCallbacksResponse) MarshalJSON() ([]byte, error) {
453 type NoMethod ListCallbacksResponse
454 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
455 }
456
457
458 type ListExecutionsResponse struct {
459
460 Executions []*Execution `json:"executions,omitempty"`
461
462
463 NextPageToken string `json:"nextPageToken,omitempty"`
464
465
466 googleapi.ServerResponse `json:"-"`
467
468
469
470
471
472 ForceSendFields []string `json:"-"`
473
474
475
476
477 NullFields []string `json:"-"`
478 }
479
480 func (s *ListExecutionsResponse) MarshalJSON() ([]byte, error) {
481 type NoMethod ListExecutionsResponse
482 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
483 }
484
485
486
487 type ListStepEntriesResponse struct {
488
489
490
491 NextPageToken string `json:"nextPageToken,omitempty"`
492
493 StepEntries []*StepEntry `json:"stepEntries,omitempty"`
494
495
496
497 TotalSize int64 `json:"totalSize,omitempty"`
498
499
500 googleapi.ServerResponse `json:"-"`
501
502
503
504
505
506 ForceSendFields []string `json:"-"`
507
508
509
510
511 NullFields []string `json:"-"`
512 }
513
514 func (s *ListStepEntriesResponse) MarshalJSON() ([]byte, error) {
515 type NoMethod ListStepEntriesResponse
516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
517 }
518
519
520
521 type NavigationInfo struct {
522
523
524 Children googleapi.Int64s `json:"children,omitempty"`
525
526 Next int64 `json:"next,omitempty,string"`
527
528
529 Parent int64 `json:"parent,omitempty,string"`
530
531 Previous int64 `json:"previous,omitempty,string"`
532
533
534
535
536
537 ForceSendFields []string `json:"-"`
538
539
540
541
542 NullFields []string `json:"-"`
543 }
544
545 func (s *NavigationInfo) MarshalJSON() ([]byte, error) {
546 type NoMethod NavigationInfo
547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
548 }
549
550
551
552
553 type Position struct {
554
555
556 Column int64 `json:"column,omitempty,string"`
557
558
559 Length int64 `json:"length,omitempty,string"`
560
561
562 Line int64 `json:"line,omitempty,string"`
563
564
565
566
567
568 ForceSendFields []string `json:"-"`
569
570
571
572
573 NullFields []string `json:"-"`
574 }
575
576 func (s *Position) MarshalJSON() ([]byte, error) {
577 type NoMethod Position
578 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
579 }
580
581
582
583
584
585
586
587
588
589 type PubsubMessage struct {
590
591
592
593 Attributes map[string]string `json:"attributes,omitempty"`
594
595
596 Data string `json:"data,omitempty"`
597
598
599
600
601 MessageId string `json:"messageId,omitempty"`
602
603
604
605
606
607
608
609
610 OrderingKey string `json:"orderingKey,omitempty"`
611
612
613
614 PublishTime string `json:"publishTime,omitempty"`
615
616
617
618
619
620 ForceSendFields []string `json:"-"`
621
622
623
624
625 NullFields []string `json:"-"`
626 }
627
628 func (s *PubsubMessage) MarshalJSON() ([]byte, error) {
629 type NoMethod PubsubMessage
630 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
631 }
632
633
634 type StackTrace struct {
635
636 Elements []*StackTraceElement `json:"elements,omitempty"`
637
638
639
640
641
642 ForceSendFields []string `json:"-"`
643
644
645
646
647 NullFields []string `json:"-"`
648 }
649
650 func (s *StackTrace) MarshalJSON() ([]byte, error) {
651 type NoMethod StackTrace
652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
653 }
654
655
656 type StackTraceElement struct {
657
658 Position *Position `json:"position,omitempty"`
659
660 Routine string `json:"routine,omitempty"`
661
662 Step string `json:"step,omitempty"`
663
664
665
666
667
668 ForceSendFields []string `json:"-"`
669
670
671
672
673 NullFields []string `json:"-"`
674 }
675
676 func (s *StackTraceElement) MarshalJSON() ([]byte, error) {
677 type NoMethod StackTraceElement
678 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
679 }
680
681
682
683 type StateError struct {
684
685 Details string `json:"details,omitempty"`
686
687
688
689
690
691 Type string `json:"type,omitempty"`
692
693
694
695
696
697 ForceSendFields []string `json:"-"`
698
699
700
701
702 NullFields []string `json:"-"`
703 }
704
705 func (s *StateError) MarshalJSON() ([]byte, error) {
706 type NoMethod StateError
707 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
708 }
709
710
711 type Status struct {
712
713
714
715
716
717
718
719 CurrentSteps []*Step `json:"currentSteps,omitempty"`
720
721
722
723
724
725 ForceSendFields []string `json:"-"`
726
727
728
729
730 NullFields []string `json:"-"`
731 }
732
733 func (s *Status) MarshalJSON() ([]byte, error) {
734 type NoMethod Status
735 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
736 }
737
738
739 type Step struct {
740
741 Routine string `json:"routine,omitempty"`
742
743 Step string `json:"step,omitempty"`
744
745
746
747
748
749 ForceSendFields []string `json:"-"`
750
751
752
753
754 NullFields []string `json:"-"`
755 }
756
757 func (s *Step) MarshalJSON() ([]byte, error) {
758 type NoMethod Step
759 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
760 }
761
762
763
764 type StepEntry struct {
765
766 CreateTime string `json:"createTime,omitempty"`
767
768
769 EntryId int64 `json:"entryId,omitempty,string"`
770
771 Exception *Exception `json:"exception,omitempty"`
772
773
774
775
776
777 Name string `json:"name,omitempty"`
778
779 NavigationInfo *NavigationInfo `json:"navigationInfo,omitempty"`
780
781
782
783 Routine string `json:"routine,omitempty"`
784
785
786
787
788
789
790
791 State string `json:"state,omitempty"`
792
793 Step string `json:"step,omitempty"`
794
795
796 StepEntryMetadata *StepEntryMetadata `json:"stepEntryMetadata,omitempty"`
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826 StepType string `json:"stepType,omitempty"`
827
828 UpdateTime string `json:"updateTime,omitempty"`
829
830
831 googleapi.ServerResponse `json:"-"`
832
833
834
835
836
837 ForceSendFields []string `json:"-"`
838
839
840
841
842 NullFields []string `json:"-"`
843 }
844
845 func (s *StepEntry) MarshalJSON() ([]byte, error) {
846 type NoMethod StepEntry
847 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
848 }
849
850
851
852 type StepEntryMetadata struct {
853
854
855
856 ProgressNumber int64 `json:"progressNumber,omitempty,string"`
857
858
859
860
861
862
863
864
865
866
867
868
869
870 ProgressType string `json:"progressType,omitempty"`
871
872 ThreadId string `json:"threadId,omitempty"`
873
874
875
876
877
878 ForceSendFields []string `json:"-"`
879
880
881
882
883 NullFields []string `json:"-"`
884 }
885
886 func (s *StepEntryMetadata) MarshalJSON() ([]byte, error) {
887 type NoMethod StepEntryMetadata
888 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
889 }
890
891
892
893 type TriggerPubsubExecutionRequest struct {
894
895
896
897 GCPCloudEventsMode string `json:"GCPCloudEventsMode,omitempty"`
898
899
900
901
902 DeliveryAttempt int64 `json:"deliveryAttempt,omitempty"`
903
904 Message *PubsubMessage `json:"message,omitempty"`
905
906
907 Subscription string `json:"subscription,omitempty"`
908
909
910
911
912
913 ForceSendFields []string `json:"-"`
914
915
916
917
918 NullFields []string `json:"-"`
919 }
920
921 func (s *TriggerPubsubExecutionRequest) MarshalJSON() ([]byte, error) {
922 type NoMethod TriggerPubsubExecutionRequest
923 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
924 }
925
926 type ProjectsLocationsWorkflowsTriggerPubsubExecutionCall struct {
927 s *Service
928 workflow string
929 triggerpubsubexecutionrequest *TriggerPubsubExecutionRequest
930 urlParams_ gensupport.URLParams
931 ctx_ context.Context
932 header_ http.Header
933 }
934
935
936
937
938
939
940 func (r *ProjectsLocationsWorkflowsService) TriggerPubsubExecution(workflow string, triggerpubsubexecutionrequest *TriggerPubsubExecutionRequest) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall {
941 c := &ProjectsLocationsWorkflowsTriggerPubsubExecutionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
942 c.workflow = workflow
943 c.triggerpubsubexecutionrequest = triggerpubsubexecutionrequest
944 return c
945 }
946
947
948
949
950 func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall {
951 c.urlParams_.Set("fields", googleapi.CombineFields(s))
952 return c
953 }
954
955
956 func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall {
957 c.ctx_ = ctx
958 return c
959 }
960
961
962
963 func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Header() http.Header {
964 if c.header_ == nil {
965 c.header_ = make(http.Header)
966 }
967 return c.header_
968 }
969
970 func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) doRequest(alt string) (*http.Response, error) {
971 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
972 var body io.Reader = nil
973 body, err := googleapi.WithoutDataWrapper.JSONReader(c.triggerpubsubexecutionrequest)
974 if err != nil {
975 return nil, err
976 }
977 c.urlParams_.Set("alt", alt)
978 c.urlParams_.Set("prettyPrint", "false")
979 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+workflow}:triggerPubsubExecution")
980 urls += "?" + c.urlParams_.Encode()
981 req, err := http.NewRequest("POST", urls, body)
982 if err != nil {
983 return nil, err
984 }
985 req.Header = reqHeaders
986 googleapi.Expand(req.URL, map[string]string{
987 "workflow": c.workflow,
988 })
989 return gensupport.SendRequest(c.ctx_, c.s.client, req)
990 }
991
992
993
994
995
996
997 func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
998 gensupport.SetOptions(c.urlParams_, opts...)
999 res, err := c.doRequest("json")
1000 if res != nil && res.StatusCode == http.StatusNotModified {
1001 if res.Body != nil {
1002 res.Body.Close()
1003 }
1004 return nil, gensupport.WrapError(&googleapi.Error{
1005 Code: res.StatusCode,
1006 Header: res.Header,
1007 })
1008 }
1009 if err != nil {
1010 return nil, err
1011 }
1012 defer googleapi.CloseBody(res)
1013 if err := googleapi.CheckResponse(res); err != nil {
1014 return nil, gensupport.WrapError(err)
1015 }
1016 ret := &Execution{
1017 ServerResponse: googleapi.ServerResponse{
1018 Header: res.Header,
1019 HTTPStatusCode: res.StatusCode,
1020 },
1021 }
1022 target := &ret
1023 if err := gensupport.DecodeResponse(target, res); err != nil {
1024 return nil, err
1025 }
1026 return ret, nil
1027 }
1028
1029 type ProjectsLocationsWorkflowsExecutionsCancelCall struct {
1030 s *Service
1031 name string
1032 cancelexecutionrequest *CancelExecutionRequest
1033 urlParams_ gensupport.URLParams
1034 ctx_ context.Context
1035 header_ http.Header
1036 }
1037
1038
1039
1040
1041
1042
1043 func (r *ProjectsLocationsWorkflowsExecutionsService) Cancel(name string, cancelexecutionrequest *CancelExecutionRequest) *ProjectsLocationsWorkflowsExecutionsCancelCall {
1044 c := &ProjectsLocationsWorkflowsExecutionsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1045 c.name = name
1046 c.cancelexecutionrequest = cancelexecutionrequest
1047 return c
1048 }
1049
1050
1051
1052
1053 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCancelCall {
1054 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1055 return c
1056 }
1057
1058
1059 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCancelCall {
1060 c.ctx_ = ctx
1061 return c
1062 }
1063
1064
1065
1066 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Header() http.Header {
1067 if c.header_ == nil {
1068 c.header_ = make(http.Header)
1069 }
1070 return c.header_
1071 }
1072
1073 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) doRequest(alt string) (*http.Response, error) {
1074 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1075 var body io.Reader = nil
1076 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelexecutionrequest)
1077 if err != nil {
1078 return nil, err
1079 }
1080 c.urlParams_.Set("alt", alt)
1081 c.urlParams_.Set("prettyPrint", "false")
1082 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
1083 urls += "?" + c.urlParams_.Encode()
1084 req, err := http.NewRequest("POST", urls, body)
1085 if err != nil {
1086 return nil, err
1087 }
1088 req.Header = reqHeaders
1089 googleapi.Expand(req.URL, map[string]string{
1090 "name": c.name,
1091 })
1092 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1093 }
1094
1095
1096
1097
1098
1099
1100 func (c *ProjectsLocationsWorkflowsExecutionsCancelCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
1101 gensupport.SetOptions(c.urlParams_, opts...)
1102 res, err := c.doRequest("json")
1103 if res != nil && res.StatusCode == http.StatusNotModified {
1104 if res.Body != nil {
1105 res.Body.Close()
1106 }
1107 return nil, gensupport.WrapError(&googleapi.Error{
1108 Code: res.StatusCode,
1109 Header: res.Header,
1110 })
1111 }
1112 if err != nil {
1113 return nil, err
1114 }
1115 defer googleapi.CloseBody(res)
1116 if err := googleapi.CheckResponse(res); err != nil {
1117 return nil, gensupport.WrapError(err)
1118 }
1119 ret := &Execution{
1120 ServerResponse: googleapi.ServerResponse{
1121 Header: res.Header,
1122 HTTPStatusCode: res.StatusCode,
1123 },
1124 }
1125 target := &ret
1126 if err := gensupport.DecodeResponse(target, res); err != nil {
1127 return nil, err
1128 }
1129 return ret, nil
1130 }
1131
1132 type ProjectsLocationsWorkflowsExecutionsCreateCall struct {
1133 s *Service
1134 parent string
1135 execution *Execution
1136 urlParams_ gensupport.URLParams
1137 ctx_ context.Context
1138 header_ http.Header
1139 }
1140
1141
1142
1143
1144
1145
1146
1147 func (r *ProjectsLocationsWorkflowsExecutionsService) Create(parent string, execution *Execution) *ProjectsLocationsWorkflowsExecutionsCreateCall {
1148 c := &ProjectsLocationsWorkflowsExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1149 c.parent = parent
1150 c.execution = execution
1151 return c
1152 }
1153
1154
1155
1156
1157 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCreateCall {
1158 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1159 return c
1160 }
1161
1162
1163 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCreateCall {
1164 c.ctx_ = ctx
1165 return c
1166 }
1167
1168
1169
1170 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Header() http.Header {
1171 if c.header_ == nil {
1172 c.header_ = make(http.Header)
1173 }
1174 return c.header_
1175 }
1176
1177 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) doRequest(alt string) (*http.Response, error) {
1178 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1179 var body io.Reader = nil
1180 body, err := googleapi.WithoutDataWrapper.JSONReader(c.execution)
1181 if err != nil {
1182 return nil, err
1183 }
1184 c.urlParams_.Set("alt", alt)
1185 c.urlParams_.Set("prettyPrint", "false")
1186 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions")
1187 urls += "?" + c.urlParams_.Encode()
1188 req, err := http.NewRequest("POST", urls, body)
1189 if err != nil {
1190 return nil, err
1191 }
1192 req.Header = reqHeaders
1193 googleapi.Expand(req.URL, map[string]string{
1194 "parent": c.parent,
1195 })
1196 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1197 }
1198
1199
1200
1201
1202
1203
1204 func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
1205 gensupport.SetOptions(c.urlParams_, opts...)
1206 res, err := c.doRequest("json")
1207 if res != nil && res.StatusCode == http.StatusNotModified {
1208 if res.Body != nil {
1209 res.Body.Close()
1210 }
1211 return nil, gensupport.WrapError(&googleapi.Error{
1212 Code: res.StatusCode,
1213 Header: res.Header,
1214 })
1215 }
1216 if err != nil {
1217 return nil, err
1218 }
1219 defer googleapi.CloseBody(res)
1220 if err := googleapi.CheckResponse(res); err != nil {
1221 return nil, gensupport.WrapError(err)
1222 }
1223 ret := &Execution{
1224 ServerResponse: googleapi.ServerResponse{
1225 Header: res.Header,
1226 HTTPStatusCode: res.StatusCode,
1227 },
1228 }
1229 target := &ret
1230 if err := gensupport.DecodeResponse(target, res); err != nil {
1231 return nil, err
1232 }
1233 return ret, nil
1234 }
1235
1236 type ProjectsLocationsWorkflowsExecutionsExportDataCall struct {
1237 s *Service
1238 name string
1239 urlParams_ gensupport.URLParams
1240 ifNoneMatch_ string
1241 ctx_ context.Context
1242 header_ http.Header
1243 }
1244
1245
1246
1247
1248
1249
1250
1251 func (r *ProjectsLocationsWorkflowsExecutionsService) ExportData(name string) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
1252 c := &ProjectsLocationsWorkflowsExecutionsExportDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1253 c.name = name
1254 return c
1255 }
1256
1257
1258
1259
1260 func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
1261 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1262 return c
1263 }
1264
1265
1266
1267
1268 func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
1269 c.ifNoneMatch_ = entityTag
1270 return c
1271 }
1272
1273
1274 func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsExportDataCall {
1275 c.ctx_ = ctx
1276 return c
1277 }
1278
1279
1280
1281 func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Header() http.Header {
1282 if c.header_ == nil {
1283 c.header_ = make(http.Header)
1284 }
1285 return c.header_
1286 }
1287
1288 func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) doRequest(alt string) (*http.Response, error) {
1289 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1290 if c.ifNoneMatch_ != "" {
1291 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1292 }
1293 var body io.Reader = nil
1294 c.urlParams_.Set("alt", alt)
1295 c.urlParams_.Set("prettyPrint", "false")
1296 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportData")
1297 urls += "?" + c.urlParams_.Encode()
1298 req, err := http.NewRequest("GET", urls, body)
1299 if err != nil {
1300 return nil, err
1301 }
1302 req.Header = reqHeaders
1303 googleapi.Expand(req.URL, map[string]string{
1304 "name": c.name,
1305 })
1306 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1307 }
1308
1309
1310
1311
1312
1313
1314
1315 func (c *ProjectsLocationsWorkflowsExecutionsExportDataCall) Do(opts ...googleapi.CallOption) (*ExportDataResponse, error) {
1316 gensupport.SetOptions(c.urlParams_, opts...)
1317 res, err := c.doRequest("json")
1318 if res != nil && res.StatusCode == http.StatusNotModified {
1319 if res.Body != nil {
1320 res.Body.Close()
1321 }
1322 return nil, gensupport.WrapError(&googleapi.Error{
1323 Code: res.StatusCode,
1324 Header: res.Header,
1325 })
1326 }
1327 if err != nil {
1328 return nil, err
1329 }
1330 defer googleapi.CloseBody(res)
1331 if err := googleapi.CheckResponse(res); err != nil {
1332 return nil, gensupport.WrapError(err)
1333 }
1334 ret := &ExportDataResponse{
1335 ServerResponse: googleapi.ServerResponse{
1336 Header: res.Header,
1337 HTTPStatusCode: res.StatusCode,
1338 },
1339 }
1340 target := &ret
1341 if err := gensupport.DecodeResponse(target, res); err != nil {
1342 return nil, err
1343 }
1344 return ret, nil
1345 }
1346
1347 type ProjectsLocationsWorkflowsExecutionsGetCall struct {
1348 s *Service
1349 name string
1350 urlParams_ gensupport.URLParams
1351 ifNoneMatch_ string
1352 ctx_ context.Context
1353 header_ http.Header
1354 }
1355
1356
1357
1358
1359
1360
1361 func (r *ProjectsLocationsWorkflowsExecutionsService) Get(name string) *ProjectsLocationsWorkflowsExecutionsGetCall {
1362 c := &ProjectsLocationsWorkflowsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1363 c.name = name
1364 return c
1365 }
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) View(view string) *ProjectsLocationsWorkflowsExecutionsGetCall {
1380 c.urlParams_.Set("view", view)
1381 return c
1382 }
1383
1384
1385
1386
1387 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsGetCall {
1388 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1389 return c
1390 }
1391
1392
1393
1394
1395 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsGetCall {
1396 c.ifNoneMatch_ = entityTag
1397 return c
1398 }
1399
1400
1401 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsGetCall {
1402 c.ctx_ = ctx
1403 return c
1404 }
1405
1406
1407
1408 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Header() http.Header {
1409 if c.header_ == nil {
1410 c.header_ = make(http.Header)
1411 }
1412 return c.header_
1413 }
1414
1415 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) doRequest(alt string) (*http.Response, error) {
1416 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1417 if c.ifNoneMatch_ != "" {
1418 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1419 }
1420 var body io.Reader = nil
1421 c.urlParams_.Set("alt", alt)
1422 c.urlParams_.Set("prettyPrint", "false")
1423 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1424 urls += "?" + c.urlParams_.Encode()
1425 req, err := http.NewRequest("GET", urls, body)
1426 if err != nil {
1427 return nil, err
1428 }
1429 req.Header = reqHeaders
1430 googleapi.Expand(req.URL, map[string]string{
1431 "name": c.name,
1432 })
1433 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1434 }
1435
1436
1437
1438
1439
1440
1441 func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
1442 gensupport.SetOptions(c.urlParams_, opts...)
1443 res, err := c.doRequest("json")
1444 if res != nil && res.StatusCode == http.StatusNotModified {
1445 if res.Body != nil {
1446 res.Body.Close()
1447 }
1448 return nil, gensupport.WrapError(&googleapi.Error{
1449 Code: res.StatusCode,
1450 Header: res.Header,
1451 })
1452 }
1453 if err != nil {
1454 return nil, err
1455 }
1456 defer googleapi.CloseBody(res)
1457 if err := googleapi.CheckResponse(res); err != nil {
1458 return nil, gensupport.WrapError(err)
1459 }
1460 ret := &Execution{
1461 ServerResponse: googleapi.ServerResponse{
1462 Header: res.Header,
1463 HTTPStatusCode: res.StatusCode,
1464 },
1465 }
1466 target := &ret
1467 if err := gensupport.DecodeResponse(target, res); err != nil {
1468 return nil, err
1469 }
1470 return ret, nil
1471 }
1472
1473 type ProjectsLocationsWorkflowsExecutionsListCall struct {
1474 s *Service
1475 parent string
1476 urlParams_ gensupport.URLParams
1477 ifNoneMatch_ string
1478 ctx_ context.Context
1479 header_ http.Header
1480 }
1481
1482
1483
1484
1485
1486
1487
1488 func (r *ProjectsLocationsWorkflowsExecutionsService) List(parent string) *ProjectsLocationsWorkflowsExecutionsListCall {
1489 c := &ProjectsLocationsWorkflowsExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1490 c.parent = parent
1491 return c
1492 }
1493
1494
1495
1496
1497
1498
1499
1500 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Filter(filter string) *ProjectsLocationsWorkflowsExecutionsListCall {
1501 c.urlParams_.Set("filter", filter)
1502 return c
1503 }
1504
1505
1506
1507
1508
1509
1510
1511 func (c *ProjectsLocationsWorkflowsExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsWorkflowsExecutionsListCall {
1512 c.urlParams_.Set("orderBy", orderBy)
1513 return c
1514 }
1515
1516
1517
1518
1519
1520
1521 func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsExecutionsListCall {
1522 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1523 return c
1524 }
1525
1526
1527
1528
1529
1530
1531
1532 func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsListCall {
1533 c.urlParams_.Set("pageToken", pageToken)
1534 return c
1535 }
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550 func (c *ProjectsLocationsWorkflowsExecutionsListCall) View(view string) *ProjectsLocationsWorkflowsExecutionsListCall {
1551 c.urlParams_.Set("view", view)
1552 return c
1553 }
1554
1555
1556
1557
1558 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsListCall {
1559 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1560 return c
1561 }
1562
1563
1564
1565
1566 func (c *ProjectsLocationsWorkflowsExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsListCall {
1567 c.ifNoneMatch_ = entityTag
1568 return c
1569 }
1570
1571
1572 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsListCall {
1573 c.ctx_ = ctx
1574 return c
1575 }
1576
1577
1578
1579 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Header() http.Header {
1580 if c.header_ == nil {
1581 c.header_ = make(http.Header)
1582 }
1583 return c.header_
1584 }
1585
1586 func (c *ProjectsLocationsWorkflowsExecutionsListCall) doRequest(alt string) (*http.Response, error) {
1587 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1588 if c.ifNoneMatch_ != "" {
1589 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1590 }
1591 var body io.Reader = nil
1592 c.urlParams_.Set("alt", alt)
1593 c.urlParams_.Set("prettyPrint", "false")
1594 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions")
1595 urls += "?" + c.urlParams_.Encode()
1596 req, err := http.NewRequest("GET", urls, body)
1597 if err != nil {
1598 return nil, err
1599 }
1600 req.Header = reqHeaders
1601 googleapi.Expand(req.URL, map[string]string{
1602 "parent": c.parent,
1603 })
1604 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1605 }
1606
1607
1608
1609
1610
1611
1612
1613 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, error) {
1614 gensupport.SetOptions(c.urlParams_, opts...)
1615 res, err := c.doRequest("json")
1616 if res != nil && res.StatusCode == http.StatusNotModified {
1617 if res.Body != nil {
1618 res.Body.Close()
1619 }
1620 return nil, gensupport.WrapError(&googleapi.Error{
1621 Code: res.StatusCode,
1622 Header: res.Header,
1623 })
1624 }
1625 if err != nil {
1626 return nil, err
1627 }
1628 defer googleapi.CloseBody(res)
1629 if err := googleapi.CheckResponse(res); err != nil {
1630 return nil, gensupport.WrapError(err)
1631 }
1632 ret := &ListExecutionsResponse{
1633 ServerResponse: googleapi.ServerResponse{
1634 Header: res.Header,
1635 HTTPStatusCode: res.StatusCode,
1636 },
1637 }
1638 target := &ret
1639 if err := gensupport.DecodeResponse(target, res); err != nil {
1640 return nil, err
1641 }
1642 return ret, nil
1643 }
1644
1645
1646
1647
1648 func (c *ProjectsLocationsWorkflowsExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) error) error {
1649 c.ctx_ = ctx
1650 defer c.PageToken(c.urlParams_.Get("pageToken"))
1651 for {
1652 x, err := c.Do()
1653 if err != nil {
1654 return err
1655 }
1656 if err := f(x); err != nil {
1657 return err
1658 }
1659 if x.NextPageToken == "" {
1660 return nil
1661 }
1662 c.PageToken(x.NextPageToken)
1663 }
1664 }
1665
1666 type ProjectsLocationsWorkflowsExecutionsCallbacksListCall struct {
1667 s *Service
1668 parent string
1669 urlParams_ gensupport.URLParams
1670 ifNoneMatch_ string
1671 ctx_ context.Context
1672 header_ http.Header
1673 }
1674
1675
1676
1677
1678
1679
1680
1681
1682 func (r *ProjectsLocationsWorkflowsExecutionsCallbacksService) List(parent string) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
1683 c := &ProjectsLocationsWorkflowsExecutionsCallbacksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1684 c.parent = parent
1685 return c
1686 }
1687
1688
1689
1690 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
1691 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1692 return c
1693 }
1694
1695
1696
1697
1698
1699
1700 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
1701 c.urlParams_.Set("pageToken", pageToken)
1702 return c
1703 }
1704
1705
1706
1707
1708 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
1709 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1710 return c
1711 }
1712
1713
1714
1715
1716 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
1717 c.ifNoneMatch_ = entityTag
1718 return c
1719 }
1720
1721
1722 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsCallbacksListCall {
1723 c.ctx_ = ctx
1724 return c
1725 }
1726
1727
1728
1729 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Header() http.Header {
1730 if c.header_ == nil {
1731 c.header_ = make(http.Header)
1732 }
1733 return c.header_
1734 }
1735
1736 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) doRequest(alt string) (*http.Response, error) {
1737 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1738 if c.ifNoneMatch_ != "" {
1739 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1740 }
1741 var body io.Reader = nil
1742 c.urlParams_.Set("alt", alt)
1743 c.urlParams_.Set("prettyPrint", "false")
1744 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/callbacks")
1745 urls += "?" + c.urlParams_.Encode()
1746 req, err := http.NewRequest("GET", urls, body)
1747 if err != nil {
1748 return nil, err
1749 }
1750 req.Header = reqHeaders
1751 googleapi.Expand(req.URL, map[string]string{
1752 "parent": c.parent,
1753 })
1754 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1755 }
1756
1757
1758
1759
1760
1761
1762
1763 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Do(opts ...googleapi.CallOption) (*ListCallbacksResponse, error) {
1764 gensupport.SetOptions(c.urlParams_, opts...)
1765 res, err := c.doRequest("json")
1766 if res != nil && res.StatusCode == http.StatusNotModified {
1767 if res.Body != nil {
1768 res.Body.Close()
1769 }
1770 return nil, gensupport.WrapError(&googleapi.Error{
1771 Code: res.StatusCode,
1772 Header: res.Header,
1773 })
1774 }
1775 if err != nil {
1776 return nil, err
1777 }
1778 defer googleapi.CloseBody(res)
1779 if err := googleapi.CheckResponse(res); err != nil {
1780 return nil, gensupport.WrapError(err)
1781 }
1782 ret := &ListCallbacksResponse{
1783 ServerResponse: googleapi.ServerResponse{
1784 Header: res.Header,
1785 HTTPStatusCode: res.StatusCode,
1786 },
1787 }
1788 target := &ret
1789 if err := gensupport.DecodeResponse(target, res); err != nil {
1790 return nil, err
1791 }
1792 return ret, nil
1793 }
1794
1795
1796
1797
1798 func (c *ProjectsLocationsWorkflowsExecutionsCallbacksListCall) Pages(ctx context.Context, f func(*ListCallbacksResponse) error) error {
1799 c.ctx_ = ctx
1800 defer c.PageToken(c.urlParams_.Get("pageToken"))
1801 for {
1802 x, err := c.Do()
1803 if err != nil {
1804 return err
1805 }
1806 if err := f(x); err != nil {
1807 return err
1808 }
1809 if x.NextPageToken == "" {
1810 return nil
1811 }
1812 c.PageToken(x.NextPageToken)
1813 }
1814 }
1815
1816 type ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall struct {
1817 s *Service
1818 name string
1819 urlParams_ gensupport.URLParams
1820 ifNoneMatch_ string
1821 ctx_ context.Context
1822 header_ http.Header
1823 }
1824
1825
1826
1827
1828
1829
1830 func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) Get(name string) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
1831 c := &ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1832 c.name = name
1833 return c
1834 }
1835
1836
1837
1838
1839 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
1840 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1841 return c
1842 }
1843
1844
1845
1846
1847 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
1848 c.ifNoneMatch_ = entityTag
1849 return c
1850 }
1851
1852
1853 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall {
1854 c.ctx_ = ctx
1855 return c
1856 }
1857
1858
1859
1860 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Header() http.Header {
1861 if c.header_ == nil {
1862 c.header_ = make(http.Header)
1863 }
1864 return c.header_
1865 }
1866
1867 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) doRequest(alt string) (*http.Response, error) {
1868 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1869 if c.ifNoneMatch_ != "" {
1870 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1871 }
1872 var body io.Reader = nil
1873 c.urlParams_.Set("alt", alt)
1874 c.urlParams_.Set("prettyPrint", "false")
1875 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1876 urls += "?" + c.urlParams_.Encode()
1877 req, err := http.NewRequest("GET", urls, body)
1878 if err != nil {
1879 return nil, err
1880 }
1881 req.Header = reqHeaders
1882 googleapi.Expand(req.URL, map[string]string{
1883 "name": c.name,
1884 })
1885 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1886 }
1887
1888
1889
1890
1891
1892
1893 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) Do(opts ...googleapi.CallOption) (*StepEntry, error) {
1894 gensupport.SetOptions(c.urlParams_, opts...)
1895 res, err := c.doRequest("json")
1896 if res != nil && res.StatusCode == http.StatusNotModified {
1897 if res.Body != nil {
1898 res.Body.Close()
1899 }
1900 return nil, gensupport.WrapError(&googleapi.Error{
1901 Code: res.StatusCode,
1902 Header: res.Header,
1903 })
1904 }
1905 if err != nil {
1906 return nil, err
1907 }
1908 defer googleapi.CloseBody(res)
1909 if err := googleapi.CheckResponse(res); err != nil {
1910 return nil, gensupport.WrapError(err)
1911 }
1912 ret := &StepEntry{
1913 ServerResponse: googleapi.ServerResponse{
1914 Header: res.Header,
1915 HTTPStatusCode: res.StatusCode,
1916 },
1917 }
1918 target := &ret
1919 if err := gensupport.DecodeResponse(target, res); err != nil {
1920 return nil, err
1921 }
1922 return ret, nil
1923 }
1924
1925 type ProjectsLocationsWorkflowsExecutionsStepEntriesListCall struct {
1926 s *Service
1927 parent string
1928 urlParams_ gensupport.URLParams
1929 ifNoneMatch_ string
1930 ctx_ context.Context
1931 header_ http.Header
1932 }
1933
1934
1935
1936
1937
1938
1939
1940 func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) List(parent string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
1941 c := &ProjectsLocationsWorkflowsExecutionsStepEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1942 c.parent = parent
1943 return c
1944 }
1945
1946
1947
1948
1949
1950
1951
1952 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Filter(filter string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
1953 c.urlParams_.Set("filter", filter)
1954 return c
1955 }
1956
1957
1958
1959
1960
1961
1962
1963 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) OrderBy(orderBy string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
1964 c.urlParams_.Set("orderBy", orderBy)
1965 return c
1966 }
1967
1968
1969
1970 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
1971 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1972 return c
1973 }
1974
1975
1976
1977
1978
1979 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
1980 c.urlParams_.Set("pageToken", pageToken)
1981 return c
1982 }
1983
1984
1985
1986
1987
1988 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Skip(skip int64) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
1989 c.urlParams_.Set("skip", fmt.Sprint(skip))
1990 return c
1991 }
1992
1993
1994
1995
1996 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
1997 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1998 return c
1999 }
2000
2001
2002
2003
2004 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
2005 c.ifNoneMatch_ = entityTag
2006 return c
2007 }
2008
2009
2010 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall {
2011 c.ctx_ = ctx
2012 return c
2013 }
2014
2015
2016
2017 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Header() http.Header {
2018 if c.header_ == nil {
2019 c.header_ = make(http.Header)
2020 }
2021 return c.header_
2022 }
2023
2024 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) doRequest(alt string) (*http.Response, error) {
2025 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2026 if c.ifNoneMatch_ != "" {
2027 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2028 }
2029 var body io.Reader = nil
2030 c.urlParams_.Set("alt", alt)
2031 c.urlParams_.Set("prettyPrint", "false")
2032 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/stepEntries")
2033 urls += "?" + c.urlParams_.Encode()
2034 req, err := http.NewRequest("GET", urls, body)
2035 if err != nil {
2036 return nil, err
2037 }
2038 req.Header = reqHeaders
2039 googleapi.Expand(req.URL, map[string]string{
2040 "parent": c.parent,
2041 })
2042 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2043 }
2044
2045
2046
2047
2048
2049
2050
2051 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Do(opts ...googleapi.CallOption) (*ListStepEntriesResponse, error) {
2052 gensupport.SetOptions(c.urlParams_, opts...)
2053 res, err := c.doRequest("json")
2054 if res != nil && res.StatusCode == http.StatusNotModified {
2055 if res.Body != nil {
2056 res.Body.Close()
2057 }
2058 return nil, gensupport.WrapError(&googleapi.Error{
2059 Code: res.StatusCode,
2060 Header: res.Header,
2061 })
2062 }
2063 if err != nil {
2064 return nil, err
2065 }
2066 defer googleapi.CloseBody(res)
2067 if err := googleapi.CheckResponse(res); err != nil {
2068 return nil, gensupport.WrapError(err)
2069 }
2070 ret := &ListStepEntriesResponse{
2071 ServerResponse: googleapi.ServerResponse{
2072 Header: res.Header,
2073 HTTPStatusCode: res.StatusCode,
2074 },
2075 }
2076 target := &ret
2077 if err := gensupport.DecodeResponse(target, res); err != nil {
2078 return nil, err
2079 }
2080 return ret, nil
2081 }
2082
2083
2084
2085
2086 func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Pages(ctx context.Context, f func(*ListStepEntriesResponse) error) error {
2087 c.ctx_ = ctx
2088 defer c.PageToken(c.urlParams_.Get("pageToken"))
2089 for {
2090 x, err := c.Do()
2091 if err != nil {
2092 return err
2093 }
2094 if err := f(x); err != nil {
2095 return err
2096 }
2097 if x.NextPageToken == "" {
2098 return nil
2099 }
2100 c.PageToken(x.NextPageToken)
2101 }
2102 }
2103
View as plain text