@@ -4,6 +4,7 @@ package gitpod
4
4
5
5
import (
6
6
"context"
7
+ "fmt"
7
8
"net/http"
8
9
"net/url"
9
10
"reflect"
@@ -40,6 +41,12 @@ func NewEnvironmentAutomationTaskExecutionService(opts ...option.RequestOption)
40
41
41
42
// GetTaskExecution
42
43
func (r * EnvironmentAutomationTaskExecutionService ) Get (ctx context.Context , params EnvironmentAutomationTaskExecutionGetParams , opts ... option.RequestOption ) (res * EnvironmentAutomationTaskExecutionGetResponse , err error ) {
44
+ if params .ConnectProtocolVersion .Present {
45
+ opts = append (opts , option .WithHeader ("Connect-Protocol-Version" , fmt .Sprintf ("%s" , params .ConnectProtocolVersion )))
46
+ }
47
+ if params .ConnectTimeoutMs .Present {
48
+ opts = append (opts , option .WithHeader ("Connect-Timeout-Ms" , fmt .Sprintf ("%s" , params .ConnectTimeoutMs )))
49
+ }
43
50
opts = append (r .Options [:], opts ... )
44
51
path := "gitpod.v1.EnvironmentAutomationService/GetTaskExecution"
45
52
err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , params , & res , opts ... )
@@ -48,6 +55,12 @@ func (r *EnvironmentAutomationTaskExecutionService) Get(ctx context.Context, par
48
55
49
56
// ListTaskExecutions
50
57
func (r * EnvironmentAutomationTaskExecutionService ) List (ctx context.Context , params EnvironmentAutomationTaskExecutionListParams , opts ... option.RequestOption ) (res * EnvironmentAutomationTaskExecutionListResponse , err error ) {
58
+ if params .ConnectProtocolVersion .Present {
59
+ opts = append (opts , option .WithHeader ("Connect-Protocol-Version" , fmt .Sprintf ("%s" , params .ConnectProtocolVersion )))
60
+ }
61
+ if params .ConnectTimeoutMs .Present {
62
+ opts = append (opts , option .WithHeader ("Connect-Timeout-Ms" , fmt .Sprintf ("%s" , params .ConnectTimeoutMs )))
63
+ }
51
64
opts = append (r .Options [:], opts ... )
52
65
path := "gitpod.v1.EnvironmentAutomationService/ListTaskExecutions"
53
66
err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , params , & res , opts ... )
@@ -56,6 +69,12 @@ func (r *EnvironmentAutomationTaskExecutionService) List(ctx context.Context, pa
56
69
57
70
// ListTaskExecutions
58
71
func (r * EnvironmentAutomationTaskExecutionService ) NewList (ctx context.Context , params EnvironmentAutomationTaskExecutionNewListParams , opts ... option.RequestOption ) (res * EnvironmentAutomationTaskExecutionNewListResponse , err error ) {
72
+ if params .ConnectProtocolVersion .Present {
73
+ opts = append (opts , option .WithHeader ("Connect-Protocol-Version" , fmt .Sprintf ("%s" , params .ConnectProtocolVersion )))
74
+ }
75
+ if params .ConnectTimeoutMs .Present {
76
+ opts = append (opts , option .WithHeader ("Connect-Timeout-Ms" , fmt .Sprintf ("%s" , params .ConnectTimeoutMs )))
77
+ }
59
78
opts = append (r .Options [:], opts ... )
60
79
path := "gitpod.v1.EnvironmentAutomationService/ListTaskExecutions"
61
80
err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
@@ -64,6 +83,12 @@ func (r *EnvironmentAutomationTaskExecutionService) NewList(ctx context.Context,
64
83
65
84
// GetTaskExecution
66
85
func (r * EnvironmentAutomationTaskExecutionService ) NewGet (ctx context.Context , params EnvironmentAutomationTaskExecutionNewGetParams , opts ... option.RequestOption ) (res * EnvironmentAutomationTaskExecutionNewGetResponse , err error ) {
86
+ if params .ConnectProtocolVersion .Present {
87
+ opts = append (opts , option .WithHeader ("Connect-Protocol-Version" , fmt .Sprintf ("%s" , params .ConnectProtocolVersion )))
88
+ }
89
+ if params .ConnectTimeoutMs .Present {
90
+ opts = append (opts , option .WithHeader ("Connect-Timeout-Ms" , fmt .Sprintf ("%s" , params .ConnectTimeoutMs )))
91
+ }
67
92
opts = append (r .Options [:], opts ... )
68
93
path := "gitpod.v1.EnvironmentAutomationService/GetTaskExecution"
69
94
err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
@@ -72,6 +97,12 @@ func (r *EnvironmentAutomationTaskExecutionService) NewGet(ctx context.Context,
72
97
73
98
// StopTaskExecution
74
99
func (r * EnvironmentAutomationTaskExecutionService ) Stop (ctx context.Context , params EnvironmentAutomationTaskExecutionStopParams , opts ... option.RequestOption ) (res * EnvironmentAutomationTaskExecutionStopResponse , err error ) {
100
+ if params .ConnectProtocolVersion .Present {
101
+ opts = append (opts , option .WithHeader ("Connect-Protocol-Version" , fmt .Sprintf ("%s" , params .ConnectProtocolVersion )))
102
+ }
103
+ if params .ConnectTimeoutMs .Present {
104
+ opts = append (opts , option .WithHeader ("Connect-Timeout-Ms" , fmt .Sprintf ("%s" , params .ConnectTimeoutMs )))
105
+ }
75
106
opts = append (r .Options [:], opts ... )
76
107
path := "gitpod.v1.EnvironmentAutomationService/StopTaskExecution"
77
108
err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
@@ -81,6 +112,12 @@ func (r *EnvironmentAutomationTaskExecutionService) Stop(ctx context.Context, pa
81
112
// UpdateTaskExecutionStatus updates the status of a task execution. Only the
82
113
// environment executing a task execution is expected to call this function.
83
114
func (r * EnvironmentAutomationTaskExecutionService ) UpdateTaskExecutionStatus (ctx context.Context , params EnvironmentAutomationTaskExecutionUpdateTaskExecutionStatusParams , opts ... option.RequestOption ) (res * EnvironmentAutomationTaskExecutionUpdateTaskExecutionStatusResponse , err error ) {
115
+ if params .ConnectProtocolVersion .Present {
116
+ opts = append (opts , option .WithHeader ("Connect-Protocol-Version" , fmt .Sprintf ("%s" , params .ConnectProtocolVersion )))
117
+ }
118
+ if params .ConnectTimeoutMs .Present {
119
+ opts = append (opts , option .WithHeader ("Connect-Timeout-Ms" , fmt .Sprintf ("%s" , params .ConnectTimeoutMs )))
120
+ }
84
121
opts = append (r .Options [:], opts ... )
85
122
path := "gitpod.v1.EnvironmentAutomationService/UpdateTaskExecutionStatus"
86
123
err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
0 commit comments