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 Dec 27, 2024
1 parent 5fcaee5 commit 5ff8fd3
Show file tree
Hide file tree
Showing 3 changed files with 94 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": "54208FD0E974CC1715543AD344E8EB72FE62F45838301766C1CFBE3A6EDF1B14B8CFC3A84C4495B0B29B749D231789DB35F3CBFA101624FD7E5BF8FB1ECB51DD",
"descriptionHash": "1E3B4B453642A170C2B017A5E078B2DEC6C94D68C54F912F6AD9A6E258569AFE80D8930DD05455D2F905ABF8E68E77C9C1D38EB4D1ECEF521FADB0549B8B483A",
"descriptionLocation": "../../../../../schemas/api.github.com.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
59 changes: 59 additions & 0 deletions pkg/github/models/code_scanning_default_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ type CodeScanningDefaultSetup struct {
languages []CodeScanningDefaultSetup_languages
// CodeQL query suite to be used.
query_suite *CodeScanningDefaultSetup_query_suite
// Runner label to be used if the runner type is labeled.
runner_label *string
// Runner type to be used.
runner_type *CodeScanningDefaultSetup_runner_type
// The frequency of the periodic analysis.
schedule *CodeScanningDefaultSetup_schedule
// Code scanning default setup has been configured or not.
Expand Down Expand Up @@ -67,6 +71,26 @@ func (m *CodeScanningDefaultSetup) GetFieldDeserializers()(map[string]func(i878a
}
return nil
}
res["runner_label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetRunnerLabel(val)
}
return nil
}
res["runner_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseCodeScanningDefaultSetup_runner_type)
if err != nil {
return err
}
if val != nil {
m.SetRunnerType(val.(*CodeScanningDefaultSetup_runner_type))
}
return nil
}
res["schedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseCodeScanningDefaultSetup_schedule)
if err != nil {
Expand Down Expand Up @@ -109,6 +133,16 @@ func (m *CodeScanningDefaultSetup) GetLanguages()([]CodeScanningDefaultSetup_lan
func (m *CodeScanningDefaultSetup) GetQuerySuite()(*CodeScanningDefaultSetup_query_suite) {
return m.query_suite
}
// GetRunnerLabel gets the runner_label property value. Runner label to be used if the runner type is labeled.
// returns a *string when successful
func (m *CodeScanningDefaultSetup) GetRunnerLabel()(*string) {
return m.runner_label
}
// GetRunnerType gets the runner_type property value. Runner type to be used.
// returns a *CodeScanningDefaultSetup_runner_type when successful
func (m *CodeScanningDefaultSetup) GetRunnerType()(*CodeScanningDefaultSetup_runner_type) {
return m.runner_type
}
// GetSchedule gets the schedule property value. The frequency of the periodic analysis.
// returns a *CodeScanningDefaultSetup_schedule when successful
func (m *CodeScanningDefaultSetup) GetSchedule()(*CodeScanningDefaultSetup_schedule) {
Expand Down Expand Up @@ -139,6 +173,19 @@ func (m *CodeScanningDefaultSetup) Serialize(writer i878a80d2330e89d26896388a3f4
return err
}
}
{
err := writer.WriteStringValue("runner_label", m.GetRunnerLabel())
if err != nil {
return err
}
}
if m.GetRunnerType() != nil {
cast := (*m.GetRunnerType()).String()
err := writer.WriteStringValue("runner_type", &cast)
if err != nil {
return err
}
}
if m.GetSchedule() != nil {
cast := (*m.GetSchedule()).String()
err := writer.WriteStringValue("schedule", &cast)
Expand Down Expand Up @@ -179,6 +226,14 @@ func (m *CodeScanningDefaultSetup) SetLanguages(value []CodeScanningDefaultSetup
func (m *CodeScanningDefaultSetup) SetQuerySuite(value *CodeScanningDefaultSetup_query_suite)() {
m.query_suite = value
}
// SetRunnerLabel sets the runner_label property value. Runner label to be used if the runner type is labeled.
func (m *CodeScanningDefaultSetup) SetRunnerLabel(value *string)() {
m.runner_label = value
}
// SetRunnerType sets the runner_type property value. Runner type to be used.
func (m *CodeScanningDefaultSetup) SetRunnerType(value *CodeScanningDefaultSetup_runner_type)() {
m.runner_type = value
}
// SetSchedule sets the schedule property value. The frequency of the periodic analysis.
func (m *CodeScanningDefaultSetup) SetSchedule(value *CodeScanningDefaultSetup_schedule)() {
m.schedule = value
Expand All @@ -196,11 +251,15 @@ type CodeScanningDefaultSetupable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetLanguages()([]CodeScanningDefaultSetup_languages)
GetQuerySuite()(*CodeScanningDefaultSetup_query_suite)
GetRunnerLabel()(*string)
GetRunnerType()(*CodeScanningDefaultSetup_runner_type)
GetSchedule()(*CodeScanningDefaultSetup_schedule)
GetState()(*CodeScanningDefaultSetup_state)
GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
SetLanguages(value []CodeScanningDefaultSetup_languages)()
SetQuerySuite(value *CodeScanningDefaultSetup_query_suite)()
SetRunnerLabel(value *string)()
SetRunnerType(value *CodeScanningDefaultSetup_runner_type)()
SetSchedule(value *CodeScanningDefaultSetup_schedule)()
SetState(value *CodeScanningDefaultSetup_state)()
SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package models
// Runner type to be used.
type CodeScanningDefaultSetup_runner_type int

const (
STANDARD_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE CodeScanningDefaultSetup_runner_type = iota
LABELED_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE
)

func (i CodeScanningDefaultSetup_runner_type) String() string {
return []string{"standard", "labeled"}[i]
}
func ParseCodeScanningDefaultSetup_runner_type(v string) (any, error) {
result := STANDARD_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE
switch v {
case "standard":
result = STANDARD_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE
case "labeled":
result = LABELED_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE
default:
return nil, nil
}
return &result, nil
}
func SerializeCodeScanningDefaultSetup_runner_type(values []CodeScanningDefaultSetup_runner_type) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i CodeScanningDefaultSetup_runner_type) isMultiValue() bool {
return false
}

0 comments on commit 5ff8fd3

Please sign in to comment.