Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in generated code #109

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.21.5

require (
github.com/kfcampbell/ghinstallation v0.0.6
github.com/microsoft/kiota-abstractions-go v1.6.1
github.com/microsoft/kiota-http-go v1.4.3
github.com/microsoft/kiota-abstractions-go v1.7.0
github.com/microsoft/kiota-http-go v1.4.5
github.com/microsoft/kiota-serialization-form-go v1.0.0
github.com/microsoft/kiota-serialization-json-go v1.0.7
github.com/microsoft/kiota-serialization-json-go v1.0.8
github.com/microsoft/kiota-serialization-multipart-go v1.0.0
github.com/microsoft/kiota-serialization-text-go v1.0.0
)
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/microsoft/kiota-abstractions-go v1.6.1 h1:NXK50S3BwJn9Wj6bO0YFuAig7y2WVgdQ/ie1ktMl2J4=
github.com/microsoft/kiota-abstractions-go v1.6.1/go.mod h1:FI1I2OHg0E7bK5t8DPnw+9C/CHVyLP6XeqDBT+95pTE=
github.com/microsoft/kiota-http-go v1.4.3 h1:BVviWZSZCm2nr9qySbhSXa8jlrLvCcC2/uV4p45Ow0I=
github.com/microsoft/kiota-http-go v1.4.3/go.mod h1:Kup5nMDD3a9sjdgRKHCqZWqtrv3FbprjcPaGjLR6FzM=
github.com/microsoft/kiota-abstractions-go v1.7.0 h1:/0OKSSEe94Z1qgpcGE7ZFI9P+4iAnsDQo9v9UOk+R8E=
github.com/microsoft/kiota-abstractions-go v1.7.0/go.mod h1:FI1I2OHg0E7bK5t8DPnw+9C/CHVyLP6XeqDBT+95pTE=
github.com/microsoft/kiota-http-go v1.4.5 h1:BrI9TZ0cWiU1ucP5oSWR6UmP2vR3PaKbQ61TQ/qM5cM=
github.com/microsoft/kiota-http-go v1.4.5/go.mod h1:Kup5nMDD3a9sjdgRKHCqZWqtrv3FbprjcPaGjLR6FzM=
github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI=
github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA=
github.com/microsoft/kiota-serialization-json-go v1.0.7 h1:yMbckSTPrjZdM4EMXgzLZSA3CtDaUBI350u0VoYRz7Y=
github.com/microsoft/kiota-serialization-json-go v1.0.7/go.mod h1:1krrY7DYl3ivPIzl4xTaBpew6akYNa8/Tal8g+kb0cc=
github.com/microsoft/kiota-serialization-json-go v1.0.8 h1:+aViv9k6wqaw1Fx6P49fl5GIB1hN3b6CG0McNTcUYBc=
github.com/microsoft/kiota-serialization-json-go v1.0.8/go.mod h1:O8+v11U0EUwHlCz7hrW38KxDmdhKAHfv4Q89uvsBalY=
github.com/microsoft/kiota-serialization-multipart-go v1.0.0 h1:3O5sb5Zj+moLBiJympbXNaeV07K0d46IfuEd5v9+pBs=
github.com/microsoft/kiota-serialization-multipart-go v1.0.0/go.mod h1:yauLeBTpANk4L03XD985akNysG24SnRJGaveZf+p4so=
github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA=
Expand Down
8 changes: 7 additions & 1 deletion pkg/github/advisories/get_sort_query_parameter_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ type GetSortQueryParameterType int
const (
UPDATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota
PUBLISHED_GETSORTQUERYPARAMETERTYPE
EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE
EPSS_PERCENTILE_GETSORTQUERYPARAMETERTYPE
)

func (i GetSortQueryParameterType) String() string {
return []string{"updated", "published"}[i]
return []string{"updated", "published", "epss_percentage", "epss_percentile"}[i]
}
func ParseGetSortQueryParameterType(v string) (any, error) {
result := UPDATED_GETSORTQUERYPARAMETERTYPE
Expand All @@ -16,6 +18,10 @@ func ParseGetSortQueryParameterType(v string) (any, error) {
result = UPDATED_GETSORTQUERYPARAMETERTYPE
case "published":
result = PUBLISHED_GETSORTQUERYPARAMETERTYPE
case "epss_percentage":
result = EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE
case "epss_percentile":
result = EPSS_PERCENTILE_GETSORTQUERYPARAMETERTYPE
default:
return nil, nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"descriptionHash": "0DFCFA87ADC378101EA55CABFC347AF562CBA5A4E699595E82DA0B00A2EE55BF068DFC98C7AF4B5ED6D33E8B8354F002342EA342DF5D392D4FA9853B320240D7",
"descriptionHash": "45E682FE7C94EC4954AF94CAF3814F746F98C0DB747894325D85797EEC37A463131C6C8F4264F15D35A002EB855F25AE6B93DB6A808A5EAC673A830BA2B8F0F6",
"descriptionLocation": "../../../../../schemas/api.github.com.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.17.0",
"kiotaVersion": "1.18.0",
"clientClassName": "ApiClient",
"clientNamespaceName": "github.com/octokit/go-sdk/pkg/github",
"language": "Go",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package models
// The enablement status of secret scanning non-provider patterns
type CodeSecurityConfiguration_secret_scanning_non_provider_patterns int

const (
ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS CodeSecurityConfiguration_secret_scanning_non_provider_patterns = iota
DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
)

func (i CodeSecurityConfiguration_secret_scanning_non_provider_patterns) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseCodeSecurityConfiguration_secret_scanning_non_provider_patterns(v string) (any, error) {
result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
switch v {
case "enabled":
result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
case "disabled":
result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
case "not_set":
result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
default:
return nil, nil
}
return &result, nil
}
func SerializeCodeSecurityConfiguration_secret_scanning_non_provider_patterns(values []CodeSecurityConfiguration_secret_scanning_non_provider_patterns) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i CodeSecurityConfiguration_secret_scanning_non_provider_patterns) isMultiValue() bool {
return false
}
6 changes: 3 additions & 3 deletions pkg/github/models/code_scanning_alert_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type CodeScanningAlertRule struct {
additionalData map[string]any
// A short description of the rule used to detect the alert.
description *string
// description of the rule used to detect the alert.
// A description of the rule used to detect the alert.
full_description *string
// Detailed documentation for the rule as GitHub Flavored Markdown.
help *string
Expand Down Expand Up @@ -150,7 +150,7 @@ func (m *CodeScanningAlertRule) GetFieldDeserializers()(map[string]func(i878a80d
}
return res
}
// GetFullDescription gets the full_description property value. description of the rule used to detect the alert.
// GetFullDescription gets the full_description property value. A description of the rule used to detect the alert.
// returns a *string when successful
func (m *CodeScanningAlertRule) GetFullDescription()(*string) {
return m.full_description
Expand Down Expand Up @@ -264,7 +264,7 @@ func (m *CodeScanningAlertRule) SetAdditionalData(value map[string]any)() {
func (m *CodeScanningAlertRule) SetDescription(value *string)() {
m.description = value
}
// SetFullDescription sets the full_description property value. description of the rule used to detect the alert.
// SetFullDescription sets the full_description property value. A description of the rule used to detect the alert.
func (m *CodeScanningAlertRule) SetFullDescription(value *string)() {
m.full_description = value
}
Expand Down
87 changes: 87 additions & 0 deletions pkg/github/models/code_scanning_alert_rule_summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ type CodeScanningAlertRuleSummary struct {
additionalData map[string]any
// A short description of the rule used to detect the alert.
description *string
// A description of the rule used to detect the alert.
full_description *string
// Detailed documentation for the rule as GitHub Flavored Markdown.
help *string
// A link to the documentation for the rule used to detect the alert.
help_uri *string
// A unique identifier for the rule used to detect the alert.
id *string
// The name of the rule used to detect the alert.
Expand Down Expand Up @@ -56,6 +62,36 @@ func (m *CodeScanningAlertRuleSummary) GetFieldDeserializers()(map[string]func(i
}
return nil
}
res["full_description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetFullDescription(val)
}
return nil
}
res["help"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetHelp(val)
}
return nil
}
res["help_uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetHelpUri(val)
}
return nil
}
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -114,6 +150,21 @@ func (m *CodeScanningAlertRuleSummary) GetFieldDeserializers()(map[string]func(i
}
return res
}
// GetFullDescription gets the full_description property value. A description of the rule used to detect the alert.
// returns a *string when successful
func (m *CodeScanningAlertRuleSummary) GetFullDescription()(*string) {
return m.full_description
}
// GetHelp gets the help property value. Detailed documentation for the rule as GitHub Flavored Markdown.
// returns a *string when successful
func (m *CodeScanningAlertRuleSummary) GetHelp()(*string) {
return m.help
}
// GetHelpUri gets the help_uri property value. A link to the documentation for the rule used to detect the alert.
// returns a *string when successful
func (m *CodeScanningAlertRuleSummary) GetHelpUri()(*string) {
return m.help_uri
}
// GetId gets the id property value. A unique identifier for the rule used to detect the alert.
// returns a *string when successful
func (m *CodeScanningAlertRuleSummary) GetId()(*string) {
Expand Down Expand Up @@ -147,6 +198,24 @@ func (m *CodeScanningAlertRuleSummary) Serialize(writer i878a80d2330e89d26896388
return err
}
}
{
err := writer.WriteStringValue("full_description", m.GetFullDescription())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("help", m.GetHelp())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("help_uri", m.GetHelpUri())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("id", m.GetId())
if err != nil {
Expand Down Expand Up @@ -195,6 +264,18 @@ func (m *CodeScanningAlertRuleSummary) SetAdditionalData(value map[string]any)()
func (m *CodeScanningAlertRuleSummary) SetDescription(value *string)() {
m.description = value
}
// SetFullDescription sets the full_description property value. A description of the rule used to detect the alert.
func (m *CodeScanningAlertRuleSummary) SetFullDescription(value *string)() {
m.full_description = value
}
// SetHelp sets the help property value. Detailed documentation for the rule as GitHub Flavored Markdown.
func (m *CodeScanningAlertRuleSummary) SetHelp(value *string)() {
m.help = value
}
// SetHelpUri sets the help_uri property value. A link to the documentation for the rule used to detect the alert.
func (m *CodeScanningAlertRuleSummary) SetHelpUri(value *string)() {
m.help_uri = value
}
// SetId sets the id property value. A unique identifier for the rule used to detect the alert.
func (m *CodeScanningAlertRuleSummary) SetId(value *string)() {
m.id = value
Expand All @@ -219,12 +300,18 @@ type CodeScanningAlertRuleSummaryable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetDescription()(*string)
GetFullDescription()(*string)
GetHelp()(*string)
GetHelpUri()(*string)
GetId()(*string)
GetName()(*string)
GetSecuritySeverityLevel()(*CodeScanningAlertRuleSummary_security_severity_level)
GetSeverity()(*CodeScanningAlertRuleSummary_severity)
GetTags()([]string)
SetDescription(value *string)()
SetFullDescription(value *string)()
SetHelp(value *string)()
SetHelpUri(value *string)()
SetId(value *string)()
SetName(value *string)()
SetSecuritySeverityLevel(value *CodeScanningAlertRuleSummary_security_severity_level)()
Expand Down
16 changes: 8 additions & 8 deletions pkg/github/models/code_scanning_variant_analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type CodeScanningVariantAnalysis struct {
// Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis.
skipped_repositories CodeScanningVariantAnalysis_skipped_repositoriesable
// The status property
status *CodeScanningVariantAnalysisStatus
status *CodeScanningVariantAnalysis_status
// The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
}
Expand Down Expand Up @@ -204,12 +204,12 @@ func (m *CodeScanningVariantAnalysis) GetFieldDeserializers()(map[string]func(i8
return nil
}
res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysisStatus)
val, err := n.GetEnumValue(ParseCodeScanningVariantAnalysis_status)
if err != nil {
return err
}
if val != nil {
m.SetStatus(val.(*CodeScanningVariantAnalysisStatus))
m.SetStatus(val.(*CodeScanningVariantAnalysis_status))
}
return nil
}
Expand Down Expand Up @@ -251,8 +251,8 @@ func (m *CodeScanningVariantAnalysis) GetSkippedRepositories()(CodeScanningVaria
return m.skipped_repositories
}
// GetStatus gets the status property value. The status property
// returns a *CodeScanningVariantAnalysisStatus when successful
func (m *CodeScanningVariantAnalysis) GetStatus()(*CodeScanningVariantAnalysisStatus) {
// returns a *CodeScanningVariantAnalysis_status when successful
func (m *CodeScanningVariantAnalysis) GetStatus()(*CodeScanningVariantAnalysis_status) {
return m.status
}
// GetUpdatedAt gets the updated_at property value. The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
Expand Down Expand Up @@ -406,7 +406,7 @@ func (m *CodeScanningVariantAnalysis) SetSkippedRepositories(value CodeScanningV
m.skipped_repositories = value
}
// SetStatus sets the status property value. The status property
func (m *CodeScanningVariantAnalysis) SetStatus(value *CodeScanningVariantAnalysisStatus)() {
func (m *CodeScanningVariantAnalysis) SetStatus(value *CodeScanningVariantAnalysis_status)() {
m.status = value
}
// SetUpdatedAt sets the updated_at property value. The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
Expand All @@ -427,7 +427,7 @@ type CodeScanningVariantAnalysisable interface {
GetQueryPackUrl()(*string)
GetScannedRepositories()([]CodeScanningVariantAnalysis_scanned_repositoriesable)
GetSkippedRepositories()(CodeScanningVariantAnalysis_skipped_repositoriesable)
GetStatus()(*CodeScanningVariantAnalysisStatus)
GetStatus()(*CodeScanningVariantAnalysis_status)
GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
SetActionsWorkflowRunId(value *int32)()
SetActor(value SimpleUserable)()
Expand All @@ -440,6 +440,6 @@ type CodeScanningVariantAnalysisable interface {
SetQueryPackUrl(value *string)()
SetScannedRepositories(value []CodeScanningVariantAnalysis_scanned_repositoriesable)()
SetSkippedRepositories(value CodeScanningVariantAnalysis_skipped_repositoriesable)()
SetStatus(value *CodeScanningVariantAnalysisStatus)()
SetStatus(value *CodeScanningVariantAnalysis_status)()
SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
}
39 changes: 39 additions & 0 deletions pkg/github/models/code_scanning_variant_analysis_escaped_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package models
type CodeScanningVariantAnalysis_status int

const (
IN_PROGRESS_CODESCANNINGVARIANTANALYSIS_STATUS CodeScanningVariantAnalysis_status = iota
SUCCEEDED_CODESCANNINGVARIANTANALYSIS_STATUS
FAILED_CODESCANNINGVARIANTANALYSIS_STATUS
CANCELLED_CODESCANNINGVARIANTANALYSIS_STATUS
)

func (i CodeScanningVariantAnalysis_status) String() string {
return []string{"in_progress", "succeeded", "failed", "cancelled"}[i]
}
func ParseCodeScanningVariantAnalysis_status(v string) (any, error) {
result := IN_PROGRESS_CODESCANNINGVARIANTANALYSIS_STATUS
switch v {
case "in_progress":
result = IN_PROGRESS_CODESCANNINGVARIANTANALYSIS_STATUS
case "succeeded":
result = SUCCEEDED_CODESCANNINGVARIANTANALYSIS_STATUS
case "failed":
result = FAILED_CODESCANNINGVARIANTANALYSIS_STATUS
case "cancelled":
result = CANCELLED_CODESCANNINGVARIANTANALYSIS_STATUS
default:
return nil, nil
}
return &result, nil
}
func SerializeCodeScanningVariantAnalysis_status(values []CodeScanningVariantAnalysis_status) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i CodeScanningVariantAnalysis_status) isMultiValue() bool {
return false
}
Loading
Loading