Skip to content

Commit

Permalink
feat: Updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Dec 23, 2024
1 parent a7f1aa3 commit 5fcaee5
Show file tree
Hide file tree
Showing 111 changed files with 5,535 additions and 1,034 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package enterprises

import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)

// ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options feature options for Automatic dependency submission
type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_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
}
// NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options instantiates a new ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options and sets the default values.
func NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options()(*ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) {
m := &ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_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 *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_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 *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_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 *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) GetLabeledRunners()(*bool) {
return m.labeled_runners
}
// Serialize serializes information the current object
func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_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 *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_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 *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options) SetLabeledRunners(value *bool)() {
m.labeled_runners = value
}
type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetLabeledRunners()(*bool)
SetLabeledRunners(value *bool)()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package enterprises

import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)

// ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options feature options for Automatic dependency submission
type ItemCodeSecurityConfigurationsPostRequestBody_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
}
// NewItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options instantiates a new ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options and sets the default values.
func NewItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options()(*ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) {
m := &ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemCodeSecurityConfigurationsPostRequestBody_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 *ItemCodeSecurityConfigurationsPostRequestBody_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 *ItemCodeSecurityConfigurationsPostRequestBody_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 *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) GetLabeledRunners()(*bool) {
return m.labeled_runners
}
// Serialize serializes information the current object
func (m *ItemCodeSecurityConfigurationsPostRequestBody_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 *ItemCodeSecurityConfigurationsPostRequestBody_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 *ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options) SetLabeledRunners(value *bool)() {
m.labeled_runners = value
}
type ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetLabeledRunners()(*bool)
SetLabeledRunners(value *bool)()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package configurations
// The enablement status of secret scanning non provider patterns
type ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns int

const (
ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_NON_PROVIDER_PATTERNS ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns = iota
DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_NON_PROVIDER_PATTERNS
NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_NON_PROVIDER_PATTERNS
)

func (i ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseConfigurationsPostRequestBody_secret_scanning_non_provider_patterns(v string) (any, error) {
result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_NON_PROVIDER_PATTERNS
switch v {
case "enabled":
result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_NON_PROVIDER_PATTERNS
case "disabled":
result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_NON_PROVIDER_PATTERNS
case "not_set":
result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_NON_PROVIDER_PATTERNS
default:
return nil, nil
}
return &result, nil
}
func SerializeConfigurationsPostRequestBody_secret_scanning_non_provider_patterns(values []ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns) isMultiValue() bool {
return false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package configurations
// The enablement status of GitHub Advanced Security
type ConfigurationsPostRequestBody_advanced_security int

const (
ENABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY ConfigurationsPostRequestBody_advanced_security = iota
DISABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY
)

func (i ConfigurationsPostRequestBody_advanced_security) String() string {
return []string{"enabled", "disabled"}[i]
}
func ParseConfigurationsPostRequestBody_advanced_security(v string) (any, error) {
result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY
switch v {
case "enabled":
result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY
case "disabled":
result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_ADVANCED_SECURITY
default:
return nil, nil
}
return &result, nil
}
func SerializeConfigurationsPostRequestBody_advanced_security(values []ConfigurationsPostRequestBody_advanced_security) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i ConfigurationsPostRequestBody_advanced_security) isMultiValue() bool {
return false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package configurations
// The enablement status of code scanning default setup
type ConfigurationsPostRequestBody_code_scanning_default_setup int

const (
ENABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP ConfigurationsPostRequestBody_code_scanning_default_setup = iota
DISABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP
NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP
)

func (i ConfigurationsPostRequestBody_code_scanning_default_setup) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseConfigurationsPostRequestBody_code_scanning_default_setup(v string) (any, error) {
result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP
switch v {
case "enabled":
result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP
case "disabled":
result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP
case "not_set":
result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_CODE_SCANNING_DEFAULT_SETUP
default:
return nil, nil
}
return &result, nil
}
func SerializeConfigurationsPostRequestBody_code_scanning_default_setup(values []ConfigurationsPostRequestBody_code_scanning_default_setup) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i ConfigurationsPostRequestBody_code_scanning_default_setup) isMultiValue() bool {
return false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package configurations
// The enablement status of Dependabot alerts
type ConfigurationsPostRequestBody_dependabot_alerts int

const (
ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS ConfigurationsPostRequestBody_dependabot_alerts = iota
DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS
NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS
)

func (i ConfigurationsPostRequestBody_dependabot_alerts) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseConfigurationsPostRequestBody_dependabot_alerts(v string) (any, error) {
result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS
switch v {
case "enabled":
result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS
case "disabled":
result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS
case "not_set":
result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_ALERTS
default:
return nil, nil
}
return &result, nil
}
func SerializeConfigurationsPostRequestBody_dependabot_alerts(values []ConfigurationsPostRequestBody_dependabot_alerts) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i ConfigurationsPostRequestBody_dependabot_alerts) isMultiValue() bool {
return false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package configurations
// The enablement status of Dependabot security updates
type ConfigurationsPostRequestBody_dependabot_security_updates int

const (
ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES ConfigurationsPostRequestBody_dependabot_security_updates = iota
DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES
NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES
)

func (i ConfigurationsPostRequestBody_dependabot_security_updates) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseConfigurationsPostRequestBody_dependabot_security_updates(v string) (any, error) {
result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES
switch v {
case "enabled":
result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES
case "disabled":
result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES
case "not_set":
result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDABOT_SECURITY_UPDATES
default:
return nil, nil
}
return &result, nil
}
func SerializeConfigurationsPostRequestBody_dependabot_security_updates(values []ConfigurationsPostRequestBody_dependabot_security_updates) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i ConfigurationsPostRequestBody_dependabot_security_updates) isMultiValue() bool {
return false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package configurations
// The enablement status of Dependency Graph
type ConfigurationsPostRequestBody_dependency_graph int

const (
ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH ConfigurationsPostRequestBody_dependency_graph = iota
DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH
NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH
)

func (i ConfigurationsPostRequestBody_dependency_graph) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseConfigurationsPostRequestBody_dependency_graph(v string) (any, error) {
result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH
switch v {
case "enabled":
result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH
case "disabled":
result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH
case "not_set":
result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_DEPENDENCY_GRAPH
default:
return nil, nil
}
return &result, nil
}
func SerializeConfigurationsPostRequestBody_dependency_graph(values []ConfigurationsPostRequestBody_dependency_graph) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i ConfigurationsPostRequestBody_dependency_graph) isMultiValue() bool {
return false
}
Loading

0 comments on commit 5fcaee5

Please sign in to comment.