diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 90ecf512..4e98ac4f 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "54208FD0E974CC1715543AD344E8EB72FE62F45838301766C1CFBE3A6EDF1B14B8CFC3A84C4495B0B29B749D231789DB35F3CBFA101624FD7E5BF8FB1ECB51DD", + "descriptionHash": "37D16F900E8FD54A55AED2274BFBD2E8A6552A4B6C8A2F8C668D5748EF7E84299244EECAE13540C67006F572CF9D36E8664402663403A02188221808E75B55DE", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/base_gist.go b/pkg/github/models/base_gist.go index 87644a4f..62e37194 100644 --- a/pkg/github/models/base_gist.go +++ b/pkg/github/models/base_gist.go @@ -11,6 +11,8 @@ type BaseGist struct { additionalData map[string]any // The comments property comments *int32 + // The comments_enabled property + comments_enabled *bool // The comments_url property comments_url *string // The commits_url property @@ -72,6 +74,11 @@ func (m *BaseGist) GetAdditionalData()(map[string]any) { func (m *BaseGist) GetComments()(*int32) { return m.comments } +// GetCommentsEnabled gets the comments_enabled property value. The comments_enabled property +// returns a *bool when successful +func (m *BaseGist) GetCommentsEnabled()(*bool) { + return m.comments_enabled +} // GetCommentsUrl gets the comments_url property value. The comments_url property // returns a *string when successful func (m *BaseGist) GetCommentsUrl()(*string) { @@ -106,6 +113,16 @@ func (m *BaseGist) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896 } return nil } + res["comments_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsEnabled(val) + } + return nil + } res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -381,6 +398,12 @@ func (m *BaseGist) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01 return err } } + { + err := writer.WriteBoolValue("comments_enabled", m.GetCommentsEnabled()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) if err != nil { @@ -511,6 +534,10 @@ func (m *BaseGist) SetAdditionalData(value map[string]any)() { func (m *BaseGist) SetComments(value *int32)() { m.comments = value } +// SetCommentsEnabled sets the comments_enabled property value. The comments_enabled property +func (m *BaseGist) SetCommentsEnabled(value *bool)() { + m.comments_enabled = value +} // SetCommentsUrl sets the comments_url property value. The comments_url property func (m *BaseGist) SetCommentsUrl(value *string)() { m.comments_url = value @@ -591,6 +618,7 @@ type BaseGistable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetComments()(*int32) + GetCommentsEnabled()(*bool) GetCommentsUrl()(*string) GetCommitsUrl()(*string) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -611,6 +639,7 @@ type BaseGistable interface { GetUrl()(*string) GetUser()(NullableSimpleUserable) SetComments(value *int32)() + SetCommentsEnabled(value *bool)() SetCommentsUrl(value *string)() SetCommitsUrl(value *string)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/code_scanning_default_setup.go b/pkg/github/models/code_scanning_default_setup.go index 01af1752..80d8b408 100644 --- a/pkg/github/models/code_scanning_default_setup.go +++ b/pkg/github/models/code_scanning_default_setup.go @@ -13,6 +13,10 @@ type CodeScanningDefaultSetup struct { languages []CodeScanningDefaultSetup_languages // CodeQL query suite to be used. query_suite *CodeScanningDefaultSetup_query_suite + // Runner label to be used if the runner type is labeled. + runner_label *string + // Runner type to be used. + runner_type *CodeScanningDefaultSetup_runner_type // The frequency of the periodic analysis. schedule *CodeScanningDefaultSetup_schedule // Code scanning default setup has been configured or not. @@ -67,6 +71,26 @@ func (m *CodeScanningDefaultSetup) GetFieldDeserializers()(map[string]func(i878a } return nil } + res["runner_label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnerLabel(val) + } + return nil + } + res["runner_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetup_runner_type) + if err != nil { + return err + } + if val != nil { + m.SetRunnerType(val.(*CodeScanningDefaultSetup_runner_type)) + } + return nil + } res["schedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseCodeScanningDefaultSetup_schedule) if err != nil { @@ -109,6 +133,16 @@ func (m *CodeScanningDefaultSetup) GetLanguages()([]CodeScanningDefaultSetup_lan func (m *CodeScanningDefaultSetup) GetQuerySuite()(*CodeScanningDefaultSetup_query_suite) { return m.query_suite } +// GetRunnerLabel gets the runner_label property value. Runner label to be used if the runner type is labeled. +// returns a *string when successful +func (m *CodeScanningDefaultSetup) GetRunnerLabel()(*string) { + return m.runner_label +} +// GetRunnerType gets the runner_type property value. Runner type to be used. +// returns a *CodeScanningDefaultSetup_runner_type when successful +func (m *CodeScanningDefaultSetup) GetRunnerType()(*CodeScanningDefaultSetup_runner_type) { + return m.runner_type +} // GetSchedule gets the schedule property value. The frequency of the periodic analysis. // returns a *CodeScanningDefaultSetup_schedule when successful func (m *CodeScanningDefaultSetup) GetSchedule()(*CodeScanningDefaultSetup_schedule) { @@ -139,6 +173,19 @@ func (m *CodeScanningDefaultSetup) Serialize(writer i878a80d2330e89d26896388a3f4 return err } } + { + err := writer.WriteStringValue("runner_label", m.GetRunnerLabel()) + if err != nil { + return err + } + } + if m.GetRunnerType() != nil { + cast := (*m.GetRunnerType()).String() + err := writer.WriteStringValue("runner_type", &cast) + if err != nil { + return err + } + } if m.GetSchedule() != nil { cast := (*m.GetSchedule()).String() err := writer.WriteStringValue("schedule", &cast) @@ -179,6 +226,14 @@ func (m *CodeScanningDefaultSetup) SetLanguages(value []CodeScanningDefaultSetup func (m *CodeScanningDefaultSetup) SetQuerySuite(value *CodeScanningDefaultSetup_query_suite)() { m.query_suite = value } +// SetRunnerLabel sets the runner_label property value. Runner label to be used if the runner type is labeled. +func (m *CodeScanningDefaultSetup) SetRunnerLabel(value *string)() { + m.runner_label = value +} +// SetRunnerType sets the runner_type property value. Runner type to be used. +func (m *CodeScanningDefaultSetup) SetRunnerType(value *CodeScanningDefaultSetup_runner_type)() { + m.runner_type = value +} // SetSchedule sets the schedule property value. The frequency of the periodic analysis. func (m *CodeScanningDefaultSetup) SetSchedule(value *CodeScanningDefaultSetup_schedule)() { m.schedule = value @@ -196,11 +251,15 @@ type CodeScanningDefaultSetupable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetLanguages()([]CodeScanningDefaultSetup_languages) GetQuerySuite()(*CodeScanningDefaultSetup_query_suite) + GetRunnerLabel()(*string) + GetRunnerType()(*CodeScanningDefaultSetup_runner_type) GetSchedule()(*CodeScanningDefaultSetup_schedule) GetState()(*CodeScanningDefaultSetup_state) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) SetLanguages(value []CodeScanningDefaultSetup_languages)() SetQuerySuite(value *CodeScanningDefaultSetup_query_suite)() + SetRunnerLabel(value *string)() + SetRunnerType(value *CodeScanningDefaultSetup_runner_type)() SetSchedule(value *CodeScanningDefaultSetup_schedule)() SetState(value *CodeScanningDefaultSetup_state)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/code_scanning_default_setup_escaped_runner_escaped_type.go b/pkg/github/models/code_scanning_default_setup_escaped_runner_escaped_type.go new file mode 100644 index 00000000..0f12a9c8 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_escaped_runner_escaped_type.go @@ -0,0 +1,34 @@ +package models +// Runner type to be used. +type CodeScanningDefaultSetup_runner_type int + +const ( + STANDARD_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE CodeScanningDefaultSetup_runner_type = iota + LABELED_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE +) + +func (i CodeScanningDefaultSetup_runner_type) String() string { + return []string{"standard", "labeled"}[i] +} +func ParseCodeScanningDefaultSetup_runner_type(v string) (any, error) { + result := STANDARD_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE + switch v { + case "standard": + result = STANDARD_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE + case "labeled": + result = LABELED_CODESCANNINGDEFAULTSETUP_RUNNER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeCodeScanningDefaultSetup_runner_type(values []CodeScanningDefaultSetup_runner_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetup_runner_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/gist_simple.go b/pkg/github/models/gist_simple.go index a6d9d046..1c8aa349 100644 --- a/pkg/github/models/gist_simple.go +++ b/pkg/github/models/gist_simple.go @@ -10,6 +10,8 @@ type GistSimple struct { additionalData map[string]any // The comments property comments *int32 + // The comments_enabled property + comments_enabled *bool // The comments_url property comments_url *string // The commits_url property @@ -75,6 +77,11 @@ func (m *GistSimple) GetAdditionalData()(map[string]any) { func (m *GistSimple) GetComments()(*int32) { return m.comments } +// GetCommentsEnabled gets the comments_enabled property value. The comments_enabled property +// returns a *bool when successful +func (m *GistSimple) GetCommentsEnabled()(*bool) { + return m.comments_enabled +} // GetCommentsUrl gets the comments_url property value. The comments_url property // returns a *string when successful func (m *GistSimple) GetCommentsUrl()(*string) { @@ -109,6 +116,16 @@ func (m *GistSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268 } return nil } + res["comments_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsEnabled(val) + } + return nil + } res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -413,6 +430,12 @@ func (m *GistSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c return err } } + { + err := writer.WriteBoolValue("comments_enabled", m.GetCommentsEnabled()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) if err != nil { @@ -561,6 +584,10 @@ func (m *GistSimple) SetAdditionalData(value map[string]any)() { func (m *GistSimple) SetComments(value *int32)() { m.comments = value } +// SetCommentsEnabled sets the comments_enabled property value. The comments_enabled property +func (m *GistSimple) SetCommentsEnabled(value *bool)() { + m.comments_enabled = value +} // SetCommentsUrl sets the comments_url property value. The comments_url property func (m *GistSimple) SetCommentsUrl(value *string)() { m.comments_url = value @@ -647,6 +674,7 @@ type GistSimpleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetComments()(*int32) + GetCommentsEnabled()(*bool) GetCommentsUrl()(*string) GetCommitsUrl()(*string) GetCreatedAt()(*string) @@ -668,6 +696,7 @@ type GistSimpleable interface { GetUrl()(*string) GetUser()(*string) SetComments(value *int32)() + SetCommentsEnabled(value *bool)() SetCommentsUrl(value *string)() SetCommitsUrl(value *string)() SetCreatedAt(value *string)() diff --git a/pkg/github/models/gist_simple_escaped_fork_escaped_of.go b/pkg/github/models/gist_simple_escaped_fork_escaped_of.go index 2971159b..4f7dc889 100644 --- a/pkg/github/models/gist_simple_escaped_fork_escaped_of.go +++ b/pkg/github/models/gist_simple_escaped_fork_escaped_of.go @@ -11,6 +11,8 @@ type GistSimple_fork_of struct { additionalData map[string]any // The comments property comments *int32 + // The comments_enabled property + comments_enabled *bool // The comments_url property comments_url *string // The commits_url property @@ -72,6 +74,11 @@ func (m *GistSimple_fork_of) GetAdditionalData()(map[string]any) { func (m *GistSimple_fork_of) GetComments()(*int32) { return m.comments } +// GetCommentsEnabled gets the comments_enabled property value. The comments_enabled property +// returns a *bool when successful +func (m *GistSimple_fork_of) GetCommentsEnabled()(*bool) { + return m.comments_enabled +} // GetCommentsUrl gets the comments_url property value. The comments_url property // returns a *string when successful func (m *GistSimple_fork_of) GetCommentsUrl()(*string) { @@ -106,6 +113,16 @@ func (m *GistSimple_fork_of) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["comments_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCommentsEnabled(val) + } + return nil + } res["comments_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -381,6 +398,12 @@ func (m *GistSimple_fork_of) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err := writer.WriteBoolValue("comments_enabled", m.GetCommentsEnabled()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("comments_url", m.GetCommentsUrl()) if err != nil { @@ -511,6 +534,10 @@ func (m *GistSimple_fork_of) SetAdditionalData(value map[string]any)() { func (m *GistSimple_fork_of) SetComments(value *int32)() { m.comments = value } +// SetCommentsEnabled sets the comments_enabled property value. The comments_enabled property +func (m *GistSimple_fork_of) SetCommentsEnabled(value *bool)() { + m.comments_enabled = value +} // SetCommentsUrl sets the comments_url property value. The comments_url property func (m *GistSimple_fork_of) SetCommentsUrl(value *string)() { m.comments_url = value @@ -591,6 +618,7 @@ type GistSimple_fork_ofable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetComments()(*int32) + GetCommentsEnabled()(*bool) GetCommentsUrl()(*string) GetCommitsUrl()(*string) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -611,6 +639,7 @@ type GistSimple_fork_ofable interface { GetUrl()(*string) GetUser()(NullableSimpleUserable) SetComments(value *int32)() + SetCommentsEnabled(value *bool)() SetCommentsUrl(value *string)() SetCommitsUrl(value *string)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go b/pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go index a6857e45..ccb2e3d9 100644 --- a/pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go +++ b/pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemSecretScanningScanHistoryRequestBuilder(rawUrl string, requestAd urlParams["request-raw-url"] = rawUrl return NewItemItemSecretScanningScanHistoryRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the latest incremental and backfill scans by type for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// Get lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. // returns a SecretScanningScanHistoryable when successful // returns a SecretScanningScanHistory503Error error when the service returns a 503 status code // [API method documentation] @@ -46,7 +46,7 @@ func (m *ItemItemSecretScanningScanHistoryRequestBuilder) Get(ctx context.Contex } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningScanHistoryable), nil } -// ToGetRequestInformation lists the latest incremental and backfill scans by type for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// ToGetRequestInformation lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. // returns a *RequestInformation when successful func (m *ItemItemSecretScanningScanHistoryRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_topics_put_request_body.go b/pkg/github/repos/item_item_topics_put_request_body.go index 7d6c7c68..cc5184f1 100644 --- a/pkg/github/repos/item_item_topics_put_request_body.go +++ b/pkg/github/repos/item_item_topics_put_request_body.go @@ -7,7 +7,7 @@ import ( type ItemItemTopicsPutRequestBody struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. + // An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` will be saved as lowercase. names []string } // NewItemItemTopicsPutRequestBody instantiates a new ItemItemTopicsPutRequestBody and sets the default values. @@ -49,7 +49,7 @@ func (m *ItemItemTopicsPutRequestBody) GetFieldDeserializers()(map[string]func(i } return res } -// GetNames gets the names property value. An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. +// GetNames gets the names property value. An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` will be saved as lowercase. // returns a []string when successful func (m *ItemItemTopicsPutRequestBody) GetNames()([]string) { return m.names @@ -74,7 +74,7 @@ func (m *ItemItemTopicsPutRequestBody) Serialize(writer i878a80d2330e89d26896388 func (m *ItemItemTopicsPutRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetNames sets the names property value. An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. +// SetNames sets the names property value. An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` will be saved as lowercase. func (m *ItemItemTopicsPutRequestBody) SetNames(value []string)() { m.names = value }