Skip to content

Commit

Permalink
New updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot committed Feb 6, 2025
1 parent 40f4d8b commit 0e93d64
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "E2FAE21694DD5FA26B4270669070D3694A4EA9C733965C0AF63A60219AD7BFD7B57108205F64E14768A88C9210ADF4F5D9B503AEB95750A315098776BECF629A",
"descriptionHash": "A7978E8913075557C50AEE2477AE2BCA0660E1AAA959AC836D664EA0908A4CAF66AA4C0B4729BAB702FD9510D34AA24A5C04AF1BE1D957AE8E6945CB52FE7E72",
"descriptionLocation": "../../../../../schemas/api.github.jparrowsec.cn.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
29 changes: 29 additions & 0 deletions pkg/github/models/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ type Runner struct {
additionalData map[string]any
// The busy property
busy *bool
// The ephemeral property
ephemeral *bool
// The id of the runner.
id *int32
// The labels property
Expand Down Expand Up @@ -45,6 +47,11 @@ func (m *Runner) GetAdditionalData()(map[string]any) {
func (m *Runner) GetBusy()(*bool) {
return m.busy
}
// GetEphemeral gets the ephemeral property value. The ephemeral property
// returns a *bool when successful
func (m *Runner) GetEphemeral()(*bool) {
return m.ephemeral
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Runner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
Expand All @@ -59,6 +66,16 @@ func (m *Runner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689638
}
return nil
}
res["ephemeral"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetEphemeral(val)
}
return nil
}
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
Expand Down Expand Up @@ -165,6 +182,12 @@ func (m *Runner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c
return err
}
}
{
err := writer.WriteBoolValue("ephemeral", m.GetEphemeral())
if err != nil {
return err
}
}
{
err := writer.WriteInt32Value("id", m.GetId())
if err != nil {
Expand Down Expand Up @@ -223,6 +246,10 @@ func (m *Runner) SetAdditionalData(value map[string]any)() {
func (m *Runner) SetBusy(value *bool)() {
m.busy = value
}
// SetEphemeral sets the ephemeral property value. The ephemeral property
func (m *Runner) SetEphemeral(value *bool)() {
m.ephemeral = value
}
// SetId sets the id property value. The id of the runner.
func (m *Runner) SetId(value *int32)() {
m.id = value
Expand Down Expand Up @@ -251,13 +278,15 @@ type Runnerable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetBusy()(*bool)
GetEphemeral()(*bool)
GetId()(*int32)
GetLabels()([]RunnerLabelable)
GetName()(*string)
GetOs()(*string)
GetRunnerGroupId()(*int32)
GetStatus()(*string)
SetBusy(value *bool)()
SetEphemeral(value *bool)()
SetId(value *int32)()
SetLabels(value []RunnerLabelable)()
SetName(value *string)()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func NewItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, request
// Post generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the organization.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
// returns a ItemActionsRunnersGenerateJitconfigPostResponseable when successful
// returns a BasicError error when the service returns a 404 status code
// returns a BasicError error when the service returns a 409 status code
// returns a ValidationErrorSimple error when the service returns a 422 status code
// [API method documentation]
//
Expand All @@ -37,6 +38,7 @@ func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context.Con
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
"404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue,
"409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue,
"422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorSimpleFromDiscriminatorValue,
}
res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func NewItemItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, req
// Post generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the repository.OAuth tokens and personal access tokens (classic) need the`repo` scope to use this endpoint.
// returns a ItemItemActionsRunnersGenerateJitconfigPostResponseable when successful
// returns a BasicError error when the service returns a 404 status code
// returns a BasicError error when the service returns a 409 status code
// returns a ValidationErrorSimple error when the service returns a 422 status code
// [API method documentation]
//
Expand All @@ -37,6 +38,7 @@ func (m *ItemItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
"404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue,
"409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue,
"422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorSimpleFromDiscriminatorValue,
}
res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping)
Expand Down

0 comments on commit 0e93d64

Please sign in to comment.