Skip to content

Commit 48d0b3d

Browse files
feat(api): update via SDK Studio
1 parent 8c6285b commit 48d0b3d

4 files changed

Lines changed: 44 additions & 36 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d2dfee8d576aa73f6075e6da61228571cb2e844b969a06067e34e43eb7898554.yml
3-
openapi_spec_hash: 9981744bf9c27426cdf721f7b27cf093
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-aec3b879aa30638614c6217afbafcf737f37ac78ef3a51186dbf7b6fbf9e91ef.yml
3+
openapi_spec_hash: 0aba27c707612e35b4068b1d748dc379
44
config_hash: a085d1b39ddf0b26ee798501a9f47e20

appdeployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ type AppDeploymentFollowResponseLog struct {
277277
// Log message text.
278278
Message string `json:"message,required"`
279279
// Time the log entry was produced.
280-
Timestamp time.Time `json:"timestamp" format:"date-time"`
280+
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
281281
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
282282
JSON struct {
283283
Event respjson.Field

deployment.go

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ type DeploymentFollowResponseUnion struct {
206206
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
207207
AppName string `json:"app_name"`
208208
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
209-
EnvVars map[string]string `json:"env_vars"`
210-
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
211209
Region string `json:"region"`
212210
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
213211
Version string `json:"version"`
212+
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
213+
EnvVars map[string]string `json:"env_vars"`
214214
// This field is from variant [DeploymentFollowResponseErrorEvent].
215215
Error DeploymentFollowResponseErrorEventError `json:"error"`
216216
JSON struct {
@@ -220,9 +220,9 @@ type DeploymentFollowResponseUnion struct {
220220
Deployment respjson.Field
221221
ID respjson.Field
222222
AppName respjson.Field
223-
EnvVars respjson.Field
224223
Region respjson.Field
225224
Version respjson.Field
225+
EnvVars respjson.Field
226226
Error respjson.Field
227227
raw string
228228
} `json:"-"`
@@ -262,7 +262,7 @@ type DeploymentFollowResponseLog struct {
262262
// Log message text.
263263
Message string `json:"message,required"`
264264
// Time the log entry was produced.
265-
Timestamp time.Time `json:"timestamp" format:"date-time"`
265+
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
266266
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
267267
JSON struct {
268268
Event respjson.Field
@@ -286,7 +286,7 @@ type DeploymentFollowResponseDeploymentState struct {
286286
// Event type identifier (always "deployment_state").
287287
Event constant.DeploymentState `json:"event,required"`
288288
// Time the state was reported.
289-
Timestamp time.Time `json:"timestamp" format:"date-time"`
289+
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
290290
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
291291
JSON struct {
292292
Deployment respjson.Field
@@ -347,27 +347,28 @@ func (r *DeploymentFollowResponseDeploymentStateDeployment) UnmarshalJSON(data [
347347
// Summary of an application version.
348348
type DeploymentFollowResponseAppVersionSummaryEvent struct {
349349
// Unique identifier for the app version
350-
ID string `json:"id"`
350+
ID string `json:"id,required"`
351351
// Name of the application
352-
AppName string `json:"app_name"`
353-
// Environment variables configured for this app version
354-
EnvVars map[string]string `json:"env_vars"`
352+
AppName string `json:"app_name,required"`
355353
// Event type identifier (always "app_version_summary").
356-
//
357-
// Any of "app_version_summary".
358-
Event string `json:"event"`
354+
Event constant.AppVersionSummary `json:"event,required"`
359355
// Deployment region code
360-
Region string `json:"region"`
356+
Region string `json:"region,required"`
357+
// Time the state was reported.
358+
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
361359
// Version label for the application
362-
Version string `json:"version"`
360+
Version string `json:"version,required"`
361+
// Environment variables configured for this app version
362+
EnvVars map[string]string `json:"env_vars"`
363363
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
364364
JSON struct {
365365
ID respjson.Field
366366
AppName respjson.Field
367-
EnvVars respjson.Field
368367
Event respjson.Field
369368
Region respjson.Field
369+
Timestamp respjson.Field
370370
Version respjson.Field
371+
EnvVars respjson.Field
371372
ExtraFields map[string]respjson.Field
372373
raw string
373374
} `json:"-"`
@@ -381,15 +382,16 @@ func (r *DeploymentFollowResponseAppVersionSummaryEvent) UnmarshalJSON(data []by
381382

382383
// An error event from the application.
383384
type DeploymentFollowResponseErrorEvent struct {
384-
Error DeploymentFollowResponseErrorEventError `json:"error"`
385+
Error DeploymentFollowResponseErrorEventError `json:"error,required"`
385386
// Event type identifier (always "error").
386-
//
387-
// Any of "error".
388-
Event string `json:"event"`
387+
Event constant.Error `json:"event,required"`
388+
// Time the error occurred.
389+
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
389390
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
390391
JSON struct {
391392
Error respjson.Field
392393
Event respjson.Field
394+
Timestamp respjson.Field
393395
ExtraFields map[string]respjson.Field
394396
raw string
395397
} `json:"-"`

shared/constant/constants.go

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,26 @@ func ValueOf[T Constant[T]]() T {
1818
return t.Default()
1919
}
2020

21-
type DeploymentState string // Always "deployment_state"
22-
type Log string // Always "log"
23-
type State string // Always "state"
24-
type StateUpdate string // Always "state_update"
25-
26-
func (c DeploymentState) Default() DeploymentState { return "deployment_state" }
27-
func (c Log) Default() Log { return "log" }
28-
func (c State) Default() State { return "state" }
29-
func (c StateUpdate) Default() StateUpdate { return "state_update" }
30-
31-
func (c DeploymentState) MarshalJSON() ([]byte, error) { return marshalString(c) }
32-
func (c Log) MarshalJSON() ([]byte, error) { return marshalString(c) }
33-
func (c State) MarshalJSON() ([]byte, error) { return marshalString(c) }
34-
func (c StateUpdate) MarshalJSON() ([]byte, error) { return marshalString(c) }
21+
type AppVersionSummary string // Always "app_version_summary"
22+
type DeploymentState string // Always "deployment_state"
23+
type Error string // Always "error"
24+
type Log string // Always "log"
25+
type State string // Always "state"
26+
type StateUpdate string // Always "state_update"
27+
28+
func (c AppVersionSummary) Default() AppVersionSummary { return "app_version_summary" }
29+
func (c DeploymentState) Default() DeploymentState { return "deployment_state" }
30+
func (c Error) Default() Error { return "error" }
31+
func (c Log) Default() Log { return "log" }
32+
func (c State) Default() State { return "state" }
33+
func (c StateUpdate) Default() StateUpdate { return "state_update" }
34+
35+
func (c AppVersionSummary) MarshalJSON() ([]byte, error) { return marshalString(c) }
36+
func (c DeploymentState) MarshalJSON() ([]byte, error) { return marshalString(c) }
37+
func (c Error) MarshalJSON() ([]byte, error) { return marshalString(c) }
38+
func (c Log) MarshalJSON() ([]byte, error) { return marshalString(c) }
39+
func (c State) MarshalJSON() ([]byte, error) { return marshalString(c) }
40+
func (c StateUpdate) MarshalJSON() ([]byte, error) { return marshalString(c) }
3541

3642
type constant[T any] interface {
3743
Constant[T]

0 commit comments

Comments
 (0)