Skip to content

Commit 562f248

Browse files
feat(api): update via SDK Studio
1 parent 984cd7f commit 562f248

4 files changed

Lines changed: 12 additions & 8 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-aac74422364f9d25e30fcefd510297580b77be4b84c71416c5b9de5b882e5945.yml
3-
openapi_spec_hash: 4d42a5d93bd82754acf11e32e7438a04
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2fed6c2aef6fb20a2815d0ed36d801c566a73ea11a66db5d892b1533a1fac19e.yml
3+
openapi_spec_hash: 55559a2ca985ed36cb8a13b09f80dcb5
44
config_hash: a085d1b39ddf0b26ee798501a9f47e20

app.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/onkernel/kernel-go-sdk/option"
1414
"github.com/onkernel/kernel-go-sdk/packages/param"
1515
"github.com/onkernel/kernel-go-sdk/packages/respjson"
16+
"github.com/onkernel/kernel-go-sdk/shared/constant"
1617
)
1718

1819
// AppService contains methods and other services that help with interacting with
@@ -53,7 +54,7 @@ type AppListResponse struct {
5354
// Name of the application
5455
AppName string `json:"app_name,required"`
5556
// Deployment region code
56-
Region string `json:"region,required"`
57+
Region constant.AwsUsEast1a `json:"region,required"`
5758
// Version label for the application
5859
Version string `json:"version,required"`
5960
// Environment variables configured for this app version

deployment.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ type DeploymentNewResponse struct {
8888
// Timestamp when the deployment was created
8989
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
9090
// Deployment region code
91-
Region string `json:"region,required"`
91+
Region constant.AwsUsEast1a `json:"region,required"`
9292
// Current status of the deployment
9393
//
9494
// Any of "queued", "in_progress", "running", "failed", "stopped".
@@ -140,7 +140,7 @@ type DeploymentGetResponse struct {
140140
// Timestamp when the deployment was created
141141
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
142142
// Deployment region code
143-
Region string `json:"region,required"`
143+
Region constant.AwsUsEast1a `json:"region,required"`
144144
// Current status of the deployment
145145
//
146146
// Any of "queued", "in_progress", "running", "failed", "stopped".
@@ -206,7 +206,7 @@ type DeploymentFollowResponseUnion struct {
206206
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
207207
AppName string `json:"app_name"`
208208
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
209-
Region string `json:"region"`
209+
Region constant.AwsUsEast1a `json:"region"`
210210
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
211211
Version string `json:"version"`
212212
// This field is from variant [DeploymentFollowResponseAppVersionSummaryEvent].
@@ -313,7 +313,7 @@ type DeploymentFollowResponseDeploymentStateDeployment struct {
313313
// Timestamp when the deployment was created
314314
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
315315
// Deployment region code
316-
Region string `json:"region,required"`
316+
Region constant.AwsUsEast1a `json:"region,required"`
317317
// Current status of the deployment
318318
//
319319
// Any of "queued", "in_progress", "running", "failed", "stopped".
@@ -356,7 +356,7 @@ type DeploymentFollowResponseAppVersionSummaryEvent struct {
356356
// Event type identifier (always "app_version_summary").
357357
Event constant.AppVersionSummary `json:"event,required"`
358358
// Deployment region code
359-
Region string `json:"region,required"`
359+
Region constant.AwsUsEast1a `json:"region,required"`
360360
// Time the state was reported.
361361
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
362362
// Version label for the application

shared/constant/constants.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,23 @@ func ValueOf[T Constant[T]]() T {
1919
}
2020

2121
type AppVersionSummary string // Always "app_version_summary"
22+
type AwsUsEast1a string // Always "aws.us-east-1a"
2223
type DeploymentState string // Always "deployment_state"
2324
type Error string // Always "error"
2425
type Log string // Always "log"
2526
type State string // Always "state"
2627
type StateUpdate string // Always "state_update"
2728

2829
func (c AppVersionSummary) Default() AppVersionSummary { return "app_version_summary" }
30+
func (c AwsUsEast1a) Default() AwsUsEast1a { return "aws.us-east-1a" }
2931
func (c DeploymentState) Default() DeploymentState { return "deployment_state" }
3032
func (c Error) Default() Error { return "error" }
3133
func (c Log) Default() Log { return "log" }
3234
func (c State) Default() State { return "state" }
3335
func (c StateUpdate) Default() StateUpdate { return "state_update" }
3436

3537
func (c AppVersionSummary) MarshalJSON() ([]byte, error) { return marshalString(c) }
38+
func (c AwsUsEast1a) MarshalJSON() ([]byte, error) { return marshalString(c) }
3639
func (c DeploymentState) MarshalJSON() ([]byte, error) { return marshalString(c) }
3740
func (c Error) MarshalJSON() ([]byte, error) { return marshalString(c) }
3841
func (c Log) MarshalJSON() ([]byte, error) { return marshalString(c) }

0 commit comments

Comments
 (0)