Skip to content

Commit 853ae5c

Browse files
feat(api): manual updates (#38)
1 parent dde5301 commit 853ae5c

12 files changed

+33
-33
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f6598ab5d6827f66b642201769e92590ea32af84ebbf24b18cc32b33dee5107e.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-410f762771ac58738f3d165b19c5e2e9377ebbfa3f090f041e269142cfa2e7f4.yml

environment.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,7 +2215,7 @@ func (r EnvironmentStatusSSHPublicKeysPhase) IsKnown() bool {
22152215

22162216
type EnvironmentNewResponse struct {
22172217
// +resource get environment
2218-
Environment Environment `json:"environment"`
2218+
Environment Environment `json:"environment,required"`
22192219
JSON environmentNewResponseJSON `json:"-"`
22202220
}
22212221

@@ -2237,7 +2237,7 @@ func (r environmentNewResponseJSON) RawJSON() string {
22372237

22382238
type EnvironmentGetResponse struct {
22392239
// +resource get environment
2240-
Environment Environment `json:"environment"`
2240+
Environment Environment `json:"environment,required"`
22412241
JSON environmentGetResponseJSON `json:"-"`
22422242
}
22432243

@@ -2263,7 +2263,7 @@ type EnvironmentDeleteResponse = interface{}
22632263

22642264
type EnvironmentNewFromProjectResponse struct {
22652265
// +resource get environment
2266-
Environment Environment `json:"environment"`
2266+
Environment Environment `json:"environment,required"`
22672267
JSON environmentNewFromProjectResponseJSON `json:"-"`
22682268
}
22692269

@@ -2285,7 +2285,7 @@ func (r environmentNewFromProjectResponseJSON) RawJSON() string {
22852285

22862286
type EnvironmentNewLogsTokenResponse struct {
22872287
// access_token is the token that can be used to access the logs of the environment
2288-
AccessToken string `json:"accessToken"`
2288+
AccessToken string `json:"accessToken,required"`
22892289
JSON environmentNewLogsTokenResponseJSON `json:"-"`
22902290
}
22912291

environmentautomationservice.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ func (r serviceStatusJSON) RawJSON() string {
784784
}
785785

786786
type EnvironmentAutomationServiceNewResponse struct {
787-
Service Service `json:"service"`
787+
Service Service `json:"service,required"`
788788
JSON environmentAutomationServiceNewResponseJSON `json:"-"`
789789
}
790790

@@ -805,7 +805,7 @@ func (r environmentAutomationServiceNewResponseJSON) RawJSON() string {
805805
}
806806

807807
type EnvironmentAutomationServiceGetResponse struct {
808-
Service Service `json:"service"`
808+
Service Service `json:"service,required"`
809809
JSON environmentAutomationServiceGetResponseJSON `json:"-"`
810810
}
811811

environmentautomationtask.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (r *EnvironmentAutomationTaskService) Start(ctx context.Context, body Envir
281281
}
282282

283283
type EnvironmentAutomationTaskNewResponse struct {
284-
Task shared.Task `json:"task"`
284+
Task shared.Task `json:"task,required"`
285285
JSON environmentAutomationTaskNewResponseJSON `json:"-"`
286286
}
287287

@@ -302,7 +302,7 @@ func (r environmentAutomationTaskNewResponseJSON) RawJSON() string {
302302
}
303303

304304
type EnvironmentAutomationTaskGetResponse struct {
305-
Task shared.Task `json:"task"`
305+
Task shared.Task `json:"task,required"`
306306
JSON environmentAutomationTaskGetResponseJSON `json:"-"`
307307
}
308308

@@ -327,7 +327,7 @@ type EnvironmentAutomationTaskUpdateResponse = interface{}
327327
type EnvironmentAutomationTaskDeleteResponse = interface{}
328328

329329
type EnvironmentAutomationTaskStartResponse struct {
330-
TaskExecution shared.TaskExecution `json:"taskExecution"`
330+
TaskExecution shared.TaskExecution `json:"taskExecution,required"`
331331
JSON environmentAutomationTaskStartResponseJSON `json:"-"`
332332
}
333333

environmentautomationtaskexecution.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (r *EnvironmentAutomationTaskExecutionService) Stop(ctx context.Context, bo
169169
}
170170

171171
type EnvironmentAutomationTaskExecutionGetResponse struct {
172-
TaskExecution shared.TaskExecution `json:"taskExecution"`
172+
TaskExecution shared.TaskExecution `json:"taskExecution,required"`
173173
JSON environmentAutomationTaskExecutionGetResponseJSON `json:"-"`
174174
}
175175

runner.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,22 +661,22 @@ func (r runnerStatusJSON) RawJSON() string {
661661
}
662662

663663
type RunnerNewResponse struct {
664+
Runner Runner `json:"runner,required"`
664665
// deprecated, will be removed. Use exchange_token instead.
665666
AccessToken string `json:"accessToken"`
666667
// exchange_token is a one-time use token that should be exchanged by the runner
667668
// for an access token, using the IdentityService.ExchangeToken rpc. The token
668669
// expires after 24 hours.
669670
ExchangeToken string `json:"exchangeToken"`
670-
Runner Runner `json:"runner"`
671671
JSON runnerNewResponseJSON `json:"-"`
672672
}
673673

674674
// runnerNewResponseJSON contains the JSON metadata for the struct
675675
// [RunnerNewResponse]
676676
type runnerNewResponseJSON struct {
677+
Runner apijson.Field
677678
AccessToken apijson.Field
678679
ExchangeToken apijson.Field
679-
Runner apijson.Field
680680
raw string
681681
ExtraFields map[string]apijson.Field
682682
}
@@ -690,7 +690,7 @@ func (r runnerNewResponseJSON) RawJSON() string {
690690
}
691691

692692
type RunnerGetResponse struct {
693-
Runner Runner `json:"runner"`
693+
Runner Runner `json:"runner,required"`
694694
JSON runnerGetResponseJSON `json:"-"`
695695
}
696696

runnerconfiguration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ func TestRunnerConfigurationValidateWithOptionalParams(t *testing.T) {
2929
)
3030
_, err := client.Runners.Configurations.Validate(context.TODO(), gitpod.RunnerConfigurationValidateParams{
3131
EnvironmentClass: gitpod.F(shared.EnvironmentClassParam{
32-
ID: gitpod.F("id"),
32+
ID: gitpod.F("id"),
33+
RunnerID: gitpod.F("runnerId"),
3334
Configuration: gitpod.F([]shared.FieldValueParam{{
3435
Key: gitpod.F("key"),
3536
Value: gitpod.F("value"),
3637
}}),
3738
Description: gitpod.F("xxx"),
3839
DisplayName: gitpod.F("xxx"),
3940
Enabled: gitpod.F(true),
40-
RunnerID: gitpod.F("runnerId"),
4141
}),
4242
RunnerID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
4343
ScmIntegration: gitpod.F(gitpod.RunnerConfigurationValidateParamsScmIntegration{

runnerconfigurationhostauthenticationtoken.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (r *RunnerConfigurationHostAuthenticationTokenService) Delete(ctx context.C
9292
}
9393

9494
type HostAuthenticationToken struct {
95-
ID string `json:"id"`
95+
ID string `json:"id,required"`
9696
// A Timestamp represents a point in time independent of any time zone or local
9797
// calendar, encoded as a count of seconds and fractions of seconds at nanosecond
9898
// resolution. The count is relative to an epoch at UTC midnight on January 1,
@@ -227,7 +227,7 @@ func (r HostAuthenticationTokenSource) IsKnown() bool {
227227
}
228228

229229
type RunnerConfigurationHostAuthenticationTokenNewResponse struct {
230-
Token HostAuthenticationToken `json:"token"`
230+
Token HostAuthenticationToken `json:"token,required"`
231231
JSON runnerConfigurationHostAuthenticationTokenNewResponseJSON `json:"-"`
232232
}
233233

@@ -248,7 +248,7 @@ func (r runnerConfigurationHostAuthenticationTokenNewResponseJSON) RawJSON() str
248248
}
249249

250250
type RunnerConfigurationHostAuthenticationTokenGetResponse struct {
251-
Token HostAuthenticationToken `json:"token"`
251+
Token HostAuthenticationToken `json:"token,required"`
252252
JSON runnerConfigurationHostAuthenticationTokenGetResponseJSON `json:"-"`
253253
}
254254

runnerpolicy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (r RunnerRole) IsKnown() bool {
121121
}
122122

123123
type RunnerPolicyNewResponse struct {
124-
Policy RunnerPolicy `json:"policy"`
124+
Policy RunnerPolicy `json:"policy,required"`
125125
JSON runnerPolicyNewResponseJSON `json:"-"`
126126
}
127127

@@ -142,7 +142,7 @@ func (r runnerPolicyNewResponseJSON) RawJSON() string {
142142
}
143143

144144
type RunnerPolicyUpdateResponse struct {
145-
Policy RunnerPolicy `json:"policy"`
145+
Policy RunnerPolicy `json:"policy,required"`
146146
JSON runnerPolicyUpdateResponseJSON `json:"-"`
147147
}
148148

shared/shared.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ func (r AutomationTriggerParam) MarshalJSON() (data []byte, err error) {
5555
type EnvironmentClass struct {
5656
// id is the unique identifier of the environment class
5757
ID string `json:"id,required"`
58+
// runner_id is the unique identifier of the runner the environment class belongs
59+
// to
60+
RunnerID string `json:"runnerId,required"`
5861
// configuration describes the configuration of the environment class
5962
Configuration []FieldValue `json:"configuration"`
6063
// description is a human readable description of the environment class
@@ -63,22 +66,19 @@ type EnvironmentClass struct {
6366
DisplayName string `json:"displayName"`
6467
// enabled indicates whether the environment class can be used to create new
6568
// environments.
66-
Enabled bool `json:"enabled"`
67-
// runner_id is the unique identifier of the runner the environment class belongs
68-
// to
69-
RunnerID string `json:"runnerId"`
70-
JSON environmentClassJSON `json:"-"`
69+
Enabled bool `json:"enabled"`
70+
JSON environmentClassJSON `json:"-"`
7171
}
7272

7373
// environmentClassJSON contains the JSON metadata for the struct
7474
// [EnvironmentClass]
7575
type environmentClassJSON struct {
7676
ID apijson.Field
77+
RunnerID apijson.Field
7778
Configuration apijson.Field
7879
Description apijson.Field
7980
DisplayName apijson.Field
8081
Enabled apijson.Field
81-
RunnerID apijson.Field
8282
raw string
8383
ExtraFields map[string]apijson.Field
8484
}
@@ -94,6 +94,9 @@ func (r environmentClassJSON) RawJSON() string {
9494
type EnvironmentClassParam struct {
9595
// id is the unique identifier of the environment class
9696
ID param.Field[string] `json:"id,required"`
97+
// runner_id is the unique identifier of the runner the environment class belongs
98+
// to
99+
RunnerID param.Field[string] `json:"runnerId,required"`
97100
// configuration describes the configuration of the environment class
98101
Configuration param.Field[[]FieldValueParam] `json:"configuration"`
99102
// description is a human readable description of the environment class
@@ -103,9 +106,6 @@ type EnvironmentClassParam struct {
103106
// enabled indicates whether the environment class can be used to create new
104107
// environments.
105108
Enabled param.Field[bool] `json:"enabled"`
106-
// runner_id is the unique identifier of the runner the environment class belongs
107-
// to
108-
RunnerID param.Field[string] `json:"runnerId"`
109109
}
110110

111111
func (r EnvironmentClassParam) MarshalJSON() (data []byte, err error) {
@@ -302,7 +302,7 @@ func (r taskJSON) RawJSON() string {
302302
}
303303

304304
type TaskExecution struct {
305-
ID string `json:"id" format:"uuid"`
305+
ID string `json:"id,required" format:"uuid"`
306306
Metadata TaskExecutionMetadata `json:"metadata"`
307307
Spec TaskExecutionSpec `json:"spec"`
308308
Status TaskExecutionStatus `json:"status"`

0 commit comments

Comments
 (0)