-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7349b14
commit 7484b0c
Showing
29 changed files
with
1,360 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package models | ||
import ( | ||
"errors" | ||
) | ||
// The enablement status of Automatic dependency submission | ||
type CodeSecurityConfiguration_dependency_graph_autosubmit_action int | ||
|
||
const ( | ||
ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION CodeSecurityConfiguration_dependency_graph_autosubmit_action = iota | ||
DISABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION | ||
NOT_SET_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION | ||
) | ||
|
||
func (i CodeSecurityConfiguration_dependency_graph_autosubmit_action) String() string { | ||
return []string{"enabled", "disabled", "not_set"}[i] | ||
} | ||
func ParseCodeSecurityConfiguration_dependency_graph_autosubmit_action(v string) (any, error) { | ||
result := ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION | ||
switch v { | ||
case "enabled": | ||
result = ENABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION | ||
case "disabled": | ||
result = DISABLED_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION | ||
case "not_set": | ||
result = NOT_SET_CODESECURITYCONFIGURATION_DEPENDENCY_GRAPH_AUTOSUBMIT_ACTION | ||
default: | ||
return 0, errors.New("Unknown CodeSecurityConfiguration_dependency_graph_autosubmit_action value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeCodeSecurityConfiguration_dependency_graph_autosubmit_action(values []CodeSecurityConfiguration_dependency_graph_autosubmit_action) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i CodeSecurityConfiguration_dependency_graph_autosubmit_action) isMultiValue() bool { | ||
return false | ||
} |
81 changes: 81 additions & 0 deletions
81
pkg/github/models/code_security_configuration_dependency_graph_autosubmit_action_options.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package models | ||
|
||
import ( | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" | ||
) | ||
|
||
// CodeSecurityConfiguration_dependency_graph_autosubmit_action_options feature options for Automatic dependency submission | ||
type CodeSecurityConfiguration_dependency_graph_autosubmit_action_options struct { | ||
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
additionalData map[string]any | ||
// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. | ||
labeled_runners *bool | ||
} | ||
// NewCodeSecurityConfiguration_dependency_graph_autosubmit_action_options instantiates a new CodeSecurityConfiguration_dependency_graph_autosubmit_action_options and sets the default values. | ||
func NewCodeSecurityConfiguration_dependency_graph_autosubmit_action_options()(*CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) { | ||
m := &CodeSecurityConfiguration_dependency_graph_autosubmit_action_options{ | ||
} | ||
m.SetAdditionalData(make(map[string]any)) | ||
return m | ||
} | ||
// CreateCodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value | ||
// returns a Parsable when successful | ||
func CreateCodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { | ||
return NewCodeSecurityConfiguration_dependency_graph_autosubmit_action_options(), nil | ||
} | ||
// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
// returns a map[string]any when successful | ||
func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) GetAdditionalData()(map[string]any) { | ||
return m.additionalData | ||
} | ||
// GetFieldDeserializers the deserialization information for the current model | ||
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful | ||
func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { | ||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) | ||
res["labeled_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetBoolValue() | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
m.SetLabeledRunners(val) | ||
} | ||
return nil | ||
} | ||
return res | ||
} | ||
// GetLabeledRunners gets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. | ||
// returns a *bool when successful | ||
func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) GetLabeledRunners()(*bool) { | ||
return m.labeled_runners | ||
} | ||
// Serialize serializes information the current object | ||
func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { | ||
{ | ||
err := writer.WriteBoolValue("labeled_runners", m.GetLabeledRunners()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
{ | ||
err := writer.WriteAdditionalData(m.GetAdditionalData()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
return nil | ||
} | ||
// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) SetAdditionalData(value map[string]any)() { | ||
m.additionalData = value | ||
} | ||
// SetLabeledRunners sets the labeled_runners property value. Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. | ||
func (m *CodeSecurityConfiguration_dependency_graph_autosubmit_action_options) SetLabeledRunners(value *bool)() { | ||
m.labeled_runners = value | ||
} | ||
type CodeSecurityConfiguration_dependency_graph_autosubmit_action_optionsable interface { | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable | ||
GetLabeledRunners()(*bool) | ||
SetLabeledRunners(value *bool)() | ||
} |
Oops, something went wrong.