-
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.
* New updates to generated code * New updates to generated code --------- Co-authored-by: Octokit Bot <octokitbot@martynus.net> Co-authored-by: Keegan Campbell <me@kfcampbell.com>
- Loading branch information
1 parent
a379f57
commit 5846183
Showing
11 changed files
with
357 additions
and
41 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
37 changes: 37 additions & 0 deletions
37
pkg/github/models/code_security_configuration_enforcement.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,37 @@ | ||
package models | ||
import ( | ||
"errors" | ||
) | ||
// The enforcement status for a security configuration | ||
type CodeSecurityConfiguration_enforcement int | ||
|
||
const ( | ||
ENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT CodeSecurityConfiguration_enforcement = iota | ||
UNENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT | ||
) | ||
|
||
func (i CodeSecurityConfiguration_enforcement) String() string { | ||
return []string{"enforced", "unenforced"}[i] | ||
} | ||
func ParseCodeSecurityConfiguration_enforcement(v string) (any, error) { | ||
result := ENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT | ||
switch v { | ||
case "enforced": | ||
result = ENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT | ||
case "unenforced": | ||
result = UNENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT | ||
default: | ||
return 0, errors.New("Unknown CodeSecurityConfiguration_enforcement value: " + v) | ||
} | ||
return &result, nil | ||
} | ||
func SerializeCodeSecurityConfiguration_enforcement(values []CodeSecurityConfiguration_enforcement) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i CodeSecurityConfiguration_enforcement) isMultiValue() bool { | ||
return false | ||
} |
Oops, something went wrong.