-
Notifications
You must be signed in to change notification settings - Fork 8
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
Octokit Bot
committed
Jul 12, 2024
1 parent
73bd524
commit 8905485
Showing
10 changed files
with
407 additions
and
1 deletion.
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_secret_scanning_validity_checks.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 secret scanning validity checks | ||
type CodeSecurityConfiguration_secret_scanning_validity_checks int | ||
|
||
const ( | ||
ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS CodeSecurityConfiguration_secret_scanning_validity_checks = iota | ||
DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS | ||
NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS | ||
) | ||
|
||
func (i CodeSecurityConfiguration_secret_scanning_validity_checks) String() string { | ||
return []string{"enabled", "disabled", "not_set"}[i] | ||
} | ||
func ParseCodeSecurityConfiguration_secret_scanning_validity_checks(v string) (any, error) { | ||
result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS | ||
switch v { | ||
case "enabled": | ||
result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS | ||
case "disabled": | ||
result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS | ||
case "not_set": | ||
result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS | ||
default: | ||
return 0, errors.New("Unknown CodeSecurityConfiguration_secret_scanning_validity_checks value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeCodeSecurityConfiguration_secret_scanning_validity_checks(values []CodeSecurityConfiguration_secret_scanning_validity_checks) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i CodeSecurityConfiguration_secret_scanning_validity_checks) isMultiValue() bool { | ||
return false | ||
} |
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
81 changes: 81 additions & 0 deletions
81
pkg/github/models/security_and_analysis_secret_scanning_non_provider_patterns.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" | ||
) | ||
|
||
type SecurityAndAnalysis_secret_scanning_non_provider_patterns struct { | ||
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
additionalData map[string]any | ||
// The status property | ||
status *SecurityAndAnalysis_secret_scanning_non_provider_patterns_status | ||
} | ||
// NewSecurityAndAnalysis_secret_scanning_non_provider_patterns instantiates a new SecurityAndAnalysis_secret_scanning_non_provider_patterns and sets the default values. | ||
func NewSecurityAndAnalysis_secret_scanning_non_provider_patterns()(*SecurityAndAnalysis_secret_scanning_non_provider_patterns) { | ||
m := &SecurityAndAnalysis_secret_scanning_non_provider_patterns{ | ||
} | ||
m.SetAdditionalData(make(map[string]any)) | ||
return m | ||
} | ||
// CreateSecurityAndAnalysis_secret_scanning_non_provider_patternsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value | ||
// returns a Parsable when successful | ||
func CreateSecurityAndAnalysis_secret_scanning_non_provider_patternsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { | ||
return NewSecurityAndAnalysis_secret_scanning_non_provider_patterns(), 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 *SecurityAndAnalysis_secret_scanning_non_provider_patterns) 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 *SecurityAndAnalysis_secret_scanning_non_provider_patterns) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { | ||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) | ||
res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetEnumValue(ParseSecurityAndAnalysis_secret_scanning_non_provider_patterns_status) | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
m.SetStatus(val.(*SecurityAndAnalysis_secret_scanning_non_provider_patterns_status)) | ||
} | ||
return nil | ||
} | ||
return res | ||
} | ||
// GetStatus gets the status property value. The status property | ||
// returns a *SecurityAndAnalysis_secret_scanning_non_provider_patterns_status when successful | ||
func (m *SecurityAndAnalysis_secret_scanning_non_provider_patterns) GetStatus()(*SecurityAndAnalysis_secret_scanning_non_provider_patterns_status) { | ||
return m.status | ||
} | ||
// Serialize serializes information the current object | ||
func (m *SecurityAndAnalysis_secret_scanning_non_provider_patterns) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { | ||
if m.GetStatus() != nil { | ||
cast := (*m.GetStatus()).String() | ||
err := writer.WriteStringValue("status", &cast) | ||
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 *SecurityAndAnalysis_secret_scanning_non_provider_patterns) SetAdditionalData(value map[string]any)() { | ||
m.additionalData = value | ||
} | ||
// SetStatus sets the status property value. The status property | ||
func (m *SecurityAndAnalysis_secret_scanning_non_provider_patterns) SetStatus(value *SecurityAndAnalysis_secret_scanning_non_provider_patterns_status)() { | ||
m.status = value | ||
} | ||
type SecurityAndAnalysis_secret_scanning_non_provider_patternsable interface { | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable | ||
GetStatus()(*SecurityAndAnalysis_secret_scanning_non_provider_patterns_status) | ||
SetStatus(value *SecurityAndAnalysis_secret_scanning_non_provider_patterns_status)() | ||
} |
36 changes: 36 additions & 0 deletions
36
pkg/github/models/security_and_analysis_secret_scanning_non_provider_patterns_status.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,36 @@ | ||
package models | ||
import ( | ||
"errors" | ||
) | ||
type SecurityAndAnalysis_secret_scanning_non_provider_patterns_status int | ||
|
||
const ( | ||
ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_NON_PROVIDER_PATTERNS_STATUS SecurityAndAnalysis_secret_scanning_non_provider_patterns_status = iota | ||
DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_NON_PROVIDER_PATTERNS_STATUS | ||
) | ||
|
||
func (i SecurityAndAnalysis_secret_scanning_non_provider_patterns_status) String() string { | ||
return []string{"enabled", "disabled"}[i] | ||
} | ||
func ParseSecurityAndAnalysis_secret_scanning_non_provider_patterns_status(v string) (any, error) { | ||
result := ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_NON_PROVIDER_PATTERNS_STATUS | ||
switch v { | ||
case "enabled": | ||
result = ENABLED_SECURITYANDANALYSIS_SECRET_SCANNING_NON_PROVIDER_PATTERNS_STATUS | ||
case "disabled": | ||
result = DISABLED_SECURITYANDANALYSIS_SECRET_SCANNING_NON_PROVIDER_PATTERNS_STATUS | ||
default: | ||
return 0, errors.New("Unknown SecurityAndAnalysis_secret_scanning_non_provider_patterns_status value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeSecurityAndAnalysis_secret_scanning_non_provider_patterns_status(values []SecurityAndAnalysis_secret_scanning_non_provider_patterns_status) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i SecurityAndAnalysis_secret_scanning_non_provider_patterns_status) isMultiValue() bool { | ||
return false | ||
} |
40 changes: 40 additions & 0 deletions
40
...curity/configurations/configurations_post_request_body_secret_scanning_validity_checks.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 configurations | ||
import ( | ||
"errors" | ||
) | ||
// The enablement status of secret scanning validity checks | ||
type ConfigurationsPostRequestBody_secret_scanning_validity_checks int | ||
|
||
const ( | ||
ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_VALIDITY_CHECKS ConfigurationsPostRequestBody_secret_scanning_validity_checks = iota | ||
DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_VALIDITY_CHECKS | ||
NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_VALIDITY_CHECKS | ||
) | ||
|
||
func (i ConfigurationsPostRequestBody_secret_scanning_validity_checks) String() string { | ||
return []string{"enabled", "disabled", "not_set"}[i] | ||
} | ||
func ParseConfigurationsPostRequestBody_secret_scanning_validity_checks(v string) (any, error) { | ||
result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_VALIDITY_CHECKS | ||
switch v { | ||
case "enabled": | ||
result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_VALIDITY_CHECKS | ||
case "disabled": | ||
result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_VALIDITY_CHECKS | ||
case "not_set": | ||
result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_VALIDITY_CHECKS | ||
default: | ||
return 0, errors.New("Unknown ConfigurationsPostRequestBody_secret_scanning_validity_checks value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeConfigurationsPostRequestBody_secret_scanning_validity_checks(values []ConfigurationsPostRequestBody_secret_scanning_validity_checks) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i ConfigurationsPostRequestBody_secret_scanning_validity_checks) isMultiValue() bool { | ||
return false | ||
} |
Oops, something went wrong.