From 5ff8fd32d292e30ddd45741ae24ae704b667d5a8 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 27 Dec 2024 00:09:28 +0000 Subject: [PATCH 01/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- .../models/code_scanning_default_setup.go | 59 +++++++++++++++++++ ...fault_setup_escaped_runner_escaped_type.go | 34 +++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 pkg/github/models/code_scanning_default_setup_escaped_runner_escaped_type.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 90ecf512..cd2de44b 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "54208FD0E974CC1715543AD344E8EB72FE62F45838301766C1CFBE3A6EDF1B14B8CFC3A84C4495B0B29B749D231789DB35F3CBFA101624FD7E5BF8FB1ECB51DD", + "descriptionHash": "1E3B4B453642A170C2B017A5E078B2DEC6C94D68C54F912F6AD9A6E258569AFE80D8930DD05455D2F905ABF8E68E77C9C1D38EB4D1ECEF521FADB0549B8B483A", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", 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 +} From 36de8ef18565def3a657b725aafa9bf56a4bc6ed Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 7 Jan 2025 00:10:08 +0000 Subject: [PATCH 02/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/base_gist.go | 29 +++++++++++++++++++ pkg/github/models/gist_simple.go | 29 +++++++++++++++++++ .../gist_simple_escaped_fork_escaped_of.go | 29 +++++++++++++++++++ ...t_scanning_scan_history_request_builder.go | 4 +-- 5 files changed, 90 insertions(+), 3 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index cd2de44b..c3863e7e 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "1E3B4B453642A170C2B017A5E078B2DEC6C94D68C54F912F6AD9A6E258569AFE80D8930DD05455D2F905ABF8E68E77C9C1D38EB4D1ECEF521FADB0549B8B483A", + "descriptionHash": "B52F8D200346F72027E19020AC6FD43674E66C39C2A169B0BBAC6CDDE9C96F208E75CA58910C8314F0DA42A1BDBFFEEB7C9B7654C4C25CAD2AFE1B2F110E7828", "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/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) From 9f7f62f194409bc5e34ca85e02eed892be1984a4 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 8 Jan 2025 00:09:33 +0000 Subject: [PATCH 03/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index c3863e7e..d57ae7db 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "B52F8D200346F72027E19020AC6FD43674E66C39C2A169B0BBAC6CDDE9C96F208E75CA58910C8314F0DA42A1BDBFFEEB7C9B7654C4C25CAD2AFE1B2F110E7828", + "descriptionHash": "705949811BB4B993F4A28B37CE636880EEABA82A783F3A28CF02C8EF28DB5895E321CD56B9B96BBA684428448266920C0BAF93FF9CD5A23D495C8261ED93DEF1", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", From b9b984323ff9bd24836414cf3df7222971bf06a9 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 9 Jan 2025 00:09:30 +0000 Subject: [PATCH 04/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/repos/item_item_topics_put_request_body.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index d57ae7db..66eb25af 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "705949811BB4B993F4A28B37CE636880EEABA82A783F3A28CF02C8EF28DB5895E321CD56B9B96BBA684428448266920C0BAF93FF9CD5A23D495C8261ED93DEF1", + "descriptionHash": "F1CDCE830F194C13607774118F34FFBF58DE56BC116936D7DE02C36131A1AC2B46B78BADE2DCB5193A3B2CA55EDCB69BAF7CAC8B9F6ACA8C3CCD2E2B049D1F7B", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", 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 } From 5b9d92f15f6378f973b84e8d5debae990eb351af Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 10 Jan 2025 00:09:33 +0000 Subject: [PATCH 05/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 66eb25af..4e98ac4f 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "F1CDCE830F194C13607774118F34FFBF58DE56BC116936D7DE02C36131A1AC2B46B78BADE2DCB5193A3B2CA55EDCB69BAF7CAC8B9F6ACA8C3CCD2E2B049D1F7B", + "descriptionHash": "37D16F900E8FD54A55AED2274BFBD2E8A6552A4B6C8A2F8C668D5748EF7E84299244EECAE13540C67006F572CF9D36E8664402663403A02188221808E75B55DE", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", From 1e61e51a608dc27b343d1188ae18b2f29052d15d Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 15 Jan 2025 00:09:30 +0000 Subject: [PATCH 06/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- .../models/check_automated_security_fixes.go | 14 ++++----- pkg/github/models/enterprise_team.go | 29 +++++++++++++++++++ ...utomated_security_fixes_request_builder.go | 18 ++++++------ 4 files changed, 46 insertions(+), 17 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 4e98ac4f..ada883cf 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "37D16F900E8FD54A55AED2274BFBD2E8A6552A4B6C8A2F8C668D5748EF7E84299244EECAE13540C67006F572CF9D36E8664402663403A02188221808E75B55DE", + "descriptionHash": "38F7E3C3D6BB9DB0C620D76E1FC82964BA22F6E1CBE49F25A1FE16B46E4A17106671665142AF54287C14355D97277B7A500C31B9D34B3B19D734C18CB4C97066", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/check_automated_security_fixes.go b/pkg/github/models/check_automated_security_fixes.go index a20c43b6..dcbaff16 100644 --- a/pkg/github/models/check_automated_security_fixes.go +++ b/pkg/github/models/check_automated_security_fixes.go @@ -4,13 +4,13 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CheckAutomatedSecurityFixes check Automated Security Fixes +// CheckAutomatedSecurityFixes check Dependabot security updates type CheckAutomatedSecurityFixes 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 automated security fixes are enabled for the repository. + // Whether Dependabot security updates are enabled for the repository. enabled *bool - // Whether automated security fixes are paused for the repository. + // Whether Dependabot security updates are paused for the repository. paused *bool } // NewCheckAutomatedSecurityFixes instantiates a new CheckAutomatedSecurityFixes and sets the default values. @@ -30,7 +30,7 @@ func CreateCheckAutomatedSecurityFixesFromDiscriminatorValue(parseNode i878a80d2 func (m *CheckAutomatedSecurityFixes) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetEnabled gets the enabled property value. Whether automated security fixes are enabled for the repository. +// GetEnabled gets the enabled property value. Whether Dependabot security updates are enabled for the repository. // returns a *bool when successful func (m *CheckAutomatedSecurityFixes) GetEnabled()(*bool) { return m.enabled @@ -61,7 +61,7 @@ func (m *CheckAutomatedSecurityFixes) GetFieldDeserializers()(map[string]func(i8 } return res } -// GetPaused gets the paused property value. Whether automated security fixes are paused for the repository. +// GetPaused gets the paused property value. Whether Dependabot security updates are paused for the repository. // returns a *bool when successful func (m *CheckAutomatedSecurityFixes) GetPaused()(*bool) { return m.paused @@ -92,11 +92,11 @@ func (m *CheckAutomatedSecurityFixes) Serialize(writer i878a80d2330e89d26896388a func (m *CheckAutomatedSecurityFixes) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetEnabled sets the enabled property value. Whether automated security fixes are enabled for the repository. +// SetEnabled sets the enabled property value. Whether Dependabot security updates are enabled for the repository. func (m *CheckAutomatedSecurityFixes) SetEnabled(value *bool)() { m.enabled = value } -// SetPaused sets the paused property value. Whether automated security fixes are paused for the repository. +// SetPaused sets the paused property value. Whether Dependabot security updates are paused for the repository. func (m *CheckAutomatedSecurityFixes) SetPaused(value *bool)() { m.paused = value } diff --git a/pkg/github/models/enterprise_team.go b/pkg/github/models/enterprise_team.go index 0aa436cb..1fb8fcc5 100644 --- a/pkg/github/models/enterprise_team.go +++ b/pkg/github/models/enterprise_team.go @@ -13,6 +13,8 @@ type EnterpriseTeam struct { created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The group_id property group_id *string + // The group_name property + group_name *string // The html_url property html_url *string // The id property @@ -76,6 +78,16 @@ func (m *EnterpriseTeam) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["group_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -163,6 +175,11 @@ func (m *EnterpriseTeam) GetFieldDeserializers()(map[string]func(i878a80d2330e89 func (m *EnterpriseTeam) GetGroupId()(*string) { return m.group_id } +// GetGroupName gets the group_name property value. The group_name property +// returns a *string when successful +func (m *EnterpriseTeam) GetGroupName()(*string) { + return m.group_name +} // GetHtmlUrl gets the html_url property value. The html_url property // returns a *string when successful func (m *EnterpriseTeam) GetHtmlUrl()(*string) { @@ -217,6 +234,12 @@ func (m *EnterpriseTeam) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + { + err := writer.WriteStringValue("group_name", m.GetGroupName()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) if err != nil { @@ -285,6 +308,10 @@ func (m *EnterpriseTeam) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6 func (m *EnterpriseTeam) SetGroupId(value *string)() { m.group_id = value } +// SetGroupName sets the group_name property value. The group_name property +func (m *EnterpriseTeam) SetGroupName(value *string)() { + m.group_name = value +} // SetHtmlUrl sets the html_url property value. The html_url property func (m *EnterpriseTeam) SetHtmlUrl(value *string)() { m.html_url = value @@ -322,6 +349,7 @@ type EnterpriseTeamable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetGroupId()(*string) + GetGroupName()(*string) GetHtmlUrl()(*string) GetId()(*int64) GetMembersUrl()(*string) @@ -332,6 +360,7 @@ type EnterpriseTeamable interface { GetUrl()(*string) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetGroupId(value *string)() + SetGroupName(value *string)() SetHtmlUrl(value *string)() SetId(value *int64)() SetMembersUrl(value *string)() diff --git a/pkg/github/repos/item_item_automated_security_fixes_request_builder.go b/pkg/github/repos/item_item_automated_security_fixes_request_builder.go index 35e4fc86..1d937076 100644 --- a/pkg/github/repos/item_item_automated_security_fixes_request_builder.go +++ b/pkg/github/repos/item_item_automated_security_fixes_request_builder.go @@ -23,10 +23,10 @@ func NewItemItemAutomatedSecurityFixesRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewItemItemAutomatedSecurityFixesRequestBuilderInternal(urlParams, requestAdapter) } -// Delete disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". +// Delete disables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/repos/repos#disable-automated-security-fixes +// [API method documentation]: https://docs.github.com/rest/repos/repos#disable-dependabot-security-updates func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -38,11 +38,11 @@ func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Delete(ctx context.Contex } return nil } -// Get shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". +// Get shows whether Dependabot security updates are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". // returns a CheckAutomatedSecurityFixesable when successful // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/repos/repos#check-if-automated-security-fixes-are-enabled-for-a-repository +// [API method documentation]: https://docs.github.com/rest/repos/repos#check-if-dependabot-security-updates-are-enabled-for-a-repository func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CheckAutomatedSecurityFixesable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -57,10 +57,10 @@ func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Get(ctx context.Context, } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CheckAutomatedSecurityFixesable), nil } -// Put enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". +// Put enables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/repos/repos#enable-automated-security-fixes +// [API method documentation]: https://docs.github.com/rest/repos/repos#enable-dependabot-security-updates func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Put(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { requestInfo, err := m.ToPutRequestInformation(ctx, requestConfiguration); if err != nil { @@ -72,14 +72,14 @@ func (m *ItemItemAutomatedSecurityFixesRequestBuilder) Put(ctx context.Context, } return nil } -// ToDeleteRequestInformation disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". +// ToDeleteRequestInformation disables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". // returns a *RequestInformation when successful func (m *ItemItemAutomatedSecurityFixesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToGetRequestInformation shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". +// ToGetRequestInformation shows whether Dependabot security updates are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". // returns a *RequestInformation when successful func (m *ItemItemAutomatedSecurityFixesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -87,7 +87,7 @@ func (m *ItemItemAutomatedSecurityFixesRequestBuilder) ToGetRequestInformation(c requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPutRequestInformation enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". +// ToPutRequestInformation enables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". // returns a *RequestInformation when successful func (m *ItemItemAutomatedSecurityFixesRequestBuilder) ToPutRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From 3b14d66a8a97ebc23fc2c27d433e05bde1b17357 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 17 Jan 2025 00:09:26 +0000 Subject: [PATCH 07/25] New updates to generated code --- .../item/dependabot/alerts/get_sort_query_parameter_type.go | 5 ++++- .../enterprises/item_dependabot_alerts_request_builder.go | 2 +- pkg/github/kiota-lock.json | 2 +- .../item/dependabot/alerts/get_sort_query_parameter_type.go | 5 ++++- pkg/github/orgs/item_dependabot_alerts_request_builder.go | 2 +- .../item/dependabot/alerts/get_sort_query_parameter_type.go | 5 ++++- .../repos/item_item_dependabot_alerts_request_builder.go | 2 +- pkg/github/user/with_account_escaped_item_request_builder.go | 4 ++-- pkg/github/users/with_username_item_request_builder.go | 4 ++-- 9 files changed, 20 insertions(+), 11 deletions(-) diff --git a/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go index 719c5fb3..ecaaa7e4 100644 --- a/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/enterprises/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -4,10 +4,11 @@ type GetSortQueryParameterType int const ( CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota UPDATED_GETSORTQUERYPARAMETERTYPE + EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE ) func (i GetSortQueryParameterType) String() string { - return []string{"created", "updated"}[i] + return []string{"created", "updated", "epss_percentage"}[i] } func ParseGetSortQueryParameterType(v string) (any, error) { result := CREATED_GETSORTQUERYPARAMETERTYPE @@ -16,6 +17,8 @@ func ParseGetSortQueryParameterType(v string) (any, error) { result = CREATED_GETSORTQUERYPARAMETERTYPE case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "epss_percentage": + result = EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE default: return nil, nil } diff --git a/pkg/github/enterprises/item_dependabot_alerts_request_builder.go b/pkg/github/enterprises/item_dependabot_alerts_request_builder.go index c17b1f14..e7ae5b99 100644 --- a/pkg/github/enterprises/item_dependabot_alerts_request_builder.go +++ b/pkg/github/enterprises/item_dependabot_alerts_request_builder.go @@ -33,7 +33,7 @@ type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { Scope *i77c38d6454f4c9dc55005405729b416470b652fa12f001a040f72bc1395cc732.GetScopeQueryParameterType `uriparametername:"scope"` // A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` Severity *string `uriparametername:"severity"` - // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed. + // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. Sort *i77c38d6454f4c9dc55005405729b416470b652fa12f001a040f72bc1395cc732.GetSortQueryParameterType `uriparametername:"sort"` // A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` State *string `uriparametername:"state"` diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index ada883cf..04a934c4 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "38F7E3C3D6BB9DB0C620D76E1FC82964BA22F6E1CBE49F25A1FE16B46E4A17106671665142AF54287C14355D97277B7A500C31B9D34B3B19D734C18CB4C97066", + "descriptionHash": "C84AE6AF1B5631937CEF55A90CC3878897880355FD45430C281287BEB6AF8FFCEF4B21A49C8089494C5B75881FEA1A7F809D376F852C7CECB69D77D100AA0073", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go index 719c5fb3..ecaaa7e4 100644 --- a/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/orgs/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -4,10 +4,11 @@ type GetSortQueryParameterType int const ( CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota UPDATED_GETSORTQUERYPARAMETERTYPE + EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE ) func (i GetSortQueryParameterType) String() string { - return []string{"created", "updated"}[i] + return []string{"created", "updated", "epss_percentage"}[i] } func ParseGetSortQueryParameterType(v string) (any, error) { result := CREATED_GETSORTQUERYPARAMETERTYPE @@ -16,6 +17,8 @@ func ParseGetSortQueryParameterType(v string) (any, error) { result = CREATED_GETSORTQUERYPARAMETERTYPE case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "epss_percentage": + result = EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE default: return nil, nil } diff --git a/pkg/github/orgs/item_dependabot_alerts_request_builder.go b/pkg/github/orgs/item_dependabot_alerts_request_builder.go index ffbd27b7..1ca2fdb4 100644 --- a/pkg/github/orgs/item_dependabot_alerts_request_builder.go +++ b/pkg/github/orgs/item_dependabot_alerts_request_builder.go @@ -33,7 +33,7 @@ type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { Scope *id5ed4dfa872423f58318ec5274226649a680208c924c0fa4b6e180a4e9175a51.GetScopeQueryParameterType `uriparametername:"scope"` // A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` Severity *string `uriparametername:"severity"` - // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed. + // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. Sort *id5ed4dfa872423f58318ec5274226649a680208c924c0fa4b6e180a4e9175a51.GetSortQueryParameterType `uriparametername:"sort"` // A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` State *string `uriparametername:"state"` diff --git a/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go b/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go index 719c5fb3..ecaaa7e4 100644 --- a/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go +++ b/pkg/github/repos/item/item/dependabot/alerts/get_sort_query_parameter_type.go @@ -4,10 +4,11 @@ type GetSortQueryParameterType int const ( CREATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota UPDATED_GETSORTQUERYPARAMETERTYPE + EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE ) func (i GetSortQueryParameterType) String() string { - return []string{"created", "updated"}[i] + return []string{"created", "updated", "epss_percentage"}[i] } func ParseGetSortQueryParameterType(v string) (any, error) { result := CREATED_GETSORTQUERYPARAMETERTYPE @@ -16,6 +17,8 @@ func ParseGetSortQueryParameterType(v string) (any, error) { result = CREATED_GETSORTQUERYPARAMETERTYPE case "updated": result = UPDATED_GETSORTQUERYPARAMETERTYPE + case "epss_percentage": + result = EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE default: return nil, nil } diff --git a/pkg/github/repos/item_item_dependabot_alerts_request_builder.go b/pkg/github/repos/item_item_dependabot_alerts_request_builder.go index ed8e13d4..7e69ca9c 100644 --- a/pkg/github/repos/item_item_dependabot_alerts_request_builder.go +++ b/pkg/github/repos/item_item_dependabot_alerts_request_builder.go @@ -40,7 +40,7 @@ type ItemItemDependabotAlertsRequestBuilderGetQueryParameters struct { Scope *i4239b9a99f590fb557f6cee5c0b7a464cc1a12da753e0582e737b6a06899504e.GetScopeQueryParameterType `uriparametername:"scope"` // A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` Severity *string `uriparametername:"severity"` - // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed. + // The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. Sort *i4239b9a99f590fb557f6cee5c0b7a464cc1a12da753e0582e737b6a06899504e.GetSortQueryParameterType `uriparametername:"sort"` // A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` State *string `uriparametername:"state"` diff --git a/pkg/github/user/with_account_escaped_item_request_builder.go b/pkg/github/user/with_account_escaped_item_request_builder.go index 4c32c24c..b49ded3f 100644 --- a/pkg/github/user/with_account_escaped_item_request_builder.go +++ b/pkg/github/user/with_account_escaped_item_request_builder.go @@ -113,7 +113,7 @@ func NewWithAccount_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewWithAccount_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". +// Get provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails). // returns a WithAccount_GetResponseable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -136,7 +136,7 @@ func (m *WithAccount_ItemRequestBuilder) Get(ctx context.Context, requestConfigu } return res.(WithAccount_GetResponseable), nil } -// ToGetRequestInformation provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". +// ToGetRequestInformation provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails). // returns a *RequestInformation when successful func (m *WithAccount_ItemRequestBuilder) 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/users/with_username_item_request_builder.go b/pkg/github/users/with_username_item_request_builder.go index 5e6f0114..1438043a 100644 --- a/pkg/github/users/with_username_item_request_builder.go +++ b/pkg/github/users/with_username_item_request_builder.go @@ -138,7 +138,7 @@ func (m *WithUsernameItemRequestBuilder) Followers()(*ItemFollowersRequestBuilde func (m *WithUsernameItemRequestBuilder) Following()(*ItemFollowingRequestBuilder) { return NewItemFollowingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get provides publicly available information about someone with a GitHub account.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". +// Get provides publicly available information about someone with a GitHub account.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails). // returns a WithUsernameGetResponseable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -236,7 +236,7 @@ func (m *WithUsernameItemRequestBuilder) Starred()(*ItemStarredRequestBuilder) { func (m *WithUsernameItemRequestBuilder) Subscriptions()(*ItemSubscriptionsRequestBuilder) { return NewItemSubscriptionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation provides publicly available information about someone with a GitHub account.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". +// ToGetRequestInformation provides publicly available information about someone with a GitHub account.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails). // returns a *RequestInformation when successful func (m *WithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From ff420014e36faf4562e3df5c8ad9e7870ab60058 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 18 Jan 2025 00:09:04 +0000 Subject: [PATCH 08/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/actions_hosted_runner.go | 385 ++++++++++++++++++ .../actions_hosted_runner_escaped_status.go | 43 ++ .../models/actions_hosted_runner_image.go | 198 +++++++++ ...ions_hosted_runner_image_escaped_source.go | 37 ++ .../models/actions_hosted_runner_limits.go | 80 ++++ ...unner_limits_escaped_public_escaped_ips.go | 110 +++++ .../actions_hosted_runner_machine_spec.go | 168 ++++++++ pkg/github/models/integration.go | 105 ++++- ...llable_actions_hosted_runner_pool_image.go | 198 +++++++++ ...hosted_runner_pool_image_escaped_source.go | 37 ++ pkg/github/models/nullable_integration.go | 105 ++++- pkg/github/models/public_ip.go | 139 +++++++ pkg/github/models/runner_groups_org.go | 29 ++ ...quest_body_escaped_image_escaped_source.go | 37 ++ ...tem_actions_hosted_runners_get_response.go | 122 ++++++ ...unners_images_github_owned_get_response.go | 122 ++++++ ...ers_images_github_owned_request_builder.go | 56 +++ ...ted_runners_images_partner_get_response.go | 122 ++++++ ..._runners_images_partner_request_builder.go | 56 +++ ...s_hosted_runners_images_request_builder.go | 33 ++ ...caped_runner_escaped_patch_request_body.go | 196 +++++++++ ...s_hosted_runners_limits_request_builder.go | 57 +++ ...sted_runners_machine_sizes_get_response.go | 122 ++++++ ...d_runners_machine_sizes_request_builder.go | 56 +++ ...s_hosted_runners_platforms_get_response.go | 115 ++++++ ...osted_runners_platforms_request_builder.go | 56 +++ ...ctions_hosted_runners_post_request_body.go | 225 ++++++++++ ...runners_post_request_body_escaped_image.go | 110 +++++ ..._actions_hosted_runners_request_builder.go | 126 ++++++ ...ped_runner_escaped_item_request_builder.go | 115 ++++++ .../orgs/item_actions_request_builder.go | 5 + ...groups_item_hosted_runners_get_response.go | 122 ++++++ ...ups_item_hosted_runners_request_builder.go | 63 +++ ...scaped_group_escaped_patch_request_body.go | 29 ++ ...actions_runner_groups_post_request_body.go | 29 ++ ...aped_group_escaped_item_request_builder.go | 5 + 37 files changed, 3592 insertions(+), 23 deletions(-) create mode 100644 pkg/github/models/actions_hosted_runner.go create mode 100644 pkg/github/models/actions_hosted_runner_escaped_status.go create mode 100644 pkg/github/models/actions_hosted_runner_image.go create mode 100644 pkg/github/models/actions_hosted_runner_image_escaped_source.go create mode 100644 pkg/github/models/actions_hosted_runner_limits.go create mode 100644 pkg/github/models/actions_hosted_runner_limits_escaped_public_escaped_ips.go create mode 100644 pkg/github/models/actions_hosted_runner_machine_spec.go create mode 100644 pkg/github/models/nullable_actions_hosted_runner_pool_image.go create mode 100644 pkg/github/models/nullable_actions_hosted_runner_pool_image_escaped_source.go create mode 100644 pkg/github/models/public_ip.go create mode 100644 pkg/github/orgs/item/actions/hostedrunners/hosted_runners_post_request_body_escaped_image_escaped_source.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_get_response.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_images_github_owned_get_response.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_images_github_owned_request_builder.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_images_partner_get_response.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_images_partner_request_builder.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_images_request_builder.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_item_with_hosted_escaped_runner_escaped_patch_request_body.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_limits_request_builder.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_machine_sizes_get_response.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_machine_sizes_request_builder.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_platforms_get_response.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_platforms_request_builder.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_post_request_body.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_post_request_body_escaped_image.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_request_builder.go create mode 100644 pkg/github/orgs/item_actions_hosted_runners_with_hosted_escaped_runner_escaped_item_request_builder.go create mode 100644 pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_get_response.go create mode 100644 pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_request_builder.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 04a934c4..a665f725 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "C84AE6AF1B5631937CEF55A90CC3878897880355FD45430C281287BEB6AF8FFCEF4B21A49C8089494C5B75881FEA1A7F809D376F852C7CECB69D77D100AA0073", + "descriptionHash": "FB8FE1F741E080719F7C4C8EECBECB741B6136E59A74D88B952D22410BD8A842793A943EAAE1203C70B4C81AC38085D1E362187B86FF232A573D3D7DDB253B9B", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/actions_hosted_runner.go b/pkg/github/models/actions_hosted_runner.go new file mode 100644 index 00000000..52388f9b --- /dev/null +++ b/pkg/github/models/actions_hosted_runner.go @@ -0,0 +1,385 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsHostedRunner a Github-hosted hosted runner. +type ActionsHostedRunner 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 unique identifier of the hosted runner. + id *int32 + // Provides details of a hosted runner image + image_details NullableActionsHostedRunnerPoolImageable + // The time at which the runner was last used, in ISO 8601 format. + last_active_on *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Provides details of a particular machine spec. + machine_size_details ActionsHostedRunnerMachineSpecable + // The maximum amount of hosted runners. Runners will not scale automatically above this number. Use this setting to limit your cost. + maximum_runners *int32 + // The name of the hosted runner. + name *string + // The operating system of the image. + platform *string + // Whether public IP is enabled for the hosted runners. + public_ip_enabled *bool + // The public IP ranges when public IP is enabled for the hosted runners. + public_ips []PublicIpable + // The unique identifier of the group that the hosted runner belongs to. + runner_group_id *int32 + // The status of the runner. + status *ActionsHostedRunner_status +} +// NewActionsHostedRunner instantiates a new ActionsHostedRunner and sets the default values. +func NewActionsHostedRunner()(*ActionsHostedRunner) { + m := &ActionsHostedRunner{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsHostedRunnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsHostedRunnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsHostedRunner(), 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 *ActionsHostedRunner) 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 *ActionsHostedRunner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["image_details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableActionsHostedRunnerPoolImageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetImageDetails(val.(NullableActionsHostedRunnerPoolImageable)) + } + return nil + } + res["last_active_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActiveOn(val) + } + return nil + } + res["machine_size_details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActionsHostedRunnerMachineSpecFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMachineSizeDetails(val.(ActionsHostedRunnerMachineSpecable)) + } + return nil + } + res["maximum_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumRunners(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["public_ip_enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicIpEnabled(val) + } + return nil + } + res["public_ips"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePublicIpFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PublicIpable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PublicIpable) + } + } + m.SetPublicIps(res) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionsHostedRunner_status) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ActionsHostedRunner_status)) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the hosted runner. +// returns a *int32 when successful +func (m *ActionsHostedRunner) GetId()(*int32) { + return m.id +} +// GetImageDetails gets the image_details property value. Provides details of a hosted runner image +// returns a NullableActionsHostedRunnerPoolImageable when successful +func (m *ActionsHostedRunner) GetImageDetails()(NullableActionsHostedRunnerPoolImageable) { + return m.image_details +} +// GetLastActiveOn gets the last_active_on property value. The time at which the runner was last used, in ISO 8601 format. +// returns a *Time when successful +func (m *ActionsHostedRunner) GetLastActiveOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.last_active_on +} +// GetMachineSizeDetails gets the machine_size_details property value. Provides details of a particular machine spec. +// returns a ActionsHostedRunnerMachineSpecable when successful +func (m *ActionsHostedRunner) GetMachineSizeDetails()(ActionsHostedRunnerMachineSpecable) { + return m.machine_size_details +} +// GetMaximumRunners gets the maximum_runners property value. The maximum amount of hosted runners. Runners will not scale automatically above this number. Use this setting to limit your cost. +// returns a *int32 when successful +func (m *ActionsHostedRunner) GetMaximumRunners()(*int32) { + return m.maximum_runners +} +// GetName gets the name property value. The name of the hosted runner. +// returns a *string when successful +func (m *ActionsHostedRunner) GetName()(*string) { + return m.name +} +// GetPlatform gets the platform property value. The operating system of the image. +// returns a *string when successful +func (m *ActionsHostedRunner) GetPlatform()(*string) { + return m.platform +} +// GetPublicIpEnabled gets the public_ip_enabled property value. Whether public IP is enabled for the hosted runners. +// returns a *bool when successful +func (m *ActionsHostedRunner) GetPublicIpEnabled()(*bool) { + return m.public_ip_enabled +} +// GetPublicIps gets the public_ips property value. The public IP ranges when public IP is enabled for the hosted runners. +// returns a []PublicIpable when successful +func (m *ActionsHostedRunner) GetPublicIps()([]PublicIpable) { + return m.public_ips +} +// GetRunnerGroupId gets the runner_group_id property value. The unique identifier of the group that the hosted runner belongs to. +// returns a *int32 when successful +func (m *ActionsHostedRunner) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// GetStatus gets the status property value. The status of the runner. +// returns a *ActionsHostedRunner_status when successful +func (m *ActionsHostedRunner) GetStatus()(*ActionsHostedRunner_status) { + return m.status +} +// Serialize serializes information the current object +func (m *ActionsHostedRunner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("image_details", m.GetImageDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("last_active_on", m.GetLastActiveOn()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("machine_size_details", m.GetMachineSizeDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maximum_runners", m.GetMaximumRunners()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("platform", m.GetPlatform()) + if err != nil { + return err + } + } + if m.GetPublicIps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPublicIps())) + for i, v := range m.GetPublicIps() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("public_ips", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("public_ip_enabled", m.GetPublicIpEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + if err != nil { + return err + } + } + 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 *ActionsHostedRunner) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The unique identifier of the hosted runner. +func (m *ActionsHostedRunner) SetId(value *int32)() { + m.id = value +} +// SetImageDetails sets the image_details property value. Provides details of a hosted runner image +func (m *ActionsHostedRunner) SetImageDetails(value NullableActionsHostedRunnerPoolImageable)() { + m.image_details = value +} +// SetLastActiveOn sets the last_active_on property value. The time at which the runner was last used, in ISO 8601 format. +func (m *ActionsHostedRunner) SetLastActiveOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.last_active_on = value +} +// SetMachineSizeDetails sets the machine_size_details property value. Provides details of a particular machine spec. +func (m *ActionsHostedRunner) SetMachineSizeDetails(value ActionsHostedRunnerMachineSpecable)() { + m.machine_size_details = value +} +// SetMaximumRunners sets the maximum_runners property value. The maximum amount of hosted runners. Runners will not scale automatically above this number. Use this setting to limit your cost. +func (m *ActionsHostedRunner) SetMaximumRunners(value *int32)() { + m.maximum_runners = value +} +// SetName sets the name property value. The name of the hosted runner. +func (m *ActionsHostedRunner) SetName(value *string)() { + m.name = value +} +// SetPlatform sets the platform property value. The operating system of the image. +func (m *ActionsHostedRunner) SetPlatform(value *string)() { + m.platform = value +} +// SetPublicIpEnabled sets the public_ip_enabled property value. Whether public IP is enabled for the hosted runners. +func (m *ActionsHostedRunner) SetPublicIpEnabled(value *bool)() { + m.public_ip_enabled = value +} +// SetPublicIps sets the public_ips property value. The public IP ranges when public IP is enabled for the hosted runners. +func (m *ActionsHostedRunner) SetPublicIps(value []PublicIpable)() { + m.public_ips = value +} +// SetRunnerGroupId sets the runner_group_id property value. The unique identifier of the group that the hosted runner belongs to. +func (m *ActionsHostedRunner) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +// SetStatus sets the status property value. The status of the runner. +func (m *ActionsHostedRunner) SetStatus(value *ActionsHostedRunner_status)() { + m.status = value +} +type ActionsHostedRunnerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetImageDetails()(NullableActionsHostedRunnerPoolImageable) + GetLastActiveOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMachineSizeDetails()(ActionsHostedRunnerMachineSpecable) + GetMaximumRunners()(*int32) + GetName()(*string) + GetPlatform()(*string) + GetPublicIpEnabled()(*bool) + GetPublicIps()([]PublicIpable) + GetRunnerGroupId()(*int32) + GetStatus()(*ActionsHostedRunner_status) + SetId(value *int32)() + SetImageDetails(value NullableActionsHostedRunnerPoolImageable)() + SetLastActiveOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMachineSizeDetails(value ActionsHostedRunnerMachineSpecable)() + SetMaximumRunners(value *int32)() + SetName(value *string)() + SetPlatform(value *string)() + SetPublicIpEnabled(value *bool)() + SetPublicIps(value []PublicIpable)() + SetRunnerGroupId(value *int32)() + SetStatus(value *ActionsHostedRunner_status)() +} diff --git a/pkg/github/models/actions_hosted_runner_escaped_status.go b/pkg/github/models/actions_hosted_runner_escaped_status.go new file mode 100644 index 00000000..a2a541b8 --- /dev/null +++ b/pkg/github/models/actions_hosted_runner_escaped_status.go @@ -0,0 +1,43 @@ +package models +// The status of the runner. +type ActionsHostedRunner_status int + +const ( + READY_ACTIONSHOSTEDRUNNER_STATUS ActionsHostedRunner_status = iota + PROVISIONING_ACTIONSHOSTEDRUNNER_STATUS + SHUTDOWN_ACTIONSHOSTEDRUNNER_STATUS + DELETING_ACTIONSHOSTEDRUNNER_STATUS + STUCK_ACTIONSHOSTEDRUNNER_STATUS +) + +func (i ActionsHostedRunner_status) String() string { + return []string{"Ready", "Provisioning", "Shutdown", "Deleting", "Stuck"}[i] +} +func ParseActionsHostedRunner_status(v string) (any, error) { + result := READY_ACTIONSHOSTEDRUNNER_STATUS + switch v { + case "Ready": + result = READY_ACTIONSHOSTEDRUNNER_STATUS + case "Provisioning": + result = PROVISIONING_ACTIONSHOSTEDRUNNER_STATUS + case "Shutdown": + result = SHUTDOWN_ACTIONSHOSTEDRUNNER_STATUS + case "Deleting": + result = DELETING_ACTIONSHOSTEDRUNNER_STATUS + case "Stuck": + result = STUCK_ACTIONSHOSTEDRUNNER_STATUS + default: + return nil, nil + } + return &result, nil +} +func SerializeActionsHostedRunner_status(values []ActionsHostedRunner_status) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ActionsHostedRunner_status) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/actions_hosted_runner_image.go b/pkg/github/models/actions_hosted_runner_image.go new file mode 100644 index 00000000..53cbd72e --- /dev/null +++ b/pkg/github/models/actions_hosted_runner_image.go @@ -0,0 +1,198 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsHostedRunnerImage provides details of a hosted runner image +type ActionsHostedRunnerImage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Display name for this image. + display_name *string + // The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. + id *string + // The operating system of the image. + platform *string + // Image size in GB. + size_gb *int32 + // The image provider. + source *ActionsHostedRunnerImage_source +} +// NewActionsHostedRunnerImage instantiates a new ActionsHostedRunnerImage and sets the default values. +func NewActionsHostedRunnerImage()(*ActionsHostedRunnerImage) { + m := &ActionsHostedRunnerImage{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsHostedRunnerImageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsHostedRunnerImageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsHostedRunnerImage(), 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 *ActionsHostedRunnerImage) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the display_name property value. Display name for this image. +// returns a *string when successful +func (m *ActionsHostedRunnerImage) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsHostedRunnerImage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["size_gb"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeGb(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionsHostedRunnerImage_source) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*ActionsHostedRunnerImage_source)) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. +// returns a *string when successful +func (m *ActionsHostedRunnerImage) GetId()(*string) { + return m.id +} +// GetPlatform gets the platform property value. The operating system of the image. +// returns a *string when successful +func (m *ActionsHostedRunnerImage) GetPlatform()(*string) { + return m.platform +} +// GetSizeGb gets the size_gb property value. Image size in GB. +// returns a *int32 when successful +func (m *ActionsHostedRunnerImage) GetSizeGb()(*int32) { + return m.size_gb +} +// GetSource gets the source property value. The image provider. +// returns a *ActionsHostedRunnerImage_source when successful +func (m *ActionsHostedRunnerImage) GetSource()(*ActionsHostedRunnerImage_source) { + return m.source +} +// Serialize serializes information the current object +func (m *ActionsHostedRunnerImage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("platform", m.GetPlatform()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size_gb", m.GetSizeGb()) + if err != nil { + return err + } + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err := writer.WriteStringValue("source", &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 *ActionsHostedRunnerImage) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the display_name property value. Display name for this image. +func (m *ActionsHostedRunnerImage) SetDisplayName(value *string)() { + m.display_name = value +} +// SetId sets the id property value. The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. +func (m *ActionsHostedRunnerImage) SetId(value *string)() { + m.id = value +} +// SetPlatform sets the platform property value. The operating system of the image. +func (m *ActionsHostedRunnerImage) SetPlatform(value *string)() { + m.platform = value +} +// SetSizeGb sets the size_gb property value. Image size in GB. +func (m *ActionsHostedRunnerImage) SetSizeGb(value *int32)() { + m.size_gb = value +} +// SetSource sets the source property value. The image provider. +func (m *ActionsHostedRunnerImage) SetSource(value *ActionsHostedRunnerImage_source)() { + m.source = value +} +type ActionsHostedRunnerImageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetId()(*string) + GetPlatform()(*string) + GetSizeGb()(*int32) + GetSource()(*ActionsHostedRunnerImage_source) + SetDisplayName(value *string)() + SetId(value *string)() + SetPlatform(value *string)() + SetSizeGb(value *int32)() + SetSource(value *ActionsHostedRunnerImage_source)() +} diff --git a/pkg/github/models/actions_hosted_runner_image_escaped_source.go b/pkg/github/models/actions_hosted_runner_image_escaped_source.go new file mode 100644 index 00000000..5e71ce48 --- /dev/null +++ b/pkg/github/models/actions_hosted_runner_image_escaped_source.go @@ -0,0 +1,37 @@ +package models +// The image provider. +type ActionsHostedRunnerImage_source int + +const ( + GITHUB_ACTIONSHOSTEDRUNNERIMAGE_SOURCE ActionsHostedRunnerImage_source = iota + PARTNER_ACTIONSHOSTEDRUNNERIMAGE_SOURCE + CUSTOM_ACTIONSHOSTEDRUNNERIMAGE_SOURCE +) + +func (i ActionsHostedRunnerImage_source) String() string { + return []string{"github", "partner", "custom"}[i] +} +func ParseActionsHostedRunnerImage_source(v string) (any, error) { + result := GITHUB_ACTIONSHOSTEDRUNNERIMAGE_SOURCE + switch v { + case "github": + result = GITHUB_ACTIONSHOSTEDRUNNERIMAGE_SOURCE + case "partner": + result = PARTNER_ACTIONSHOSTEDRUNNERIMAGE_SOURCE + case "custom": + result = CUSTOM_ACTIONSHOSTEDRUNNERIMAGE_SOURCE + default: + return nil, nil + } + return &result, nil +} +func SerializeActionsHostedRunnerImage_source(values []ActionsHostedRunnerImage_source) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ActionsHostedRunnerImage_source) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/actions_hosted_runner_limits.go b/pkg/github/models/actions_hosted_runner_limits.go new file mode 100644 index 00000000..41f62b92 --- /dev/null +++ b/pkg/github/models/actions_hosted_runner_limits.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ActionsHostedRunnerLimits struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Provides details of static public IP limits for GitHub-hosted Hosted Runners + public_ips ActionsHostedRunnerLimits_public_ipsable +} +// NewActionsHostedRunnerLimits instantiates a new ActionsHostedRunnerLimits and sets the default values. +func NewActionsHostedRunnerLimits()(*ActionsHostedRunnerLimits) { + m := &ActionsHostedRunnerLimits{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsHostedRunnerLimitsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsHostedRunnerLimitsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsHostedRunnerLimits(), 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 *ActionsHostedRunnerLimits) 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 *ActionsHostedRunnerLimits) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["public_ips"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActionsHostedRunnerLimits_public_ipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublicIps(val.(ActionsHostedRunnerLimits_public_ipsable)) + } + return nil + } + return res +} +// GetPublicIps gets the public_ips property value. Provides details of static public IP limits for GitHub-hosted Hosted Runners +// returns a ActionsHostedRunnerLimits_public_ipsable when successful +func (m *ActionsHostedRunnerLimits) GetPublicIps()(ActionsHostedRunnerLimits_public_ipsable) { + return m.public_ips +} +// Serialize serializes information the current object +func (m *ActionsHostedRunnerLimits) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("public_ips", m.GetPublicIps()) + 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 *ActionsHostedRunnerLimits) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPublicIps sets the public_ips property value. Provides details of static public IP limits for GitHub-hosted Hosted Runners +func (m *ActionsHostedRunnerLimits) SetPublicIps(value ActionsHostedRunnerLimits_public_ipsable)() { + m.public_ips = value +} +type ActionsHostedRunnerLimitsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPublicIps()(ActionsHostedRunnerLimits_public_ipsable) + SetPublicIps(value ActionsHostedRunnerLimits_public_ipsable)() +} diff --git a/pkg/github/models/actions_hosted_runner_limits_escaped_public_escaped_ips.go b/pkg/github/models/actions_hosted_runner_limits_escaped_public_escaped_ips.go new file mode 100644 index 00000000..65da3b86 --- /dev/null +++ b/pkg/github/models/actions_hosted_runner_limits_escaped_public_escaped_ips.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsHostedRunnerLimits_public_ips provides details of static public IP limits for GitHub-hosted Hosted Runners +type ActionsHostedRunnerLimits_public_ips 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 current number of static public IP addresses in use by Hosted Runners. + current_usage *int32 + // The maximum number of static public IP addresses that can be used for Hosted Runners. + maximum *int32 +} +// NewActionsHostedRunnerLimits_public_ips instantiates a new ActionsHostedRunnerLimits_public_ips and sets the default values. +func NewActionsHostedRunnerLimits_public_ips()(*ActionsHostedRunnerLimits_public_ips) { + m := &ActionsHostedRunnerLimits_public_ips{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsHostedRunnerLimits_public_ipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsHostedRunnerLimits_public_ipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsHostedRunnerLimits_public_ips(), 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 *ActionsHostedRunnerLimits_public_ips) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCurrentUsage gets the current_usage property value. The current number of static public IP addresses in use by Hosted Runners. +// returns a *int32 when successful +func (m *ActionsHostedRunnerLimits_public_ips) GetCurrentUsage()(*int32) { + return m.current_usage +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsHostedRunnerLimits_public_ips) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["current_usage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCurrentUsage(val) + } + return nil + } + res["maximum"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximum(val) + } + return nil + } + return res +} +// GetMaximum gets the maximum property value. The maximum number of static public IP addresses that can be used for Hosted Runners. +// returns a *int32 when successful +func (m *ActionsHostedRunnerLimits_public_ips) GetMaximum()(*int32) { + return m.maximum +} +// Serialize serializes information the current object +func (m *ActionsHostedRunnerLimits_public_ips) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("current_usage", m.GetCurrentUsage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maximum", m.GetMaximum()) + 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 *ActionsHostedRunnerLimits_public_ips) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCurrentUsage sets the current_usage property value. The current number of static public IP addresses in use by Hosted Runners. +func (m *ActionsHostedRunnerLimits_public_ips) SetCurrentUsage(value *int32)() { + m.current_usage = value +} +// SetMaximum sets the maximum property value. The maximum number of static public IP addresses that can be used for Hosted Runners. +func (m *ActionsHostedRunnerLimits_public_ips) SetMaximum(value *int32)() { + m.maximum = value +} +type ActionsHostedRunnerLimits_public_ipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentUsage()(*int32) + GetMaximum()(*int32) + SetCurrentUsage(value *int32)() + SetMaximum(value *int32)() +} diff --git a/pkg/github/models/actions_hosted_runner_machine_spec.go b/pkg/github/models/actions_hosted_runner_machine_spec.go new file mode 100644 index 00000000..4487023b --- /dev/null +++ b/pkg/github/models/actions_hosted_runner_machine_spec.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionsHostedRunnerMachineSpec provides details of a particular machine spec. +type ActionsHostedRunnerMachineSpec 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 number of cores. + cpu_cores *int32 + // The ID used for the `size` parameter when creating a new runner. + id *string + // The available RAM for the machine spec. + memory_gb *int32 + // The available SSD storage for the machine spec. + storage_gb *int32 +} +// NewActionsHostedRunnerMachineSpec instantiates a new ActionsHostedRunnerMachineSpec and sets the default values. +func NewActionsHostedRunnerMachineSpec()(*ActionsHostedRunnerMachineSpec) { + m := &ActionsHostedRunnerMachineSpec{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActionsHostedRunnerMachineSpecFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActionsHostedRunnerMachineSpecFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionsHostedRunnerMachineSpec(), 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 *ActionsHostedRunnerMachineSpec) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCpuCores gets the cpu_cores property value. The number of cores. +// returns a *int32 when successful +func (m *ActionsHostedRunnerMachineSpec) GetCpuCores()(*int32) { + return m.cpu_cores +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActionsHostedRunnerMachineSpec) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cpu_cores"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCpuCores(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["memory_gb"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMemoryGb(val) + } + return nil + } + res["storage_gb"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStorageGb(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID used for the `size` parameter when creating a new runner. +// returns a *string when successful +func (m *ActionsHostedRunnerMachineSpec) GetId()(*string) { + return m.id +} +// GetMemoryGb gets the memory_gb property value. The available RAM for the machine spec. +// returns a *int32 when successful +func (m *ActionsHostedRunnerMachineSpec) GetMemoryGb()(*int32) { + return m.memory_gb +} +// GetStorageGb gets the storage_gb property value. The available SSD storage for the machine spec. +// returns a *int32 when successful +func (m *ActionsHostedRunnerMachineSpec) GetStorageGb()(*int32) { + return m.storage_gb +} +// Serialize serializes information the current object +func (m *ActionsHostedRunnerMachineSpec) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("cpu_cores", m.GetCpuCores()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("memory_gb", m.GetMemoryGb()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("storage_gb", m.GetStorageGb()) + 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 *ActionsHostedRunnerMachineSpec) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCpuCores sets the cpu_cores property value. The number of cores. +func (m *ActionsHostedRunnerMachineSpec) SetCpuCores(value *int32)() { + m.cpu_cores = value +} +// SetId sets the id property value. The ID used for the `size` parameter when creating a new runner. +func (m *ActionsHostedRunnerMachineSpec) SetId(value *string)() { + m.id = value +} +// SetMemoryGb sets the memory_gb property value. The available RAM for the machine spec. +func (m *ActionsHostedRunnerMachineSpec) SetMemoryGb(value *int32)() { + m.memory_gb = value +} +// SetStorageGb sets the storage_gb property value. The available SSD storage for the machine spec. +func (m *ActionsHostedRunnerMachineSpec) SetStorageGb(value *int32)() { + m.storage_gb = value +} +type ActionsHostedRunnerMachineSpecable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCpuCores()(*int32) + GetId()(*string) + GetMemoryGb()(*int32) + GetStorageGb()(*int32) + SetCpuCores(value *int32)() + SetId(value *string)() + SetMemoryGb(value *int32)() + SetStorageGb(value *int32)() +} diff --git a/pkg/github/models/integration.go b/pkg/github/models/integration.go index 414a294d..ebf169b1 100644 --- a/pkg/github/models/integration.go +++ b/pkg/github/models/integration.go @@ -31,8 +31,8 @@ type Integration struct { name *string // The node_id property node_id *string - // A GitHub user. - owner NullableSimpleUserable + // The owner property + owner Integration_Integration_ownerable // The pem property pem *string // The set of permissions for the GitHub app @@ -44,6 +44,89 @@ type Integration struct { // The webhook_secret property webhook_secret *string } +// Integration_Integration_owner composed type wrapper for classes Enterpriseable, SimpleUserable +type Integration_Integration_owner struct { + // Composed type representation for type Enterpriseable + enterprise Enterpriseable + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable +} +// NewIntegration_Integration_owner instantiates a new Integration_Integration_owner and sets the default values. +func NewIntegration_Integration_owner()(*Integration_Integration_owner) { + m := &Integration_Integration_owner{ + } + return m +} +// CreateIntegration_Integration_ownerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIntegration_Integration_ownerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewIntegration_Integration_owner() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetEnterprise gets the enterprise property value. Composed type representation for type Enterpriseable +// returns a Enterpriseable when successful +func (m *Integration_Integration_owner) GetEnterprise()(Enterpriseable) { + return m.enterprise +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Integration_Integration_owner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *Integration_Integration_owner) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *Integration_Integration_owner) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// Serialize serializes information the current object +func (m *Integration_Integration_owner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnterprise() != nil { + err := writer.WriteObjectValue("", m.GetEnterprise()) + if err != nil { + return err + } + } else if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } + return nil +} +// SetEnterprise sets the enterprise property value. Composed type representation for type Enterpriseable +func (m *Integration_Integration_owner) SetEnterprise(value Enterpriseable)() { + m.enterprise = value +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *Integration_Integration_owner) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +type Integration_Integration_ownerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnterprise()(Enterpriseable) + GetSimpleUser()(SimpleUserable) + SetEnterprise(value Enterpriseable)() + SetSimpleUser(value SimpleUserable)() +} // NewIntegration instantiates a new Integration and sets the default values. func NewIntegration()(*Integration) { m := &Integration{ @@ -212,12 +295,12 @@ func (m *Integration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 return nil } res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateIntegration_Integration_ownerFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetOwner(val.(NullableSimpleUserable)) + m.SetOwner(val.(Integration_Integration_ownerable)) } return nil } @@ -298,9 +381,9 @@ func (m *Integration) GetName()(*string) { func (m *Integration) GetNodeId()(*string) { return m.node_id } -// GetOwner gets the owner property value. A GitHub user. -// returns a NullableSimpleUserable when successful -func (m *Integration) GetOwner()(NullableSimpleUserable) { +// GetOwner gets the owner property value. The owner property +// returns a Integration_Integration_ownerable when successful +func (m *Integration) GetOwner()(Integration_Integration_ownerable) { return m.owner } // GetPem gets the pem property value. The pem property @@ -488,8 +571,8 @@ func (m *Integration) SetName(value *string)() { func (m *Integration) SetNodeId(value *string)() { m.node_id = value } -// SetOwner sets the owner property value. A GitHub user. -func (m *Integration) SetOwner(value NullableSimpleUserable)() { +// SetOwner sets the owner property value. The owner property +func (m *Integration) SetOwner(value Integration_Integration_ownerable)() { m.owner = value } // SetPem sets the pem property value. The pem property @@ -526,7 +609,7 @@ type Integrationable interface { GetInstallationsCount()(*int32) GetName()(*string) GetNodeId()(*string) - GetOwner()(NullableSimpleUserable) + GetOwner()(Integration_Integration_ownerable) GetPem()(*string) GetPermissions()(Integration_permissionsable) GetSlug()(*string) @@ -543,7 +626,7 @@ type Integrationable interface { SetInstallationsCount(value *int32)() SetName(value *string)() SetNodeId(value *string)() - SetOwner(value NullableSimpleUserable)() + SetOwner(value Integration_Integration_ownerable)() SetPem(value *string)() SetPermissions(value Integration_permissionsable)() SetSlug(value *string)() diff --git a/pkg/github/models/nullable_actions_hosted_runner_pool_image.go b/pkg/github/models/nullable_actions_hosted_runner_pool_image.go new file mode 100644 index 00000000..ee23157e --- /dev/null +++ b/pkg/github/models/nullable_actions_hosted_runner_pool_image.go @@ -0,0 +1,198 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableActionsHostedRunnerPoolImage provides details of a hosted runner image +type NullableActionsHostedRunnerPoolImage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Display name for this image. + display_name *string + // The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. + id *string + // Image size in GB. + size_gb *int32 + // The image provider. + source *NullableActionsHostedRunnerPoolImage_source + // The image version of the hosted runner pool. + version *string +} +// NewNullableActionsHostedRunnerPoolImage instantiates a new NullableActionsHostedRunnerPoolImage and sets the default values. +func NewNullableActionsHostedRunnerPoolImage()(*NullableActionsHostedRunnerPoolImage) { + m := &NullableActionsHostedRunnerPoolImage{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableActionsHostedRunnerPoolImageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableActionsHostedRunnerPoolImageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableActionsHostedRunnerPoolImage(), 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 *NullableActionsHostedRunnerPoolImage) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDisplayName gets the display_name property value. Display name for this image. +// returns a *string when successful +func (m *NullableActionsHostedRunnerPoolImage) GetDisplayName()(*string) { + return m.display_name +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableActionsHostedRunnerPoolImage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["display_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["size_gb"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeGb(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNullableActionsHostedRunnerPoolImage_source) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*NullableActionsHostedRunnerPoolImage_source)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. +// returns a *string when successful +func (m *NullableActionsHostedRunnerPoolImage) GetId()(*string) { + return m.id +} +// GetSizeGb gets the size_gb property value. Image size in GB. +// returns a *int32 when successful +func (m *NullableActionsHostedRunnerPoolImage) GetSizeGb()(*int32) { + return m.size_gb +} +// GetSource gets the source property value. The image provider. +// returns a *NullableActionsHostedRunnerPoolImage_source when successful +func (m *NullableActionsHostedRunnerPoolImage) GetSource()(*NullableActionsHostedRunnerPoolImage_source) { + return m.source +} +// GetVersion gets the version property value. The image version of the hosted runner pool. +// returns a *string when successful +func (m *NullableActionsHostedRunnerPoolImage) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *NullableActionsHostedRunnerPoolImage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("display_name", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size_gb", m.GetSizeGb()) + if err != nil { + return err + } + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err := writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *NullableActionsHostedRunnerPoolImage) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDisplayName sets the display_name property value. Display name for this image. +func (m *NullableActionsHostedRunnerPoolImage) SetDisplayName(value *string)() { + m.display_name = value +} +// SetId sets the id property value. The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. +func (m *NullableActionsHostedRunnerPoolImage) SetId(value *string)() { + m.id = value +} +// SetSizeGb sets the size_gb property value. Image size in GB. +func (m *NullableActionsHostedRunnerPoolImage) SetSizeGb(value *int32)() { + m.size_gb = value +} +// SetSource sets the source property value. The image provider. +func (m *NullableActionsHostedRunnerPoolImage) SetSource(value *NullableActionsHostedRunnerPoolImage_source)() { + m.source = value +} +// SetVersion sets the version property value. The image version of the hosted runner pool. +func (m *NullableActionsHostedRunnerPoolImage) SetVersion(value *string)() { + m.version = value +} +type NullableActionsHostedRunnerPoolImageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetId()(*string) + GetSizeGb()(*int32) + GetSource()(*NullableActionsHostedRunnerPoolImage_source) + GetVersion()(*string) + SetDisplayName(value *string)() + SetId(value *string)() + SetSizeGb(value *int32)() + SetSource(value *NullableActionsHostedRunnerPoolImage_source)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/nullable_actions_hosted_runner_pool_image_escaped_source.go b/pkg/github/models/nullable_actions_hosted_runner_pool_image_escaped_source.go new file mode 100644 index 00000000..c5ebbc3c --- /dev/null +++ b/pkg/github/models/nullable_actions_hosted_runner_pool_image_escaped_source.go @@ -0,0 +1,37 @@ +package models +// The image provider. +type NullableActionsHostedRunnerPoolImage_source int + +const ( + GITHUB_NULLABLEACTIONSHOSTEDRUNNERPOOLIMAGE_SOURCE NullableActionsHostedRunnerPoolImage_source = iota + PARTNER_NULLABLEACTIONSHOSTEDRUNNERPOOLIMAGE_SOURCE + CUSTOM_NULLABLEACTIONSHOSTEDRUNNERPOOLIMAGE_SOURCE +) + +func (i NullableActionsHostedRunnerPoolImage_source) String() string { + return []string{"github", "partner", "custom"}[i] +} +func ParseNullableActionsHostedRunnerPoolImage_source(v string) (any, error) { + result := GITHUB_NULLABLEACTIONSHOSTEDRUNNERPOOLIMAGE_SOURCE + switch v { + case "github": + result = GITHUB_NULLABLEACTIONSHOSTEDRUNNERPOOLIMAGE_SOURCE + case "partner": + result = PARTNER_NULLABLEACTIONSHOSTEDRUNNERPOOLIMAGE_SOURCE + case "custom": + result = CUSTOM_NULLABLEACTIONSHOSTEDRUNNERPOOLIMAGE_SOURCE + default: + return nil, nil + } + return &result, nil +} +func SerializeNullableActionsHostedRunnerPoolImage_source(values []NullableActionsHostedRunnerPoolImage_source) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NullableActionsHostedRunnerPoolImage_source) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/nullable_integration.go b/pkg/github/models/nullable_integration.go index 8cc0ccf5..26be26c7 100644 --- a/pkg/github/models/nullable_integration.go +++ b/pkg/github/models/nullable_integration.go @@ -31,8 +31,8 @@ type NullableIntegration struct { name *string // The node_id property node_id *string - // A GitHub user. - owner NullableSimpleUserable + // The owner property + owner NullableIntegration_NullableIntegration_ownerable // The pem property pem *string // The set of permissions for the GitHub app @@ -44,6 +44,89 @@ type NullableIntegration struct { // The webhook_secret property webhook_secret *string } +// NullableIntegration_NullableIntegration_owner composed type wrapper for classes Enterpriseable, SimpleUserable +type NullableIntegration_NullableIntegration_owner struct { + // Composed type representation for type Enterpriseable + enterprise Enterpriseable + // Composed type representation for type SimpleUserable + simpleUser SimpleUserable +} +// NewNullableIntegration_NullableIntegration_owner instantiates a new NullableIntegration_NullableIntegration_owner and sets the default values. +func NewNullableIntegration_NullableIntegration_owner()(*NullableIntegration_NullableIntegration_owner) { + m := &NullableIntegration_NullableIntegration_owner{ + } + return m +} +// CreateNullableIntegration_NullableIntegration_ownerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableIntegration_NullableIntegration_ownerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewNullableIntegration_NullableIntegration_owner() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetEnterprise gets the enterprise property value. Composed type representation for type Enterpriseable +// returns a Enterpriseable when successful +func (m *NullableIntegration_NullableIntegration_owner) GetEnterprise()(Enterpriseable) { + return m.enterprise +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableIntegration_NullableIntegration_owner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *NullableIntegration_NullableIntegration_owner) GetIsComposedType()(bool) { + return true +} +// GetSimpleUser gets the simpleUser property value. Composed type representation for type SimpleUserable +// returns a SimpleUserable when successful +func (m *NullableIntegration_NullableIntegration_owner) GetSimpleUser()(SimpleUserable) { + return m.simpleUser +} +// Serialize serializes information the current object +func (m *NullableIntegration_NullableIntegration_owner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnterprise() != nil { + err := writer.WriteObjectValue("", m.GetEnterprise()) + if err != nil { + return err + } + } else if m.GetSimpleUser() != nil { + err := writer.WriteObjectValue("", m.GetSimpleUser()) + if err != nil { + return err + } + } + return nil +} +// SetEnterprise sets the enterprise property value. Composed type representation for type Enterpriseable +func (m *NullableIntegration_NullableIntegration_owner) SetEnterprise(value Enterpriseable)() { + m.enterprise = value +} +// SetSimpleUser sets the simpleUser property value. Composed type representation for type SimpleUserable +func (m *NullableIntegration_NullableIntegration_owner) SetSimpleUser(value SimpleUserable)() { + m.simpleUser = value +} +type NullableIntegration_NullableIntegration_ownerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnterprise()(Enterpriseable) + GetSimpleUser()(SimpleUserable) + SetEnterprise(value Enterpriseable)() + SetSimpleUser(value SimpleUserable)() +} // NewNullableIntegration instantiates a new NullableIntegration and sets the default values. func NewNullableIntegration()(*NullableIntegration) { m := &NullableIntegration{ @@ -212,12 +295,12 @@ func (m *NullableIntegration) GetFieldDeserializers()(map[string]func(i878a80d23 return nil } res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateNullableIntegration_NullableIntegration_ownerFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetOwner(val.(NullableSimpleUserable)) + m.SetOwner(val.(NullableIntegration_NullableIntegration_ownerable)) } return nil } @@ -298,9 +381,9 @@ func (m *NullableIntegration) GetName()(*string) { func (m *NullableIntegration) GetNodeId()(*string) { return m.node_id } -// GetOwner gets the owner property value. A GitHub user. -// returns a NullableSimpleUserable when successful -func (m *NullableIntegration) GetOwner()(NullableSimpleUserable) { +// GetOwner gets the owner property value. The owner property +// returns a NullableIntegration_NullableIntegration_ownerable when successful +func (m *NullableIntegration) GetOwner()(NullableIntegration_NullableIntegration_ownerable) { return m.owner } // GetPem gets the pem property value. The pem property @@ -488,8 +571,8 @@ func (m *NullableIntegration) SetName(value *string)() { func (m *NullableIntegration) SetNodeId(value *string)() { m.node_id = value } -// SetOwner sets the owner property value. A GitHub user. -func (m *NullableIntegration) SetOwner(value NullableSimpleUserable)() { +// SetOwner sets the owner property value. The owner property +func (m *NullableIntegration) SetOwner(value NullableIntegration_NullableIntegration_ownerable)() { m.owner = value } // SetPem sets the pem property value. The pem property @@ -526,7 +609,7 @@ type NullableIntegrationable interface { GetInstallationsCount()(*int32) GetName()(*string) GetNodeId()(*string) - GetOwner()(NullableSimpleUserable) + GetOwner()(NullableIntegration_NullableIntegration_ownerable) GetPem()(*string) GetPermissions()(NullableIntegration_permissionsable) GetSlug()(*string) @@ -543,7 +626,7 @@ type NullableIntegrationable interface { SetInstallationsCount(value *int32)() SetName(value *string)() SetNodeId(value *string)() - SetOwner(value NullableSimpleUserable)() + SetOwner(value NullableIntegration_NullableIntegration_ownerable)() SetPem(value *string)() SetPermissions(value NullableIntegration_permissionsable)() SetSlug(value *string)() diff --git a/pkg/github/models/public_ip.go b/pkg/github/models/public_ip.go new file mode 100644 index 00000000..7e25b2b7 --- /dev/null +++ b/pkg/github/models/public_ip.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicIp provides details of Public IP for a GitHub-hosted larger runners +type PublicIp 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 public IP is enabled. + enabled *bool + // The length of the IP prefix. + length *int32 + // The prefix for the public IP. + prefix *string +} +// NewPublicIp instantiates a new PublicIp and sets the default values. +func NewPublicIp()(*PublicIp) { + m := &PublicIp{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePublicIpFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePublicIpFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicIp(), 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 *PublicIp) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnabled gets the enabled property value. Whether public IP is enabled. +// returns a *bool when successful +func (m *PublicIp) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PublicIp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLength(val) + } + return nil + } + res["prefix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrefix(val) + } + return nil + } + return res +} +// GetLength gets the length property value. The length of the IP prefix. +// returns a *int32 when successful +func (m *PublicIp) GetLength()(*int32) { + return m.length +} +// GetPrefix gets the prefix property value. The prefix for the public IP. +// returns a *string when successful +func (m *PublicIp) GetPrefix()(*string) { + return m.prefix +} +// Serialize serializes information the current object +func (m *PublicIp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("length", m.GetLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("prefix", m.GetPrefix()) + 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 *PublicIp) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. Whether public IP is enabled. +func (m *PublicIp) SetEnabled(value *bool)() { + m.enabled = value +} +// SetLength sets the length property value. The length of the IP prefix. +func (m *PublicIp) SetLength(value *int32)() { + m.length = value +} +// SetPrefix sets the prefix property value. The prefix for the public IP. +func (m *PublicIp) SetPrefix(value *string)() { + m.prefix = value +} +type PublicIpable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetLength()(*int32) + GetPrefix()(*string) + SetEnabled(value *bool)() + SetLength(value *int32)() + SetPrefix(value *string)() +} diff --git a/pkg/github/models/runner_groups_org.go b/pkg/github/models/runner_groups_org.go index 1d7e9508..0f4bd532 100644 --- a/pkg/github/models/runner_groups_org.go +++ b/pkg/github/models/runner_groups_org.go @@ -21,6 +21,8 @@ type RunnerGroupsOrg struct { inherited_allows_public_repositories *bool // The name property name *string + // The identifier of a hosted compute network configuration. + network_configuration_id *string // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. restricted_to_workflows *bool // The runners_url property @@ -135,6 +137,16 @@ func (m *RunnerGroupsOrg) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return nil } + res["network_configuration_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkConfigurationId(val) + } + return nil + } res["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -228,6 +240,11 @@ func (m *RunnerGroupsOrg) GetInheritedAllowsPublicRepositories()(*bool) { func (m *RunnerGroupsOrg) GetName()(*string) { return m.name } +// GetNetworkConfigurationId gets the network_configuration_id property value. The identifier of a hosted compute network configuration. +// returns a *string when successful +func (m *RunnerGroupsOrg) GetNetworkConfigurationId()(*string) { + return m.network_configuration_id +} // GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. // returns a *bool when successful func (m *RunnerGroupsOrg) GetRestrictedToWorkflows()(*bool) { @@ -302,6 +319,12 @@ func (m *RunnerGroupsOrg) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 return err } } + { + err := writer.WriteStringValue("network_configuration_id", m.GetNetworkConfigurationId()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) if err != nil { @@ -378,6 +401,10 @@ func (m *RunnerGroupsOrg) SetInheritedAllowsPublicRepositories(value *bool)() { func (m *RunnerGroupsOrg) SetName(value *string)() { m.name = value } +// SetNetworkConfigurationId sets the network_configuration_id property value. The identifier of a hosted compute network configuration. +func (m *RunnerGroupsOrg) SetNetworkConfigurationId(value *string)() { + m.network_configuration_id = value +} // SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. func (m *RunnerGroupsOrg) SetRestrictedToWorkflows(value *bool)() { m.restricted_to_workflows = value @@ -412,6 +439,7 @@ type RunnerGroupsOrgable interface { GetInherited()(*bool) GetInheritedAllowsPublicRepositories()(*bool) GetName()(*string) + GetNetworkConfigurationId()(*string) GetRestrictedToWorkflows()(*bool) GetRunnersUrl()(*string) GetSelectedRepositoriesUrl()(*string) @@ -425,6 +453,7 @@ type RunnerGroupsOrgable interface { SetInherited(value *bool)() SetInheritedAllowsPublicRepositories(value *bool)() SetName(value *string)() + SetNetworkConfigurationId(value *string)() SetRestrictedToWorkflows(value *bool)() SetRunnersUrl(value *string)() SetSelectedRepositoriesUrl(value *string)() diff --git a/pkg/github/orgs/item/actions/hostedrunners/hosted_runners_post_request_body_escaped_image_escaped_source.go b/pkg/github/orgs/item/actions/hostedrunners/hosted_runners_post_request_body_escaped_image_escaped_source.go new file mode 100644 index 00000000..38dff71a --- /dev/null +++ b/pkg/github/orgs/item/actions/hostedrunners/hosted_runners_post_request_body_escaped_image_escaped_source.go @@ -0,0 +1,37 @@ +package hostedrunners +// The source of the runner image. +type HostedRunnersPostRequestBody_image_source int + +const ( + GITHUB_HOSTEDRUNNERSPOSTREQUESTBODY_IMAGE_SOURCE HostedRunnersPostRequestBody_image_source = iota + PARTNER_HOSTEDRUNNERSPOSTREQUESTBODY_IMAGE_SOURCE + CUSTOM_HOSTEDRUNNERSPOSTREQUESTBODY_IMAGE_SOURCE +) + +func (i HostedRunnersPostRequestBody_image_source) String() string { + return []string{"github", "partner", "custom"}[i] +} +func ParseHostedRunnersPostRequestBody_image_source(v string) (any, error) { + result := GITHUB_HOSTEDRUNNERSPOSTREQUESTBODY_IMAGE_SOURCE + switch v { + case "github": + result = GITHUB_HOSTEDRUNNERSPOSTREQUESTBODY_IMAGE_SOURCE + case "partner": + result = PARTNER_HOSTEDRUNNERSPOSTREQUESTBODY_IMAGE_SOURCE + case "custom": + result = CUSTOM_HOSTEDRUNNERSPOSTREQUESTBODY_IMAGE_SOURCE + default: + return nil, nil + } + return &result, nil +} +func SerializeHostedRunnersPostRequestBody_image_source(values []HostedRunnersPostRequestBody_image_source) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i HostedRunnersPostRequestBody_image_source) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_get_response.go b/pkg/github/orgs/item_actions_hosted_runners_get_response.go new file mode 100644 index 00000000..f2a7a344 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemActionsHostedRunnersGetResponse 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 runners property + runners []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable + // The total_count property + total_count *int32 +} +// NewItemActionsHostedRunnersGetResponse instantiates a new ItemActionsHostedRunnersGetResponse and sets the default values. +func NewItemActionsHostedRunnersGetResponse()(*ItemActionsHostedRunnersGetResponse) { + m := &ItemActionsHostedRunnersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersGetResponse(), 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 *ItemActionsHostedRunnersGetResponse) 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 *ItemActionsHostedRunnersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable) + } + } + m.SetRunners(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunners gets the runners property value. The runners property +// returns a []ActionsHostedRunnerable when successful +func (m *ItemActionsHostedRunnersGetResponse) GetRunners()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable) { + return m.runners +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunners())) + for i, v := range m.GetRunners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runners", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsHostedRunnersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. The runners property +func (m *ItemActionsHostedRunnersGetResponse) SetRunners(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable)() { + m.runners = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsHostedRunnersGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsHostedRunnersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable) + GetTotalCount()(*int32) + SetRunners(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_images_github_owned_get_response.go b/pkg/github/orgs/item_actions_hosted_runners_images_github_owned_get_response.go new file mode 100644 index 00000000..296712af --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_images_github_owned_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemActionsHostedRunnersImagesGithubOwnedGetResponse 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 images property + images []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable + // The total_count property + total_count *int32 +} +// NewItemActionsHostedRunnersImagesGithubOwnedGetResponse instantiates a new ItemActionsHostedRunnersImagesGithubOwnedGetResponse and sets the default values. +func NewItemActionsHostedRunnersImagesGithubOwnedGetResponse()(*ItemActionsHostedRunnersImagesGithubOwnedGetResponse) { + m := &ItemActionsHostedRunnersImagesGithubOwnedGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersImagesGithubOwnedGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersImagesGithubOwnedGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersImagesGithubOwnedGetResponse(), 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 *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) 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 *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["images"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerImageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable) + } + } + m.SetImages(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetImages gets the images property value. The images property +// returns a []ActionsHostedRunnerImageable when successful +func (m *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) GetImages()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable) { + return m.images +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetImages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImages())) + for i, v := range m.GetImages() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("images", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetImages sets the images property value. The images property +func (m *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) SetImages(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable)() { + m.images = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsHostedRunnersImagesGithubOwnedGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsHostedRunnersImagesGithubOwnedGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetImages()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable) + GetTotalCount()(*int32) + SetImages(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_images_github_owned_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_images_github_owned_request_builder.go new file mode 100644 index 00000000..e1863b73 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_images_github_owned_request_builder.go @@ -0,0 +1,56 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\images\github-owned +type ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsHostedRunnersImagesGithubOwnedRequestBuilderInternal instantiates a new ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersImagesGithubOwnedRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder) { + m := &ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images/github-owned", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersImagesGithubOwnedRequestBuilder instantiates a new ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersImagesGithubOwnedRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersImagesGithubOwnedRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the list of GitHub-owned images available for GitHub-hosted runners for an organization. +// returns a ItemActionsHostedRunnersImagesGithubOwnedGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#get-github-owned-images-for-github-hosted-runners-in-an-organization +func (m *ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsHostedRunnersImagesGithubOwnedGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsHostedRunnersImagesGithubOwnedGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsHostedRunnersImagesGithubOwnedGetResponseable), nil +} +// ToGetRequestInformation get the list of GitHub-owned images available for GitHub-hosted runners for an organization. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder when successful +func (m *ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder) WithUrl(rawUrl string)(*ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder) { + return NewItemActionsHostedRunnersImagesGithubOwnedRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_images_partner_get_response.go b/pkg/github/orgs/item_actions_hosted_runners_images_partner_get_response.go new file mode 100644 index 00000000..1dc8ecc7 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_images_partner_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemActionsHostedRunnersImagesPartnerGetResponse 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 images property + images []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable + // The total_count property + total_count *int32 +} +// NewItemActionsHostedRunnersImagesPartnerGetResponse instantiates a new ItemActionsHostedRunnersImagesPartnerGetResponse and sets the default values. +func NewItemActionsHostedRunnersImagesPartnerGetResponse()(*ItemActionsHostedRunnersImagesPartnerGetResponse) { + m := &ItemActionsHostedRunnersImagesPartnerGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersImagesPartnerGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersImagesPartnerGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersImagesPartnerGetResponse(), 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 *ItemActionsHostedRunnersImagesPartnerGetResponse) 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 *ItemActionsHostedRunnersImagesPartnerGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["images"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerImageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable) + } + } + m.SetImages(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetImages gets the images property value. The images property +// returns a []ActionsHostedRunnerImageable when successful +func (m *ItemActionsHostedRunnersImagesPartnerGetResponse) GetImages()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable) { + return m.images +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersImagesPartnerGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersImagesPartnerGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetImages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImages())) + for i, v := range m.GetImages() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("images", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsHostedRunnersImagesPartnerGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetImages sets the images property value. The images property +func (m *ItemActionsHostedRunnersImagesPartnerGetResponse) SetImages(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable)() { + m.images = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsHostedRunnersImagesPartnerGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsHostedRunnersImagesPartnerGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetImages()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable) + GetTotalCount()(*int32) + SetImages(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerImageable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_images_partner_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_images_partner_request_builder.go new file mode 100644 index 00000000..85229fe1 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_images_partner_request_builder.go @@ -0,0 +1,56 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsHostedRunnersImagesPartnerRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\images\partner +type ItemActionsHostedRunnersImagesPartnerRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsHostedRunnersImagesPartnerRequestBuilderInternal instantiates a new ItemActionsHostedRunnersImagesPartnerRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersImagesPartnerRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersImagesPartnerRequestBuilder) { + m := &ItemActionsHostedRunnersImagesPartnerRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images/partner", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersImagesPartnerRequestBuilder instantiates a new ItemActionsHostedRunnersImagesPartnerRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersImagesPartnerRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersImagesPartnerRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersImagesPartnerRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the list of partner images available for GitHub-hosted runners for an organization. +// returns a ItemActionsHostedRunnersImagesPartnerGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#get-partner-images-for-github-hosted-runners-in-an-organization +func (m *ItemActionsHostedRunnersImagesPartnerRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsHostedRunnersImagesPartnerGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsHostedRunnersImagesPartnerGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsHostedRunnersImagesPartnerGetResponseable), nil +} +// ToGetRequestInformation get the list of partner images available for GitHub-hosted runners for an organization. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersImagesPartnerRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsHostedRunnersImagesPartnerRequestBuilder when successful +func (m *ItemActionsHostedRunnersImagesPartnerRequestBuilder) WithUrl(rawUrl string)(*ItemActionsHostedRunnersImagesPartnerRequestBuilder) { + return NewItemActionsHostedRunnersImagesPartnerRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_images_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_images_request_builder.go new file mode 100644 index 00000000..df8f643c --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_images_request_builder.go @@ -0,0 +1,33 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsHostedRunnersImagesRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\images +type ItemActionsHostedRunnersImagesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsHostedRunnersImagesRequestBuilderInternal instantiates a new ItemActionsHostedRunnersImagesRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersImagesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersImagesRequestBuilder) { + m := &ItemActionsHostedRunnersImagesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersImagesRequestBuilder instantiates a new ItemActionsHostedRunnersImagesRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersImagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersImagesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersImagesRequestBuilderInternal(urlParams, requestAdapter) +} +// GithubOwned the githubOwned property +// returns a *ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder when successful +func (m *ItemActionsHostedRunnersImagesRequestBuilder) GithubOwned()(*ItemActionsHostedRunnersImagesGithubOwnedRequestBuilder) { + return NewItemActionsHostedRunnersImagesGithubOwnedRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Partner the partner property +// returns a *ItemActionsHostedRunnersImagesPartnerRequestBuilder when successful +func (m *ItemActionsHostedRunnersImagesRequestBuilder) Partner()(*ItemActionsHostedRunnersImagesPartnerRequestBuilder) { + return NewItemActionsHostedRunnersImagesPartnerRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_item_with_hosted_escaped_runner_escaped_patch_request_body.go b/pkg/github/orgs/item_actions_hosted_runners_item_with_hosted_escaped_runner_escaped_patch_request_body.go new file mode 100644 index 00000000..9ecf9366 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_item_with_hosted_escaped_runner_escaped_patch_request_body.go @@ -0,0 +1,196 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody 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 this runner should be updated with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` + enable_static_ip *bool + // The version of the runner image to deploy. This is relevant only for runners using custom images. + image_version *string + // The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. + maximum_runners *int32 + // Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. + name *string + // The existing runner group to add this runner to. + runner_group_id *int32 +} +// NewItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody instantiates a new ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody and sets the default values. +func NewItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody()(*ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) { + m := &ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody(), 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 *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnableStaticIp gets the enable_static_ip property value. Whether this runner should be updated with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` +// returns a *bool when successful +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) GetEnableStaticIp()(*bool) { + return m.enable_static_ip +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enable_static_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableStaticIp(val) + } + return nil + } + res["image_version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImageVersion(val) + } + return nil + } + res["maximum_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumRunners(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + return res +} +// GetImageVersion gets the image_version property value. The version of the runner image to deploy. This is relevant only for runners using custom images. +// returns a *string when successful +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) GetImageVersion()(*string) { + return m.image_version +} +// GetMaximumRunners gets the maximum_runners property value. The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) GetMaximumRunners()(*int32) { + return m.maximum_runners +} +// GetName gets the name property value. Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +// returns a *string when successful +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetRunnerGroupId gets the runner_group_id property value. The existing runner group to add this runner to. +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enable_static_ip", m.GetEnableStaticIp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("image_version", m.GetImageVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maximum_runners", m.GetMaximumRunners()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + 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 *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnableStaticIp sets the enable_static_ip property value. Whether this runner should be updated with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) SetEnableStaticIp(value *bool)() { + m.enable_static_ip = value +} +// SetImageVersion sets the image_version property value. The version of the runner image to deploy. This is relevant only for runners using custom images. +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) SetImageVersion(value *string)() { + m.image_version = value +} +// SetMaximumRunners sets the maximum_runners property value. The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) SetMaximumRunners(value *int32)() { + m.maximum_runners = value +} +// SetName sets the name property value. Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetRunnerGroupId sets the runner_group_id property value. The existing runner group to add this runner to. +func (m *ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBody) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +type ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableStaticIp()(*bool) + GetImageVersion()(*string) + GetMaximumRunners()(*int32) + GetName()(*string) + GetRunnerGroupId()(*int32) + SetEnableStaticIp(value *bool)() + SetImageVersion(value *string)() + SetMaximumRunners(value *int32)() + SetName(value *string)() + SetRunnerGroupId(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_limits_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_limits_request_builder.go new file mode 100644 index 00000000..ee2edb97 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_limits_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemActionsHostedRunnersLimitsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\limits +type ItemActionsHostedRunnersLimitsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsHostedRunnersLimitsRequestBuilderInternal instantiates a new ItemActionsHostedRunnersLimitsRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersLimitsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersLimitsRequestBuilder) { + m := &ItemActionsHostedRunnersLimitsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/limits", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersLimitsRequestBuilder instantiates a new ItemActionsHostedRunnersLimitsRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersLimitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersLimitsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersLimitsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the GitHub-hosted runners limits for an organization. +// returns a ActionsHostedRunnerLimitsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#get-limits-on-github-hosted-runners-for-an-organization +func (m *ItemActionsHostedRunnersLimitsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerLimitsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerLimitsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerLimitsable), nil +} +// ToGetRequestInformation get the GitHub-hosted runners limits for an organization. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersLimitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsHostedRunnersLimitsRequestBuilder when successful +func (m *ItemActionsHostedRunnersLimitsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsHostedRunnersLimitsRequestBuilder) { + return NewItemActionsHostedRunnersLimitsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_machine_sizes_get_response.go b/pkg/github/orgs/item_actions_hosted_runners_machine_sizes_get_response.go new file mode 100644 index 00000000..4813267e --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_machine_sizes_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemActionsHostedRunnersMachineSizesGetResponse 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 machine_specs property + machine_specs []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerMachineSpecable + // The total_count property + total_count *int32 +} +// NewItemActionsHostedRunnersMachineSizesGetResponse instantiates a new ItemActionsHostedRunnersMachineSizesGetResponse and sets the default values. +func NewItemActionsHostedRunnersMachineSizesGetResponse()(*ItemActionsHostedRunnersMachineSizesGetResponse) { + m := &ItemActionsHostedRunnersMachineSizesGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersMachineSizesGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersMachineSizesGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersMachineSizesGetResponse(), 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 *ItemActionsHostedRunnersMachineSizesGetResponse) 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 *ItemActionsHostedRunnersMachineSizesGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["machine_specs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerMachineSpecFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerMachineSpecable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerMachineSpecable) + } + } + m.SetMachineSpecs(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetMachineSpecs gets the machine_specs property value. The machine_specs property +// returns a []ActionsHostedRunnerMachineSpecable when successful +func (m *ItemActionsHostedRunnersMachineSizesGetResponse) GetMachineSpecs()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerMachineSpecable) { + return m.machine_specs +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersMachineSizesGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersMachineSizesGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMachineSpecs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMachineSpecs())) + for i, v := range m.GetMachineSpecs() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("machine_specs", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsHostedRunnersMachineSizesGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMachineSpecs sets the machine_specs property value. The machine_specs property +func (m *ItemActionsHostedRunnersMachineSizesGetResponse) SetMachineSpecs(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerMachineSpecable)() { + m.machine_specs = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsHostedRunnersMachineSizesGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsHostedRunnersMachineSizesGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMachineSpecs()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerMachineSpecable) + GetTotalCount()(*int32) + SetMachineSpecs(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerMachineSpecable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_machine_sizes_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_machine_sizes_request_builder.go new file mode 100644 index 00000000..a5e71997 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_machine_sizes_request_builder.go @@ -0,0 +1,56 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsHostedRunnersMachineSizesRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\machine-sizes +type ItemActionsHostedRunnersMachineSizesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsHostedRunnersMachineSizesRequestBuilderInternal instantiates a new ItemActionsHostedRunnersMachineSizesRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersMachineSizesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersMachineSizesRequestBuilder) { + m := &ItemActionsHostedRunnersMachineSizesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/machine-sizes", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersMachineSizesRequestBuilder instantiates a new ItemActionsHostedRunnersMachineSizesRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersMachineSizesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersMachineSizesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersMachineSizesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the list of machine specs available for GitHub-hosted runners for an organization. +// returns a ItemActionsHostedRunnersMachineSizesGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#get-github-hosted-runners-machine-specs-for-an-organization +func (m *ItemActionsHostedRunnersMachineSizesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsHostedRunnersMachineSizesGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsHostedRunnersMachineSizesGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsHostedRunnersMachineSizesGetResponseable), nil +} +// ToGetRequestInformation get the list of machine specs available for GitHub-hosted runners for an organization. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersMachineSizesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsHostedRunnersMachineSizesRequestBuilder when successful +func (m *ItemActionsHostedRunnersMachineSizesRequestBuilder) WithUrl(rawUrl string)(*ItemActionsHostedRunnersMachineSizesRequestBuilder) { + return NewItemActionsHostedRunnersMachineSizesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_platforms_get_response.go b/pkg/github/orgs/item_actions_hosted_runners_platforms_get_response.go new file mode 100644 index 00000000..98843852 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_platforms_get_response.go @@ -0,0 +1,115 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsHostedRunnersPlatformsGetResponse 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 platforms property + platforms []string + // The total_count property + total_count *int32 +} +// NewItemActionsHostedRunnersPlatformsGetResponse instantiates a new ItemActionsHostedRunnersPlatformsGetResponse and sets the default values. +func NewItemActionsHostedRunnersPlatformsGetResponse()(*ItemActionsHostedRunnersPlatformsGetResponse) { + m := &ItemActionsHostedRunnersPlatformsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersPlatformsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersPlatformsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersPlatformsGetResponse(), 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 *ItemActionsHostedRunnersPlatformsGetResponse) 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 *ItemActionsHostedRunnersPlatformsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetPlatforms(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetPlatforms gets the platforms property value. The platforms property +// returns a []string when successful +func (m *ItemActionsHostedRunnersPlatformsGetResponse) GetPlatforms()([]string) { + return m.platforms +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersPlatformsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersPlatformsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetPlatforms() != nil { + err := writer.WriteCollectionOfStringValues("platforms", m.GetPlatforms()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemActionsHostedRunnersPlatformsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPlatforms sets the platforms property value. The platforms property +func (m *ItemActionsHostedRunnersPlatformsGetResponse) SetPlatforms(value []string)() { + m.platforms = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsHostedRunnersPlatformsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemActionsHostedRunnersPlatformsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPlatforms()([]string) + GetTotalCount()(*int32) + SetPlatforms(value []string)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_platforms_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_platforms_request_builder.go new file mode 100644 index 00000000..db2acd39 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_platforms_request_builder.go @@ -0,0 +1,56 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsHostedRunnersPlatformsRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\platforms +type ItemActionsHostedRunnersPlatformsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsHostedRunnersPlatformsRequestBuilderInternal instantiates a new ItemActionsHostedRunnersPlatformsRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersPlatformsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersPlatformsRequestBuilder) { + m := &ItemActionsHostedRunnersPlatformsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/platforms", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersPlatformsRequestBuilder instantiates a new ItemActionsHostedRunnersPlatformsRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersPlatformsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersPlatformsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersPlatformsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the list of platforms available for GitHub-hosted runners for an organization. +// returns a ItemActionsHostedRunnersPlatformsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#get-platforms-for-github-hosted-runners-in-an-organization +func (m *ItemActionsHostedRunnersPlatformsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemActionsHostedRunnersPlatformsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsHostedRunnersPlatformsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsHostedRunnersPlatformsGetResponseable), nil +} +// ToGetRequestInformation get the list of platforms available for GitHub-hosted runners for an organization. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersPlatformsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsHostedRunnersPlatformsRequestBuilder when successful +func (m *ItemActionsHostedRunnersPlatformsRequestBuilder) WithUrl(rawUrl string)(*ItemActionsHostedRunnersPlatformsRequestBuilder) { + return NewItemActionsHostedRunnersPlatformsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_post_request_body.go b/pkg/github/orgs/item_actions_hosted_runners_post_request_body.go new file mode 100644 index 00000000..aa9a3051 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_post_request_body.go @@ -0,0 +1,225 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemActionsHostedRunnersPostRequestBody 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 this runner should be created with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` + enable_static_ip *bool + // The image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`. + image ItemActionsHostedRunnersPostRequestBody_imageable + // The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. + maximum_runners *int32 + // Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. + name *string + // The existing runner group to add this runner to. + runner_group_id *int32 + // The machine size of the runner. To list available sizes, use `GET actions/hosted-runners/machine-sizes` + size *string +} +// NewItemActionsHostedRunnersPostRequestBody instantiates a new ItemActionsHostedRunnersPostRequestBody and sets the default values. +func NewItemActionsHostedRunnersPostRequestBody()(*ItemActionsHostedRunnersPostRequestBody) { + m := &ItemActionsHostedRunnersPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersPostRequestBody(), 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 *ItemActionsHostedRunnersPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetEnableStaticIp gets the enable_static_ip property value. Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` +// returns a *bool when successful +func (m *ItemActionsHostedRunnersPostRequestBody) GetEnableStaticIp()(*bool) { + return m.enable_static_ip +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemActionsHostedRunnersPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enable_static_ip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableStaticIp(val) + } + return nil + } + res["image"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActionsHostedRunnersPostRequestBody_imageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetImage(val.(ItemActionsHostedRunnersPostRequestBody_imageable)) + } + return nil + } + res["maximum_runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumRunners(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["runner_group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRunnerGroupId(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetImage gets the image property value. The image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`. +// returns a ItemActionsHostedRunnersPostRequestBody_imageable when successful +func (m *ItemActionsHostedRunnersPostRequestBody) GetImage()(ItemActionsHostedRunnersPostRequestBody_imageable) { + return m.image +} +// GetMaximumRunners gets the maximum_runners property value. The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersPostRequestBody) GetMaximumRunners()(*int32) { + return m.maximum_runners +} +// GetName gets the name property value. Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +// returns a *string when successful +func (m *ItemActionsHostedRunnersPostRequestBody) GetName()(*string) { + return m.name +} +// GetRunnerGroupId gets the runner_group_id property value. The existing runner group to add this runner to. +// returns a *int32 when successful +func (m *ItemActionsHostedRunnersPostRequestBody) GetRunnerGroupId()(*int32) { + return m.runner_group_id +} +// GetSize gets the size property value. The machine size of the runner. To list available sizes, use `GET actions/hosted-runners/machine-sizes` +// returns a *string when successful +func (m *ItemActionsHostedRunnersPostRequestBody) GetSize()(*string) { + return m.size +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enable_static_ip", m.GetEnableStaticIp()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("image", m.GetImage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maximum_runners", m.GetMaximumRunners()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("runner_group_id", m.GetRunnerGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("size", m.GetSize()) + 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 *ItemActionsHostedRunnersPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetEnableStaticIp sets the enable_static_ip property value. Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` +func (m *ItemActionsHostedRunnersPostRequestBody) SetEnableStaticIp(value *bool)() { + m.enable_static_ip = value +} +// SetImage sets the image property value. The image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`. +func (m *ItemActionsHostedRunnersPostRequestBody) SetImage(value ItemActionsHostedRunnersPostRequestBody_imageable)() { + m.image = value +} +// SetMaximumRunners sets the maximum_runners property value. The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. +func (m *ItemActionsHostedRunnersPostRequestBody) SetMaximumRunners(value *int32)() { + m.maximum_runners = value +} +// SetName sets the name property value. Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +func (m *ItemActionsHostedRunnersPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetRunnerGroupId sets the runner_group_id property value. The existing runner group to add this runner to. +func (m *ItemActionsHostedRunnersPostRequestBody) SetRunnerGroupId(value *int32)() { + m.runner_group_id = value +} +// SetSize sets the size property value. The machine size of the runner. To list available sizes, use `GET actions/hosted-runners/machine-sizes` +func (m *ItemActionsHostedRunnersPostRequestBody) SetSize(value *string)() { + m.size = value +} +type ItemActionsHostedRunnersPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableStaticIp()(*bool) + GetImage()(ItemActionsHostedRunnersPostRequestBody_imageable) + GetMaximumRunners()(*int32) + GetName()(*string) + GetRunnerGroupId()(*int32) + GetSize()(*string) + SetEnableStaticIp(value *bool)() + SetImage(value ItemActionsHostedRunnersPostRequestBody_imageable)() + SetMaximumRunners(value *int32)() + SetName(value *string)() + SetRunnerGroupId(value *int32)() + SetSize(value *string)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_post_request_body_escaped_image.go b/pkg/github/orgs/item_actions_hosted_runners_post_request_body_escaped_image.go new file mode 100644 index 00000000..08306a08 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_post_request_body_escaped_image.go @@ -0,0 +1,110 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActionsHostedRunnersPostRequestBody_image the image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`. +type ItemActionsHostedRunnersPostRequestBody_image 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 unique identifier of the runner image. + id *string + // The version of the runner image to deploy. This is relevant only for runners using custom images. + version *string +} +// NewItemActionsHostedRunnersPostRequestBody_image instantiates a new ItemActionsHostedRunnersPostRequestBody_image and sets the default values. +func NewItemActionsHostedRunnersPostRequestBody_image()(*ItemActionsHostedRunnersPostRequestBody_image) { + m := &ItemActionsHostedRunnersPostRequestBody_image{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsHostedRunnersPostRequestBody_imageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsHostedRunnersPostRequestBody_imageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsHostedRunnersPostRequestBody_image(), 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 *ItemActionsHostedRunnersPostRequestBody_image) 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 *ItemActionsHostedRunnersPostRequestBody_image) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the runner image. +// returns a *string when successful +func (m *ItemActionsHostedRunnersPostRequestBody_image) GetId()(*string) { + return m.id +} +// GetVersion gets the version property value. The version of the runner image to deploy. This is relevant only for runners using custom images. +// returns a *string when successful +func (m *ItemActionsHostedRunnersPostRequestBody_image) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ItemActionsHostedRunnersPostRequestBody_image) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *ItemActionsHostedRunnersPostRequestBody_image) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The unique identifier of the runner image. +func (m *ItemActionsHostedRunnersPostRequestBody_image) SetId(value *string)() { + m.id = value +} +// SetVersion sets the version property value. The version of the runner image to deploy. This is relevant only for runners using custom images. +func (m *ItemActionsHostedRunnersPostRequestBody_image) SetVersion(value *string)() { + m.version = value +} +type ItemActionsHostedRunnersPostRequestBody_imageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetVersion()(*string) + SetId(value *string)() + SetVersion(value *string)() +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_request_builder.go new file mode 100644 index 00000000..e3255727 --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_request_builder.go @@ -0,0 +1,126 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemActionsHostedRunnersRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners +type ItemActionsHostedRunnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsHostedRunnersRequestBuilderGetQueryParameters lists all GitHub-hosted runners configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. +type ItemActionsHostedRunnersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByHosted_runner_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.actions.hostedRunners.item collection +// returns a *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder when successful +func (m *ItemActionsHostedRunnersRequestBuilder) ByHosted_runner_id(hosted_runner_id int32)(*ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["hosted_runner_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(hosted_runner_id), 10) + return NewItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemActionsHostedRunnersRequestBuilderInternal instantiates a new ItemActionsHostedRunnersRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersRequestBuilder) { + m := &ItemActionsHostedRunnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersRequestBuilder instantiates a new ItemActionsHostedRunnersRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all GitHub-hosted runners configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. +// returns a ItemActionsHostedRunnersGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#list-github-hosted-runners-for-an-organization +func (m *ItemActionsHostedRunnersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsHostedRunnersRequestBuilderGetQueryParameters])(ItemActionsHostedRunnersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsHostedRunnersGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsHostedRunnersGetResponseable), nil +} +// Images the images property +// returns a *ItemActionsHostedRunnersImagesRequestBuilder when successful +func (m *ItemActionsHostedRunnersRequestBuilder) Images()(*ItemActionsHostedRunnersImagesRequestBuilder) { + return NewItemActionsHostedRunnersImagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Limits the limits property +// returns a *ItemActionsHostedRunnersLimitsRequestBuilder when successful +func (m *ItemActionsHostedRunnersRequestBuilder) Limits()(*ItemActionsHostedRunnersLimitsRequestBuilder) { + return NewItemActionsHostedRunnersLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// MachineSizes the machineSizes property +// returns a *ItemActionsHostedRunnersMachineSizesRequestBuilder when successful +func (m *ItemActionsHostedRunnersRequestBuilder) MachineSizes()(*ItemActionsHostedRunnersMachineSizesRequestBuilder) { + return NewItemActionsHostedRunnersMachineSizesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Platforms the platforms property +// returns a *ItemActionsHostedRunnersPlatformsRequestBuilder when successful +func (m *ItemActionsHostedRunnersRequestBuilder) Platforms()(*ItemActionsHostedRunnersPlatformsRequestBuilder) { + return NewItemActionsHostedRunnersPlatformsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Post creates a GitHub-hosted runner for an organization.OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. +// returns a ActionsHostedRunnerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#create-a-github-hosted-runner-for-an-organization +func (m *ItemActionsHostedRunnersRequestBuilder) Post(ctx context.Context, body ItemActionsHostedRunnersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable), nil +} +// ToGetRequestInformation lists all GitHub-hosted runners configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsHostedRunnersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a GitHub-hosted runner for an organization.OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemActionsHostedRunnersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsHostedRunnersRequestBuilder when successful +func (m *ItemActionsHostedRunnersRequestBuilder) WithUrl(rawUrl string)(*ItemActionsHostedRunnersRequestBuilder) { + return NewItemActionsHostedRunnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_hosted_runners_with_hosted_escaped_runner_escaped_item_request_builder.go b/pkg/github/orgs/item_actions_hosted_runners_with_hosted_escaped_runner_escaped_item_request_builder.go new file mode 100644 index 00000000..0669b86b --- /dev/null +++ b/pkg/github/orgs/item_actions_hosted_runners_with_hosted_escaped_runner_escaped_item_request_builder.go @@ -0,0 +1,115 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\{hosted_runner_id} +type ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilderInternal instantiates a new ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) { + m := &ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/{hosted_runner_id}", pathParameters), + } + return m +} +// NewItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder instantiates a new ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder and sets the default values. +func NewItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a GitHub-hosted runner for an organization. +// returns a ActionsHostedRunnerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#delete-a-github-hosted-runner-for-an-organization +func (m *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable), nil +} +// Get gets a GitHub-hosted runner configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. +// returns a ActionsHostedRunnerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#get-a-github-hosted-runner-for-an-organization +func (m *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable), nil +} +// Patch updates a GitHub-hosted runner for an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. +// returns a ActionsHostedRunnerable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/hosted-runners#update-a-github-hosted-runner-for-an-organization +func (m *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) Patch(ctx context.Context, body ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable), nil +} +// ToDeleteRequestInformation deletes a GitHub-hosted runner for an organization. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation gets a GitHub-hosted runner configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a GitHub-hosted runner for an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemActionsHostedRunnersItemWithHosted_runner_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder when successful +func (m *ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder) { + return NewItemActionsHostedRunnersWithHosted_runner_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_request_builder.go b/pkg/github/orgs/item_actions_request_builder.go index 36a9844f..2fdd0dd2 100644 --- a/pkg/github/orgs/item_actions_request_builder.go +++ b/pkg/github/orgs/item_actions_request_builder.go @@ -26,6 +26,11 @@ func NewItemActionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26 urlParams["request-raw-url"] = rawUrl return NewItemActionsRequestBuilderInternal(urlParams, requestAdapter) } +// HostedRunners the hostedRunners property +// returns a *ItemActionsHostedRunnersRequestBuilder when successful +func (m *ItemActionsRequestBuilder) HostedRunners()(*ItemActionsHostedRunnersRequestBuilder) { + return NewItemActionsHostedRunnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Oidc the oidc property // returns a *ItemActionsOidcRequestBuilder when successful func (m *ItemActionsRequestBuilder) Oidc()(*ItemActionsOidcRequestBuilder) { diff --git a/pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_get_response.go b/pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_get_response.go new file mode 100644 index 00000000..073ca7dd --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemActionsRunnerGroupsItemHostedRunnersGetResponse 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 runners property + runners []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable + // The total_count property + total_count *float64 +} +// NewItemActionsRunnerGroupsItemHostedRunnersGetResponse instantiates a new ItemActionsRunnerGroupsItemHostedRunnersGetResponse and sets the default values. +func NewItemActionsRunnerGroupsItemHostedRunnersGetResponse()(*ItemActionsRunnerGroupsItemHostedRunnersGetResponse) { + m := &ItemActionsRunnerGroupsItemHostedRunnersGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemActionsRunnerGroupsItemHostedRunnersGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemActionsRunnerGroupsItemHostedRunnersGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionsRunnerGroupsItemHostedRunnersGetResponse(), 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 *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) 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 *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateActionsHostedRunnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable) + } + } + m.SetRunners(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetRunners gets the runners property value. The runners property +// returns a []ActionsHostedRunnerable when successful +func (m *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) GetRunners()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable) { + return m.runners +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *float64 when successful +func (m *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) GetTotalCount()(*float64) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRunners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRunners())) + for i, v := range m.GetRunners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("runners", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("total_count", m.GetTotalCount()) + 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 *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunners sets the runners property value. The runners property +func (m *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) SetRunners(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable)() { + m.runners = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemActionsRunnerGroupsItemHostedRunnersGetResponse) SetTotalCount(value *float64)() { + m.total_count = value +} +type ItemActionsRunnerGroupsItemHostedRunnersGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunners()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable) + GetTotalCount()(*float64) + SetRunners(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ActionsHostedRunnerable)() + SetTotalCount(value *float64)() +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_request_builder.go new file mode 100644 index 00000000..2f128924 --- /dev/null +++ b/pkg/github/orgs/item_actions_runner_groups_item_hosted_runners_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\hosted-runners +type ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemActionsRunnerGroupsItemHostedRunnersRequestBuilderGetQueryParameters lists the GitHub-hosted runners in an organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +type ItemActionsRunnerGroupsItemHostedRunnersRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemActionsRunnerGroupsItemHostedRunnersRequestBuilderInternal instantiates a new ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemHostedRunnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder) { + m := &ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemActionsRunnerGroupsItemHostedRunnersRequestBuilder instantiates a new ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder and sets the default values. +func NewItemActionsRunnerGroupsItemHostedRunnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemActionsRunnerGroupsItemHostedRunnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the GitHub-hosted runners in an organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a ItemActionsRunnerGroupsItemHostedRunnersGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-github-hosted-runners-in-a-group-for-an-organization +func (m *ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemHostedRunnersRequestBuilderGetQueryParameters])(ItemActionsRunnerGroupsItemHostedRunnersGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnerGroupsItemHostedRunnersGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemActionsRunnerGroupsItemHostedRunnersGetResponseable), nil +} +// ToGetRequestInformation lists the GitHub-hosted runners in an organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemActionsRunnerGroupsItemHostedRunnersRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder when successful +func (m *ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder) WithUrl(rawUrl string)(*ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder) { + return NewItemActionsRunnerGroupsItemHostedRunnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_actions_runner_groups_item_with_runner_escaped_group_escaped_patch_request_body.go b/pkg/github/orgs/item_actions_runner_groups_item_with_runner_escaped_group_escaped_patch_request_body.go index 2d8bdc63..bc4b07c6 100644 --- a/pkg/github/orgs/item_actions_runner_groups_item_with_runner_escaped_group_escaped_patch_request_body.go +++ b/pkg/github/orgs/item_actions_runner_groups_item_with_runner_escaped_group_escaped_patch_request_body.go @@ -11,6 +11,8 @@ type ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody struct { allows_public_repositories *bool // Name of the runner group. name *string + // The identifier of a hosted compute network configuration. + network_configuration_id *string // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. restricted_to_workflows *bool // List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. @@ -62,6 +64,16 @@ func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetFieldD } return nil } + res["network_configuration_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkConfigurationId(val) + } + return nil + } res["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -95,6 +107,11 @@ func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetFieldD func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetName()(*string) { return m.name } +// GetNetworkConfigurationId gets the network_configuration_id property value. The identifier of a hosted compute network configuration. +// returns a *string when successful +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetNetworkConfigurationId()(*string) { + return m.network_configuration_id +} // GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. // returns a *bool when successful func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) GetRestrictedToWorkflows()(*bool) { @@ -119,6 +136,12 @@ func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) Serialize return err } } + { + err := writer.WriteStringValue("network_configuration_id", m.GetNetworkConfigurationId()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) if err != nil { @@ -151,6 +174,10 @@ func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetAllows func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetName(value *string)() { m.name = value } +// SetNetworkConfigurationId sets the network_configuration_id property value. The identifier of a hosted compute network configuration. +func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetNetworkConfigurationId(value *string)() { + m.network_configuration_id = value +} // SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. func (m *ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBody) SetRestrictedToWorkflows(value *bool)() { m.restricted_to_workflows = value @@ -164,10 +191,12 @@ type ItemActionsRunnerGroupsItemWithRunner_group_PatchRequestBodyable interface i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAllowsPublicRepositories()(*bool) GetName()(*string) + GetNetworkConfigurationId()(*string) GetRestrictedToWorkflows()(*bool) GetSelectedWorkflows()([]string) SetAllowsPublicRepositories(value *bool)() SetName(value *string)() + SetNetworkConfigurationId(value *string)() SetRestrictedToWorkflows(value *bool)() SetSelectedWorkflows(value []string)() } diff --git a/pkg/github/orgs/item_actions_runner_groups_post_request_body.go b/pkg/github/orgs/item_actions_runner_groups_post_request_body.go index 08f38317..2359cfee 100644 --- a/pkg/github/orgs/item_actions_runner_groups_post_request_body.go +++ b/pkg/github/orgs/item_actions_runner_groups_post_request_body.go @@ -11,6 +11,8 @@ type ItemActionsRunnerGroupsPostRequestBody struct { allows_public_repositories *bool // Name of the runner group. name *string + // The identifier of a hosted compute network configuration. + network_configuration_id *string // If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. restricted_to_workflows *bool // List of runner IDs to add to the runner group. @@ -66,6 +68,16 @@ func (m *ItemActionsRunnerGroupsPostRequestBody) GetFieldDeserializers()(map[str } return nil } + res["network_configuration_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkConfigurationId(val) + } + return nil + } res["restricted_to_workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -131,6 +143,11 @@ func (m *ItemActionsRunnerGroupsPostRequestBody) GetFieldDeserializers()(map[str func (m *ItemActionsRunnerGroupsPostRequestBody) GetName()(*string) { return m.name } +// GetNetworkConfigurationId gets the network_configuration_id property value. The identifier of a hosted compute network configuration. +// returns a *string when successful +func (m *ItemActionsRunnerGroupsPostRequestBody) GetNetworkConfigurationId()(*string) { + return m.network_configuration_id +} // GetRestrictedToWorkflows gets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. // returns a *bool when successful func (m *ItemActionsRunnerGroupsPostRequestBody) GetRestrictedToWorkflows()(*bool) { @@ -165,6 +182,12 @@ func (m *ItemActionsRunnerGroupsPostRequestBody) Serialize(writer i878a80d2330e8 return err } } + { + err := writer.WriteStringValue("network_configuration_id", m.GetNetworkConfigurationId()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("restricted_to_workflows", m.GetRestrictedToWorkflows()) if err != nil { @@ -209,6 +232,10 @@ func (m *ItemActionsRunnerGroupsPostRequestBody) SetAllowsPublicRepositories(val func (m *ItemActionsRunnerGroupsPostRequestBody) SetName(value *string)() { m.name = value } +// SetNetworkConfigurationId sets the network_configuration_id property value. The identifier of a hosted compute network configuration. +func (m *ItemActionsRunnerGroupsPostRequestBody) SetNetworkConfigurationId(value *string)() { + m.network_configuration_id = value +} // SetRestrictedToWorkflows sets the restricted_to_workflows property value. If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. func (m *ItemActionsRunnerGroupsPostRequestBody) SetRestrictedToWorkflows(value *bool)() { m.restricted_to_workflows = value @@ -230,12 +257,14 @@ type ItemActionsRunnerGroupsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAllowsPublicRepositories()(*bool) GetName()(*string) + GetNetworkConfigurationId()(*string) GetRestrictedToWorkflows()(*bool) GetRunners()([]int32) GetSelectedRepositoryIds()([]int32) GetSelectedWorkflows()([]string) SetAllowsPublicRepositories(value *bool)() SetName(value *string)() + SetNetworkConfigurationId(value *string)() SetRestrictedToWorkflows(value *bool)() SetRunners(value []int32)() SetSelectedRepositoryIds(value []int32)() diff --git a/pkg/github/orgs/item_actions_runner_groups_with_runner_escaped_group_escaped_item_request_builder.go b/pkg/github/orgs/item_actions_runner_groups_with_runner_escaped_group_escaped_item_request_builder.go index 2bd09162..c81db351 100644 --- a/pkg/github/orgs/item_actions_runner_groups_with_runner_escaped_group_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_actions_runner_groups_with_runner_escaped_group_escaped_item_request_builder.go @@ -57,6 +57,11 @@ func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) Get(ctx con } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RunnerGroupsOrgable), nil } +// HostedRunners the hostedRunners property +// returns a *ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder when successful +func (m *ItemActionsRunnerGroupsWithRunner_group_ItemRequestBuilder) HostedRunners()(*ItemActionsRunnerGroupsItemHostedRunnersRequestBuilder) { + return NewItemActionsRunnerGroupsItemHostedRunnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Patch updates the `name` and `visibility` of a self-hosted runner group in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. // returns a RunnerGroupsOrgable when successful // [API method documentation] From f34f1e22cb76d78982af4fa7eef015e9107aa7a7 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 21 Jan 2025 00:08:59 +0000 Subject: [PATCH 09/25] New updates to generated code --- .../item_dependabot_alerts_request_builder.go | 4 +- pkg/github/kiota-lock.json | 2 +- pkg/github/models/network_configuration.go | 205 ++++++++++++++++++ ...uration_escaped_compute_escaped_service.go | 37 ++++ pkg/github/models/network_settings.go | 197 +++++++++++++++++ ...7e627c7a351bebaf07dc5956bc3881618f07fe7.go | 115 ++++++++++ ...st_body_escaped_compute_escaped_service.go | 34 +++ ...st_body_escaped_compute_escaped_service.go | 34 +++ .../item_dependabot_alerts_request_builder.go | 4 +- ...ngs_network_configurations_get_response.go | 122 +++++++++++ ...etwork_configurations_post_request_body.go | 115 ++++++++++ ..._network_configurations_request_builder.go | 107 +++++++++ ...figuration_escaped_item_request_builder.go | 110 ++++++++++ ...ttings_network_settings_request_builder.go | 35 +++ ...d_settings_escaped_item_request_builder.go | 57 +++++ .../orgs/item_settings_request_builder.go | 10 + ..._item_dependabot_alerts_request_builder.go | 4 +- ...m_sub_escaped_issue_delete_request_body.go | 6 +- ...em_sub_escaped_issues_post_request_body.go | 6 +- 19 files changed, 1194 insertions(+), 10 deletions(-) create mode 100644 pkg/github/models/network_configuration.go create mode 100644 pkg/github/models/network_configuration_escaped_compute_escaped_service.go create mode 100644 pkg/github/models/network_settings.go create mode 100644 pkg/github/orgs/33b6af01876f27198813d38317e627c7a351bebaf07dc5956bc3881618f07fe7.go create mode 100644 pkg/github/orgs/item/settings/networkconfigurations/item/with_network_escaped_configuration_escaped_patch_request_body_escaped_compute_escaped_service.go create mode 100644 pkg/github/orgs/item/settings/networkconfigurations/network_configurations_post_request_body_escaped_compute_escaped_service.go create mode 100644 pkg/github/orgs/item_settings_network_configurations_get_response.go create mode 100644 pkg/github/orgs/item_settings_network_configurations_post_request_body.go create mode 100644 pkg/github/orgs/item_settings_network_configurations_request_builder.go create mode 100644 pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go create mode 100644 pkg/github/orgs/item_settings_network_settings_request_builder.go create mode 100644 pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go diff --git a/pkg/github/enterprises/item_dependabot_alerts_request_builder.go b/pkg/github/enterprises/item_dependabot_alerts_request_builder.go index e7ae5b99..47cab627 100644 --- a/pkg/github/enterprises/item_dependabot_alerts_request_builder.go +++ b/pkg/github/enterprises/item_dependabot_alerts_request_builder.go @@ -21,6 +21,8 @@ type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { Direction *i77c38d6454f4c9dc55005405729b416470b652fa12f001a040f72bc1395cc732.GetDirectionQueryParameterType `uriparametername:"direction"` // A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` Ecosystem *string `uriparametername:"ecosystem"` + // CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:- An exact number (`n`)- Comparators such as `>n`, `=n`, `<=n`- A range like `n..n`, where `n` is a number from 0.0 to 1.0Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned. + Epss_percentage *string `uriparametername:"epss_percentage"` // **Deprecated**. The number of results per page (max 100), starting from the first matching result.This parameter must not be used in combination with `last`.Instead, use `per_page` in combination with `after` to fetch the first page of results. First *int32 `uriparametername:"first"` // **Deprecated**. The number of results per page (max 100), starting from the last matching result.This parameter must not be used in combination with `first`.Instead, use `per_page` in combination with `before` to fetch the last page of results. @@ -41,7 +43,7 @@ type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { // NewItemDependabotAlertsRequestBuilderInternal instantiates a new ItemDependabotAlertsRequestBuilder and sets the default values. func NewItemDependabotAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotAlertsRequestBuilder) { m := &ItemDependabotAlertsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot/alerts{?after*,before*,direction*,ecosystem*,first*,last*,package*,per_page*,scope*,severity*,sort*,state*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,last*,package*,per_page*,scope*,severity*,sort*,state*}", pathParameters), } return m } diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index a665f725..167a01e6 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "FB8FE1F741E080719F7C4C8EECBECB741B6136E59A74D88B952D22410BD8A842793A943EAAE1203C70B4C81AC38085D1E362187B86FF232A573D3D7DDB253B9B", + "descriptionHash": "10BD1E61E20F70F5BC4F47013FDDDB4FCC8FAA527DC4625CEFB906C01509A8EF6C4218808978E54E9F68A1CD4444F929ABA26AA0376D780F8EBD1D0C19013721", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/network_configuration.go b/pkg/github/models/network_configuration.go new file mode 100644 index 00000000..eb9808d2 --- /dev/null +++ b/pkg/github/models/network_configuration.go @@ -0,0 +1,205 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkConfiguration a hosted compute network configuration. +type NetworkConfiguration 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 hosted compute service the network configuration supports. + compute_service *NetworkConfiguration_compute_service + // The time at which the network configuration was created, in ISO 8601 format. + created_on *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The unique identifier of the network configuration. + id *string + // The name of the network configuration. + name *string + // The unique identifier of each network settings in the configuration. + network_settings_ids []string +} +// NewNetworkConfiguration instantiates a new NetworkConfiguration and sets the default values. +func NewNetworkConfiguration()(*NetworkConfiguration) { + m := &NetworkConfiguration{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNetworkConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNetworkConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkConfiguration(), 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 *NetworkConfiguration) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetComputeService gets the compute_service property value. The hosted compute service the network configuration supports. +// returns a *NetworkConfiguration_compute_service when successful +func (m *NetworkConfiguration) GetComputeService()(*NetworkConfiguration_compute_service) { + return m.compute_service +} +// GetCreatedOn gets the created_on property value. The time at which the network configuration was created, in ISO 8601 format. +// returns a *Time when successful +func (m *NetworkConfiguration) GetCreatedOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_on +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NetworkConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["compute_service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNetworkConfiguration_compute_service) + if err != nil { + return err + } + if val != nil { + m.SetComputeService(val.(*NetworkConfiguration_compute_service)) + } + return nil + } + res["created_on"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedOn(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_settings_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetNetworkSettingsIds(res) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the network configuration. +// returns a *string when successful +func (m *NetworkConfiguration) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name of the network configuration. +// returns a *string when successful +func (m *NetworkConfiguration) GetName()(*string) { + return m.name +} +// GetNetworkSettingsIds gets the network_settings_ids property value. The unique identifier of each network settings in the configuration. +// returns a []string when successful +func (m *NetworkConfiguration) GetNetworkSettingsIds()([]string) { + return m.network_settings_ids +} +// Serialize serializes information the current object +func (m *NetworkConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetComputeService() != nil { + cast := (*m.GetComputeService()).String() + err := writer.WriteStringValue("compute_service", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("created_on", m.GetCreatedOn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetNetworkSettingsIds() != nil { + err := writer.WriteCollectionOfStringValues("network_settings_ids", m.GetNetworkSettingsIds()) + 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 *NetworkConfiguration) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetComputeService sets the compute_service property value. The hosted compute service the network configuration supports. +func (m *NetworkConfiguration) SetComputeService(value *NetworkConfiguration_compute_service)() { + m.compute_service = value +} +// SetCreatedOn sets the created_on property value. The time at which the network configuration was created, in ISO 8601 format. +func (m *NetworkConfiguration) SetCreatedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_on = value +} +// SetId sets the id property value. The unique identifier of the network configuration. +func (m *NetworkConfiguration) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name of the network configuration. +func (m *NetworkConfiguration) SetName(value *string)() { + m.name = value +} +// SetNetworkSettingsIds sets the network_settings_ids property value. The unique identifier of each network settings in the configuration. +func (m *NetworkConfiguration) SetNetworkSettingsIds(value []string)() { + m.network_settings_ids = value +} +type NetworkConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComputeService()(*NetworkConfiguration_compute_service) + GetCreatedOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*string) + GetName()(*string) + GetNetworkSettingsIds()([]string) + SetComputeService(value *NetworkConfiguration_compute_service)() + SetCreatedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *string)() + SetName(value *string)() + SetNetworkSettingsIds(value []string)() +} diff --git a/pkg/github/models/network_configuration_escaped_compute_escaped_service.go b/pkg/github/models/network_configuration_escaped_compute_escaped_service.go new file mode 100644 index 00000000..1a4a544a --- /dev/null +++ b/pkg/github/models/network_configuration_escaped_compute_escaped_service.go @@ -0,0 +1,37 @@ +package models +// The hosted compute service the network configuration supports. +type NetworkConfiguration_compute_service int + +const ( + NONE_NETWORKCONFIGURATION_COMPUTE_SERVICE NetworkConfiguration_compute_service = iota + ACTIONS_NETWORKCONFIGURATION_COMPUTE_SERVICE + CODESPACES_NETWORKCONFIGURATION_COMPUTE_SERVICE +) + +func (i NetworkConfiguration_compute_service) String() string { + return []string{"none", "actions", "codespaces"}[i] +} +func ParseNetworkConfiguration_compute_service(v string) (any, error) { + result := NONE_NETWORKCONFIGURATION_COMPUTE_SERVICE + switch v { + case "none": + result = NONE_NETWORKCONFIGURATION_COMPUTE_SERVICE + case "actions": + result = ACTIONS_NETWORKCONFIGURATION_COMPUTE_SERVICE + case "codespaces": + result = CODESPACES_NETWORKCONFIGURATION_COMPUTE_SERVICE + default: + return nil, nil + } + return &result, nil +} +func SerializeNetworkConfiguration_compute_service(values []NetworkConfiguration_compute_service) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NetworkConfiguration_compute_service) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/network_settings.go b/pkg/github/models/network_settings.go new file mode 100644 index 00000000..044a2636 --- /dev/null +++ b/pkg/github/models/network_settings.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkSettings a hosted compute network settings resource. +type NetworkSettings 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 unique identifier of the network settings resource. + id *string + // The name of the network settings resource. + name *string + // The identifier of the network configuration that is using this settings resource. + network_configuration_id *string + // The location of the subnet this network settings resource is configured for. + region *string + // The subnet this network settings resource is configured for. + subnet_id *string +} +// NewNetworkSettings instantiates a new NetworkSettings and sets the default values. +func NewNetworkSettings()(*NetworkSettings) { + m := &NetworkSettings{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNetworkSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNetworkSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkSettings(), 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 *NetworkSettings) 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 *NetworkSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_configuration_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkConfigurationId(val) + } + return nil + } + res["region"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegion(val) + } + return nil + } + res["subnet_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubnetId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of the network settings resource. +// returns a *string when successful +func (m *NetworkSettings) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name of the network settings resource. +// returns a *string when successful +func (m *NetworkSettings) GetName()(*string) { + return m.name +} +// GetNetworkConfigurationId gets the network_configuration_id property value. The identifier of the network configuration that is using this settings resource. +// returns a *string when successful +func (m *NetworkSettings) GetNetworkConfigurationId()(*string) { + return m.network_configuration_id +} +// GetRegion gets the region property value. The location of the subnet this network settings resource is configured for. +// returns a *string when successful +func (m *NetworkSettings) GetRegion()(*string) { + return m.region +} +// GetSubnetId gets the subnet_id property value. The subnet this network settings resource is configured for. +// returns a *string when successful +func (m *NetworkSettings) GetSubnetId()(*string) { + return m.subnet_id +} +// Serialize serializes information the current object +func (m *NetworkSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("network_configuration_id", m.GetNetworkConfigurationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("region", m.GetRegion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subnet_id", m.GetSubnetId()) + 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 *NetworkSettings) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The unique identifier of the network settings resource. +func (m *NetworkSettings) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name of the network settings resource. +func (m *NetworkSettings) SetName(value *string)() { + m.name = value +} +// SetNetworkConfigurationId sets the network_configuration_id property value. The identifier of the network configuration that is using this settings resource. +func (m *NetworkSettings) SetNetworkConfigurationId(value *string)() { + m.network_configuration_id = value +} +// SetRegion sets the region property value. The location of the subnet this network settings resource is configured for. +func (m *NetworkSettings) SetRegion(value *string)() { + m.region = value +} +// SetSubnetId sets the subnet_id property value. The subnet this network settings resource is configured for. +func (m *NetworkSettings) SetSubnetId(value *string)() { + m.subnet_id = value +} +type NetworkSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetName()(*string) + GetNetworkConfigurationId()(*string) + GetRegion()(*string) + GetSubnetId()(*string) + SetId(value *string)() + SetName(value *string)() + SetNetworkConfigurationId(value *string)() + SetRegion(value *string)() + SetSubnetId(value *string)() +} diff --git a/pkg/github/orgs/33b6af01876f27198813d38317e627c7a351bebaf07dc5956bc3881618f07fe7.go b/pkg/github/orgs/33b6af01876f27198813d38317e627c7a351bebaf07dc5956bc3881618f07fe7.go new file mode 100644 index 00000000..4427a27e --- /dev/null +++ b/pkg/github/orgs/33b6af01876f27198813d38317e627c7a351bebaf07dc5956bc3881618f07fe7.go @@ -0,0 +1,115 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. + name *string + // The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. + network_settings_ids []string +} +// NewItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody instantiates a new ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody and sets the default values. +func NewItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody()(*ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) { + m := &ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody(), 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 *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) 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 *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_settings_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetNetworkSettingsIds(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +// returns a *string when successful +func (m *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) GetName()(*string) { + return m.name +} +// GetNetworkSettingsIds gets the network_settings_ids property value. The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. +// returns a []string when successful +func (m *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) GetNetworkSettingsIds()([]string) { + return m.network_settings_ids +} +// Serialize serializes information the current object +func (m *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetNetworkSettingsIds() != nil { + err := writer.WriteCollectionOfStringValues("network_settings_ids", m.GetNetworkSettingsIds()) + 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 *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +func (m *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) SetName(value *string)() { + m.name = value +} +// SetNetworkSettingsIds sets the network_settings_ids property value. The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. +func (m *ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBody) SetNetworkSettingsIds(value []string)() { + m.network_settings_ids = value +} +type ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetNetworkSettingsIds()([]string) + SetName(value *string)() + SetNetworkSettingsIds(value []string)() +} diff --git a/pkg/github/orgs/item/settings/networkconfigurations/item/with_network_escaped_configuration_escaped_patch_request_body_escaped_compute_escaped_service.go b/pkg/github/orgs/item/settings/networkconfigurations/item/with_network_escaped_configuration_escaped_patch_request_body_escaped_compute_escaped_service.go new file mode 100644 index 00000000..05ac2982 --- /dev/null +++ b/pkg/github/orgs/item/settings/networkconfigurations/item/with_network_escaped_configuration_escaped_patch_request_body_escaped_compute_escaped_service.go @@ -0,0 +1,34 @@ +package item +// The hosted compute service to use for the network configuration. +type WithNetwork_configuration_PatchRequestBody_compute_service int + +const ( + NONE_WITHNETWORK_CONFIGURATION_PATCHREQUESTBODY_COMPUTE_SERVICE WithNetwork_configuration_PatchRequestBody_compute_service = iota + ACTIONS_WITHNETWORK_CONFIGURATION_PATCHREQUESTBODY_COMPUTE_SERVICE +) + +func (i WithNetwork_configuration_PatchRequestBody_compute_service) String() string { + return []string{"none", "actions"}[i] +} +func ParseWithNetwork_configuration_PatchRequestBody_compute_service(v string) (any, error) { + result := NONE_WITHNETWORK_CONFIGURATION_PATCHREQUESTBODY_COMPUTE_SERVICE + switch v { + case "none": + result = NONE_WITHNETWORK_CONFIGURATION_PATCHREQUESTBODY_COMPUTE_SERVICE + case "actions": + result = ACTIONS_WITHNETWORK_CONFIGURATION_PATCHREQUESTBODY_COMPUTE_SERVICE + default: + return nil, nil + } + return &result, nil +} +func SerializeWithNetwork_configuration_PatchRequestBody_compute_service(values []WithNetwork_configuration_PatchRequestBody_compute_service) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithNetwork_configuration_PatchRequestBody_compute_service) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/settings/networkconfigurations/network_configurations_post_request_body_escaped_compute_escaped_service.go b/pkg/github/orgs/item/settings/networkconfigurations/network_configurations_post_request_body_escaped_compute_escaped_service.go new file mode 100644 index 00000000..5ad18879 --- /dev/null +++ b/pkg/github/orgs/item/settings/networkconfigurations/network_configurations_post_request_body_escaped_compute_escaped_service.go @@ -0,0 +1,34 @@ +package networkconfigurations +// The hosted compute service to use for the network configuration. +type NetworkConfigurationsPostRequestBody_compute_service int + +const ( + NONE_NETWORKCONFIGURATIONSPOSTREQUESTBODY_COMPUTE_SERVICE NetworkConfigurationsPostRequestBody_compute_service = iota + ACTIONS_NETWORKCONFIGURATIONSPOSTREQUESTBODY_COMPUTE_SERVICE +) + +func (i NetworkConfigurationsPostRequestBody_compute_service) String() string { + return []string{"none", "actions"}[i] +} +func ParseNetworkConfigurationsPostRequestBody_compute_service(v string) (any, error) { + result := NONE_NETWORKCONFIGURATIONSPOSTREQUESTBODY_COMPUTE_SERVICE + switch v { + case "none": + result = NONE_NETWORKCONFIGURATIONSPOSTREQUESTBODY_COMPUTE_SERVICE + case "actions": + result = ACTIONS_NETWORKCONFIGURATIONSPOSTREQUESTBODY_COMPUTE_SERVICE + default: + return nil, nil + } + return &result, nil +} +func SerializeNetworkConfigurationsPostRequestBody_compute_service(values []NetworkConfigurationsPostRequestBody_compute_service) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i NetworkConfigurationsPostRequestBody_compute_service) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item_dependabot_alerts_request_builder.go b/pkg/github/orgs/item_dependabot_alerts_request_builder.go index 1ca2fdb4..5f371880 100644 --- a/pkg/github/orgs/item_dependabot_alerts_request_builder.go +++ b/pkg/github/orgs/item_dependabot_alerts_request_builder.go @@ -21,6 +21,8 @@ type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { Direction *id5ed4dfa872423f58318ec5274226649a680208c924c0fa4b6e180a4e9175a51.GetDirectionQueryParameterType `uriparametername:"direction"` // A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` Ecosystem *string `uriparametername:"ecosystem"` + // CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:- An exact number (`n`)- Comparators such as `>n`, `=n`, `<=n`- A range like `n..n`, where `n` is a number from 0.0 to 1.0Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned. + Epss_percentage *string `uriparametername:"epss_percentage"` // **Deprecated**. The number of results per page (max 100), starting from the first matching result.This parameter must not be used in combination with `last`.Instead, use `per_page` in combination with `after` to fetch the first page of results. First *int32 `uriparametername:"first"` // **Deprecated**. The number of results per page (max 100), starting from the last matching result.This parameter must not be used in combination with `first`.Instead, use `per_page` in combination with `before` to fetch the last page of results. @@ -41,7 +43,7 @@ type ItemDependabotAlertsRequestBuilderGetQueryParameters struct { // NewItemDependabotAlertsRequestBuilderInternal instantiates a new ItemDependabotAlertsRequestBuilder and sets the default values. func NewItemDependabotAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemDependabotAlertsRequestBuilder) { m := &ItemDependabotAlertsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/alerts{?after*,before*,direction*,ecosystem*,first*,last*,package*,per_page*,scope*,severity*,sort*,state*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,last*,package*,per_page*,scope*,severity*,sort*,state*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_settings_network_configurations_get_response.go b/pkg/github/orgs/item_settings_network_configurations_get_response.go new file mode 100644 index 00000000..d7c82dee --- /dev/null +++ b/pkg/github/orgs/item_settings_network_configurations_get_response.go @@ -0,0 +1,122 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemSettingsNetworkConfigurationsGetResponse 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 network_configurations property + network_configurations []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable + // The total_count property + total_count *int32 +} +// NewItemSettingsNetworkConfigurationsGetResponse instantiates a new ItemSettingsNetworkConfigurationsGetResponse and sets the default values. +func NewItemSettingsNetworkConfigurationsGetResponse()(*ItemSettingsNetworkConfigurationsGetResponse) { + m := &ItemSettingsNetworkConfigurationsGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemSettingsNetworkConfigurationsGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemSettingsNetworkConfigurationsGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemSettingsNetworkConfigurationsGetResponse(), 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 *ItemSettingsNetworkConfigurationsGetResponse) 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 *ItemSettingsNetworkConfigurationsGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["network_configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateNetworkConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable) + } + } + m.SetNetworkConfigurations(res) + } + return nil + } + res["total_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + return res +} +// GetNetworkConfigurations gets the network_configurations property value. The network_configurations property +// returns a []NetworkConfigurationable when successful +func (m *ItemSettingsNetworkConfigurationsGetResponse) GetNetworkConfigurations()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable) { + return m.network_configurations +} +// GetTotalCount gets the total_count property value. The total_count property +// returns a *int32 when successful +func (m *ItemSettingsNetworkConfigurationsGetResponse) GetTotalCount()(*int32) { + return m.total_count +} +// Serialize serializes information the current object +func (m *ItemSettingsNetworkConfigurationsGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetNetworkConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNetworkConfigurations())) + for i, v := range m.GetNetworkConfigurations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("network_configurations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_count", m.GetTotalCount()) + 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 *ItemSettingsNetworkConfigurationsGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetNetworkConfigurations sets the network_configurations property value. The network_configurations property +func (m *ItemSettingsNetworkConfigurationsGetResponse) SetNetworkConfigurations(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable)() { + m.network_configurations = value +} +// SetTotalCount sets the total_count property value. The total_count property +func (m *ItemSettingsNetworkConfigurationsGetResponse) SetTotalCount(value *int32)() { + m.total_count = value +} +type ItemSettingsNetworkConfigurationsGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNetworkConfigurations()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable) + GetTotalCount()(*int32) + SetNetworkConfigurations(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable)() + SetTotalCount(value *int32)() +} diff --git a/pkg/github/orgs/item_settings_network_configurations_post_request_body.go b/pkg/github/orgs/item_settings_network_configurations_post_request_body.go new file mode 100644 index 00000000..ae905c88 --- /dev/null +++ b/pkg/github/orgs/item_settings_network_configurations_post_request_body.go @@ -0,0 +1,115 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemSettingsNetworkConfigurationsPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. + name *string + // The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. + network_settings_ids []string +} +// NewItemSettingsNetworkConfigurationsPostRequestBody instantiates a new ItemSettingsNetworkConfigurationsPostRequestBody and sets the default values. +func NewItemSettingsNetworkConfigurationsPostRequestBody()(*ItemSettingsNetworkConfigurationsPostRequestBody) { + m := &ItemSettingsNetworkConfigurationsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemSettingsNetworkConfigurationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemSettingsNetworkConfigurationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemSettingsNetworkConfigurationsPostRequestBody(), 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 *ItemSettingsNetworkConfigurationsPostRequestBody) 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 *ItemSettingsNetworkConfigurationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["network_settings_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetNetworkSettingsIds(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +// returns a *string when successful +func (m *ItemSettingsNetworkConfigurationsPostRequestBody) GetName()(*string) { + return m.name +} +// GetNetworkSettingsIds gets the network_settings_ids property value. The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. +// returns a []string when successful +func (m *ItemSettingsNetworkConfigurationsPostRequestBody) GetNetworkSettingsIds()([]string) { + return m.network_settings_ids +} +// Serialize serializes information the current object +func (m *ItemSettingsNetworkConfigurationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetNetworkSettingsIds() != nil { + err := writer.WriteCollectionOfStringValues("network_settings_ids", m.GetNetworkSettingsIds()) + 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 *ItemSettingsNetworkConfigurationsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetName sets the name property value. Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +func (m *ItemSettingsNetworkConfigurationsPostRequestBody) SetName(value *string)() { + m.name = value +} +// SetNetworkSettingsIds sets the network_settings_ids property value. The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. +func (m *ItemSettingsNetworkConfigurationsPostRequestBody) SetNetworkSettingsIds(value []string)() { + m.network_settings_ids = value +} +type ItemSettingsNetworkConfigurationsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetNetworkSettingsIds()([]string) + SetName(value *string)() + SetNetworkSettingsIds(value []string)() +} diff --git a/pkg/github/orgs/item_settings_network_configurations_request_builder.go b/pkg/github/orgs/item_settings_network_configurations_request_builder.go new file mode 100644 index 00000000..98d1b4cd --- /dev/null +++ b/pkg/github/orgs/item_settings_network_configurations_request_builder.go @@ -0,0 +1,107 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemSettingsNetworkConfigurationsRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\network-configurations +type ItemSettingsNetworkConfigurationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSettingsNetworkConfigurationsRequestBuilderGetQueryParameters lists all hosted compute network configurations configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. +type ItemSettingsNetworkConfigurationsRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByNetwork_configuration_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.settings.networkConfigurations.item collection +// returns a *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder when successful +func (m *ItemSettingsNetworkConfigurationsRequestBuilder) ByNetwork_configuration_id(network_configuration_id string)(*ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if network_configuration_id != "" { + urlTplParams["network_configuration_id"] = network_configuration_id + } + return NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsNetworkConfigurationsRequestBuilderInternal instantiates a new ItemSettingsNetworkConfigurationsRequestBuilder and sets the default values. +func NewItemSettingsNetworkConfigurationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkConfigurationsRequestBuilder) { + m := &ItemSettingsNetworkConfigurationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-configurations{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemSettingsNetworkConfigurationsRequestBuilder instantiates a new ItemSettingsNetworkConfigurationsRequestBuilder and sets the default values. +func NewItemSettingsNetworkConfigurationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkConfigurationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsNetworkConfigurationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists all hosted compute network configurations configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. +// returns a ItemSettingsNetworkConfigurationsGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#list-hosted-compute-network-configurations-for-an-organization +func (m *ItemSettingsNetworkConfigurationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsNetworkConfigurationsRequestBuilderGetQueryParameters])(ItemSettingsNetworkConfigurationsGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemSettingsNetworkConfigurationsGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemSettingsNetworkConfigurationsGetResponseable), nil +} +// Post creates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. +// returns a NetworkConfigurationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#create-a-hosted-compute-network-configuration-for-an-organization +func (m *ItemSettingsNetworkConfigurationsRequestBuilder) Post(ctx context.Context, body ItemSettingsNetworkConfigurationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateNetworkConfigurationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable), nil +} +// ToGetRequestInformation lists all hosted compute network configurations configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsNetworkConfigurationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsNetworkConfigurationsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation creates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsNetworkConfigurationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemSettingsNetworkConfigurationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsNetworkConfigurationsRequestBuilder when successful +func (m *ItemSettingsNetworkConfigurationsRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsNetworkConfigurationsRequestBuilder) { + return NewItemSettingsNetworkConfigurationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go b/pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go new file mode 100644 index 00000000..a1ac3e1d --- /dev/null +++ b/pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go @@ -0,0 +1,110 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\network-configurations\{network_configuration_id} +type ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilderInternal instantiates a new ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder and sets the default values. +func NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) { + m := &ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-configurations/{network_configuration_id}", pathParameters), + } + return m +} +// NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder instantiates a new ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder and sets the default values. +func NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete deletes a hosted compute network configuration from an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#delete-a-hosted-compute-network-configuration-from-an-organization +func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil) + if err != nil { + return err + } + return nil +} +// Get gets a hosted compute network configuration configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. +// returns a NetworkConfigurationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#get-a-hosted-compute-network-configuration-for-an-organization +func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateNetworkConfigurationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable), nil +} +// Patch updates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. +// returns a NetworkConfigurationable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#update-a-hosted-compute-network-configuration-for-an-organization +func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) Patch(ctx context.Context, body ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateNetworkConfigurationFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable), nil +} +// ToDeleteRequestInformation deletes a hosted compute network configuration from an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + return requestInfo, nil +} +// ToGetRequestInformation gets a hosted compute network configuration configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation updates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder when successful +func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) { + return NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_network_settings_request_builder.go b/pkg/github/orgs/item_settings_network_settings_request_builder.go new file mode 100644 index 00000000..d5de84df --- /dev/null +++ b/pkg/github/orgs/item_settings_network_settings_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsNetworkSettingsRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\network-settings +type ItemSettingsNetworkSettingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByNetwork_settings_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.settings.networkSettings.item collection +// returns a *ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder when successful +func (m *ItemSettingsNetworkSettingsRequestBuilder) ByNetwork_settings_id(network_settings_id string)(*ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if network_settings_id != "" { + urlTplParams["network_settings_id"] = network_settings_id + } + return NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsNetworkSettingsRequestBuilderInternal instantiates a new ItemSettingsNetworkSettingsRequestBuilder and sets the default values. +func NewItemSettingsNetworkSettingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkSettingsRequestBuilder) { + m := &ItemSettingsNetworkSettingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-settings", pathParameters), + } + return m +} +// NewItemSettingsNetworkSettingsRequestBuilder instantiates a new ItemSettingsNetworkSettingsRequestBuilder and sets the default values. +func NewItemSettingsNetworkSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkSettingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsNetworkSettingsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go b/pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go new file mode 100644 index 00000000..121b283e --- /dev/null +++ b/pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go @@ -0,0 +1,57 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\settings\network-settings\{network_settings_id} +type ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilderInternal instantiates a new ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder and sets the default values. +func NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) { + m := &ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-settings/{network_settings_id}", pathParameters), + } + return m +} +// NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder instantiates a new ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder and sets the default values. +func NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a hosted compute network settings resource configured for an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. +// returns a NetworkSettingsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#get-a-hosted-compute-network-settings-resource-for-an-organization +func (m *ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkSettingsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateNetworkSettingsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkSettingsable), nil +} +// ToGetRequestInformation gets a hosted compute network settings resource configured for an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder when successful +func (m *ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) { + return NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_settings_request_builder.go b/pkg/github/orgs/item_settings_request_builder.go index 8939a225..16dcf7b9 100644 --- a/pkg/github/orgs/item_settings_request_builder.go +++ b/pkg/github/orgs/item_settings_request_builder.go @@ -26,3 +26,13 @@ func NewItemSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewItemSettingsRequestBuilderInternal(urlParams, requestAdapter) } +// NetworkConfigurations the networkConfigurations property +// returns a *ItemSettingsNetworkConfigurationsRequestBuilder when successful +func (m *ItemSettingsRequestBuilder) NetworkConfigurations()(*ItemSettingsNetworkConfigurationsRequestBuilder) { + return NewItemSettingsNetworkConfigurationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NetworkSettings the networkSettings property +// returns a *ItemSettingsNetworkSettingsRequestBuilder when successful +func (m *ItemSettingsRequestBuilder) NetworkSettings()(*ItemSettingsNetworkSettingsRequestBuilder) { + return NewItemSettingsNetworkSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_dependabot_alerts_request_builder.go b/pkg/github/repos/item_item_dependabot_alerts_request_builder.go index 7e69ca9c..abe93768 100644 --- a/pkg/github/repos/item_item_dependabot_alerts_request_builder.go +++ b/pkg/github/repos/item_item_dependabot_alerts_request_builder.go @@ -22,6 +22,8 @@ type ItemItemDependabotAlertsRequestBuilderGetQueryParameters struct { Direction *i4239b9a99f590fb557f6cee5c0b7a464cc1a12da753e0582e737b6a06899504e.GetDirectionQueryParameterType `uriparametername:"direction"` // A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` Ecosystem *string `uriparametername:"ecosystem"` + // CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:- An exact number (`n`)- Comparators such as `>n`, `=n`, `<=n`- A range like `n..n`, where `n` is a number from 0.0 to 1.0Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned. + Epss_percentage *string `uriparametername:"epss_percentage"` // **Deprecated**. The number of results per page (max 100), starting from the first matching result.This parameter must not be used in combination with `last`.Instead, use `per_page` in combination with `after` to fetch the first page of results. First *int32 `uriparametername:"first"` // **Deprecated**. The number of results per page (max 100), starting from the last matching result.This parameter must not be used in combination with `first`.Instead, use `per_page` in combination with `before` to fetch the last page of results. @@ -58,7 +60,7 @@ func (m *ItemItemDependabotAlertsRequestBuilder) ByAlert_number(alert_number int // NewItemItemDependabotAlertsRequestBuilderInternal instantiates a new ItemItemDependabotAlertsRequestBuilder and sets the default values. func NewItemItemDependabotAlertsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemDependabotAlertsRequestBuilder) { m := &ItemItemDependabotAlertsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts{?after*,before*,direction*,ecosystem*,first*,last*,manifest*,package*,page*,per_page*,scope*,severity*,sort*,state*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,last*,manifest*,package*,page*,per_page*,scope*,severity*,sort*,state*}", pathParameters), } return m } diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go index f0d3875b..5b2e5aec 100644 --- a/pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go @@ -7,7 +7,7 @@ import ( type ItemItemIssuesItemSub_issueDeleteRequestBody 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 sub-issue to remove + // The id of the sub-issue to remove sub_issue_id *int32 } // NewItemItemIssuesItemSub_issueDeleteRequestBody instantiates a new ItemItemIssuesItemSub_issueDeleteRequestBody and sets the default values. @@ -43,7 +43,7 @@ func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) GetFieldDeserializers()(m } return res } -// GetSubIssueId gets the sub_issue_id property value. The sub-issue to remove +// GetSubIssueId gets the sub_issue_id property value. The id of the sub-issue to remove // returns a *int32 when successful func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) GetSubIssueId()(*int32) { return m.sub_issue_id @@ -68,7 +68,7 @@ func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) Serialize(writer i878a80d func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetSubIssueId sets the sub_issue_id property value. The sub-issue to remove +// SetSubIssueId sets the sub_issue_id property value. The id of the sub-issue to remove func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) SetSubIssueId(value *int32)() { m.sub_issue_id = value } diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go index 0bae5fe1..c17ff1f9 100644 --- a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go @@ -9,7 +9,7 @@ type ItemItemIssuesItemSub_issuesPostRequestBody struct { additionalData map[string]any // Option that, when true, instructs the operation to replace the sub-issues current parent issue replace_parent *bool - // The sub-issue to add + // The id of the sub-issue to add. The sub-issue must belong to the same repository as the parent issue sub_issue_id *int32 } // NewItemItemIssuesItemSub_issuesPostRequestBody instantiates a new ItemItemIssuesItemSub_issuesPostRequestBody and sets the default values. @@ -60,7 +60,7 @@ func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetFieldDeserializers()(ma func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetReplaceParent()(*bool) { return m.replace_parent } -// GetSubIssueId gets the sub_issue_id property value. The sub-issue to add +// GetSubIssueId gets the sub_issue_id property value. The id of the sub-issue to add. The sub-issue must belong to the same repository as the parent issue // returns a *int32 when successful func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetSubIssueId()(*int32) { return m.sub_issue_id @@ -95,7 +95,7 @@ func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetAdditionalData(value ma func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetReplaceParent(value *bool)() { m.replace_parent = value } -// SetSubIssueId sets the sub_issue_id property value. The sub-issue to add +// SetSubIssueId sets the sub_issue_id property value. The id of the sub-issue to add. The sub-issue must belong to the same repository as the parent issue func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetSubIssueId(value *int32)() { m.sub_issue_id = value } From b557b2ba8e6a3875670b6d8037cfa40a512767ca Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 25 Jan 2025 00:09:09 +0000 Subject: [PATCH 10/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- .../dependabot_alert_security_advisory.go | 23 +++++++++++++ pkg/github/models/global_advisory.go | 28 +++++++--------- ...aped_epss.go => security_advisory_epss.go} | 33 ++++++++++--------- ..._network_configurations_request_builder.go | 4 +-- ...figuration_escaped_item_request_builder.go | 6 ++-- ...d_settings_escaped_item_request_builder.go | 2 +- 7 files changed, 58 insertions(+), 40 deletions(-) rename pkg/github/models/{global_advisory_escaped_epss.go => security_advisory_epss.go} (68%) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 167a01e6..be863213 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "10BD1E61E20F70F5BC4F47013FDDDB4FCC8FAA527DC4625CEFB906C01509A8EF6C4218808978E54E9F68A1CD4444F929ABA26AA0376D780F8EBD1D0C19013721", + "descriptionHash": "9314B3C73BC6A84364C771DC58616CEB1477AA0B63FE7E60B33CB5E9654FFF508F4F07D82D3339A176A68425383C9D18D39EAFB8D0F18F2A0CBAF16090D868EB", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/dependabot_alert_security_advisory.go b/pkg/github/models/dependabot_alert_security_advisory.go index 0c62becb..da401c3a 100644 --- a/pkg/github/models/dependabot_alert_security_advisory.go +++ b/pkg/github/models/dependabot_alert_security_advisory.go @@ -17,6 +17,8 @@ type DependabotAlertSecurityAdvisory struct { cwes []DependabotAlertSecurityAdvisory_cwesable // A long-form Markdown-supported description of the advisory. description *string + // The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). + epss SecurityAdvisoryEpssable // The unique GitHub Security Advisory ID assigned to the advisory. ghsa_id *string // Values that identify this advisory among security information sources. @@ -72,6 +74,11 @@ func (m *DependabotAlertSecurityAdvisory) GetCwes()([]DependabotAlertSecurityAdv func (m *DependabotAlertSecurityAdvisory) GetDescription()(*string) { return m.description } +// GetEpss gets the epss property value. The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). +// returns a SecurityAdvisoryEpssable when successful +func (m *DependabotAlertSecurityAdvisory) GetEpss()(SecurityAdvisoryEpssable) { + return m.epss +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DependabotAlertSecurityAdvisory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -132,6 +139,16 @@ func (m *DependabotAlertSecurityAdvisory) GetFieldDeserializers()(map[string]fun } return nil } + res["epss"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityAdvisoryEpssFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEpss(val.(SecurityAdvisoryEpssable)) + } + return nil + } res["ghsa_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -317,6 +334,10 @@ func (m *DependabotAlertSecurityAdvisory) SetCwes(value []DependabotAlertSecurit func (m *DependabotAlertSecurityAdvisory) SetDescription(value *string)() { m.description = value } +// SetEpss sets the epss property value. The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). +func (m *DependabotAlertSecurityAdvisory) SetEpss(value SecurityAdvisoryEpssable)() { + m.epss = value +} // SetGhsaId sets the ghsa_id property value. The unique GitHub Security Advisory ID assigned to the advisory. func (m *DependabotAlertSecurityAdvisory) SetGhsaId(value *string)() { m.ghsa_id = value @@ -360,6 +381,7 @@ type DependabotAlertSecurityAdvisoryable interface { GetCvssSeverities()(CvssSeveritiesable) GetCwes()([]DependabotAlertSecurityAdvisory_cwesable) GetDescription()(*string) + GetEpss()(SecurityAdvisoryEpssable) GetGhsaId()(*string) GetIdentifiers()([]DependabotAlertSecurityAdvisory_identifiersable) GetPublishedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -374,6 +396,7 @@ type DependabotAlertSecurityAdvisoryable interface { SetCvssSeverities(value CvssSeveritiesable)() SetCwes(value []DependabotAlertSecurityAdvisory_cwesable)() SetDescription(value *string)() + SetEpss(value SecurityAdvisoryEpssable)() SetGhsaId(value *string)() SetIdentifiers(value []DependabotAlertSecurityAdvisory_identifiersable)() SetPublishedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/global_advisory.go b/pkg/github/models/global_advisory.go index 03e2066c..ba78968f 100644 --- a/pkg/github/models/global_advisory.go +++ b/pkg/github/models/global_advisory.go @@ -19,8 +19,8 @@ type GlobalAdvisory struct { cwes []GlobalAdvisory_cwesable // A detailed description of what the advisory entails. description *string - // The epss property - epss GlobalAdvisory_epssable + // The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). + epss SecurityAdvisoryEpssable // The GitHub Security Advisory ID. ghsa_id *string // The date and time of when the advisory was reviewed by GitHub, in ISO 8601 format. @@ -95,9 +95,9 @@ func (m *GlobalAdvisory) GetCwes()([]GlobalAdvisory_cwesable) { func (m *GlobalAdvisory) GetDescription()(*string) { return m.description } -// GetEpss gets the epss property value. The epss property -// returns a GlobalAdvisory_epssable when successful -func (m *GlobalAdvisory) GetEpss()(GlobalAdvisory_epssable) { +// GetEpss gets the epss property value. The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). +// returns a SecurityAdvisoryEpssable when successful +func (m *GlobalAdvisory) GetEpss()(SecurityAdvisoryEpssable) { return m.epss } // GetFieldDeserializers the deserialization information for the current model @@ -177,12 +177,12 @@ func (m *GlobalAdvisory) GetFieldDeserializers()(map[string]func(i878a80d2330e89 return nil } res["epss"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateGlobalAdvisory_epssFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateSecurityAdvisoryEpssFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetEpss(val.(GlobalAdvisory_epssable)) + m.SetEpss(val.(SecurityAdvisoryEpssable)) } return nil } @@ -478,12 +478,6 @@ func (m *GlobalAdvisory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } - { - err := writer.WriteObjectValue("epss", m.GetEpss()) - if err != nil { - return err - } - } if m.GetReferences() != nil { err := writer.WriteCollectionOfStringValues("references", m.GetReferences()) if err != nil { @@ -547,8 +541,8 @@ func (m *GlobalAdvisory) SetCwes(value []GlobalAdvisory_cwesable)() { func (m *GlobalAdvisory) SetDescription(value *string)() { m.description = value } -// SetEpss sets the epss property value. The epss property -func (m *GlobalAdvisory) SetEpss(value GlobalAdvisory_epssable)() { +// SetEpss sets the epss property value. The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). +func (m *GlobalAdvisory) SetEpss(value SecurityAdvisoryEpssable)() { m.epss = value } // SetGhsaId sets the ghsa_id property value. The GitHub Security Advisory ID. @@ -623,7 +617,7 @@ type GlobalAdvisoryable interface { GetCvssSeverities()(CvssSeveritiesable) GetCwes()([]GlobalAdvisory_cwesable) GetDescription()(*string) - GetEpss()(GlobalAdvisory_epssable) + GetEpss()(SecurityAdvisoryEpssable) GetGhsaId()(*string) GetGithubReviewedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetHtmlUrl()(*string) @@ -646,7 +640,7 @@ type GlobalAdvisoryable interface { SetCvssSeverities(value CvssSeveritiesable)() SetCwes(value []GlobalAdvisory_cwesable)() SetDescription(value *string)() - SetEpss(value GlobalAdvisory_epssable)() + SetEpss(value SecurityAdvisoryEpssable)() SetGhsaId(value *string)() SetGithubReviewedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetHtmlUrl(value *string)() diff --git a/pkg/github/models/global_advisory_escaped_epss.go b/pkg/github/models/security_advisory_epss.go similarity index 68% rename from pkg/github/models/global_advisory_escaped_epss.go rename to pkg/github/models/security_advisory_epss.go index 4203bf3c..36cf86c1 100644 --- a/pkg/github/models/global_advisory_escaped_epss.go +++ b/pkg/github/models/security_advisory_epss.go @@ -4,7 +4,8 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -type GlobalAdvisory_epss struct { +// SecurityAdvisoryEpss the EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). +type SecurityAdvisoryEpss 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 percentage property @@ -12,26 +13,26 @@ type GlobalAdvisory_epss struct { // The percentile property percentile *float64 } -// NewGlobalAdvisory_epss instantiates a new GlobalAdvisory_epss and sets the default values. -func NewGlobalAdvisory_epss()(*GlobalAdvisory_epss) { - m := &GlobalAdvisory_epss{ +// NewSecurityAdvisoryEpss instantiates a new SecurityAdvisoryEpss and sets the default values. +func NewSecurityAdvisoryEpss()(*SecurityAdvisoryEpss) { + m := &SecurityAdvisoryEpss{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateGlobalAdvisory_epssFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateSecurityAdvisoryEpssFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateGlobalAdvisory_epssFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewGlobalAdvisory_epss(), nil +func CreateSecurityAdvisoryEpssFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAdvisoryEpss(), 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 *GlobalAdvisory_epss) GetAdditionalData()(map[string]any) { +func (m *SecurityAdvisoryEpss) 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 *GlobalAdvisory_epss) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *SecurityAdvisoryEpss) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["percentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetFloat64Value() @@ -57,16 +58,16 @@ func (m *GlobalAdvisory_epss) GetFieldDeserializers()(map[string]func(i878a80d23 } // GetPercentage gets the percentage property value. The percentage property // returns a *float64 when successful -func (m *GlobalAdvisory_epss) GetPercentage()(*float64) { +func (m *SecurityAdvisoryEpss) GetPercentage()(*float64) { return m.percentage } // GetPercentile gets the percentile property value. The percentile property // returns a *float64 when successful -func (m *GlobalAdvisory_epss) GetPercentile()(*float64) { +func (m *SecurityAdvisoryEpss) GetPercentile()(*float64) { return m.percentile } // Serialize serializes information the current object -func (m *GlobalAdvisory_epss) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *SecurityAdvisoryEpss) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { err := writer.WriteFloat64Value("percentage", m.GetPercentage()) if err != nil { @@ -88,18 +89,18 @@ func (m *GlobalAdvisory_epss) Serialize(writer i878a80d2330e89d26896388a3f487eef 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 *GlobalAdvisory_epss) SetAdditionalData(value map[string]any)() { +func (m *SecurityAdvisoryEpss) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetPercentage sets the percentage property value. The percentage property -func (m *GlobalAdvisory_epss) SetPercentage(value *float64)() { +func (m *SecurityAdvisoryEpss) SetPercentage(value *float64)() { m.percentage = value } // SetPercentile sets the percentile property value. The percentile property -func (m *GlobalAdvisory_epss) SetPercentile(value *float64)() { +func (m *SecurityAdvisoryEpss) SetPercentile(value *float64)() { m.percentile = value } -type GlobalAdvisory_epssable interface { +type SecurityAdvisoryEpssable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetPercentage()(*float64) diff --git a/pkg/github/orgs/item_settings_network_configurations_request_builder.go b/pkg/github/orgs/item_settings_network_configurations_request_builder.go index 98d1b4cd..7572dadc 100644 --- a/pkg/github/orgs/item_settings_network_configurations_request_builder.go +++ b/pkg/github/orgs/item_settings_network_configurations_request_builder.go @@ -46,7 +46,7 @@ func NewItemSettingsNetworkConfigurationsRequestBuilder(rawUrl string, requestAd // returns a ItemSettingsNetworkConfigurationsGetResponseable when successful // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#list-hosted-compute-network-configurations-for-an-organization +// [API method documentation]: https://docs.github.com/rest/orgs/network-configurations#list-hosted-compute-network-configurations-for-an-organization func (m *ItemSettingsNetworkConfigurationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsNetworkConfigurationsRequestBuilderGetQueryParameters])(ItemSettingsNetworkConfigurationsGetResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -65,7 +65,7 @@ func (m *ItemSettingsNetworkConfigurationsRequestBuilder) Get(ctx context.Contex // returns a NetworkConfigurationable when successful // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#create-a-hosted-compute-network-configuration-for-an-organization +// [API method documentation]: https://docs.github.com/rest/orgs/network-configurations#create-a-hosted-compute-network-configuration-for-an-organization func (m *ItemSettingsNetworkConfigurationsRequestBuilder) Post(ctx context.Context, body ItemSettingsNetworkConfigurationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { diff --git a/pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go b/pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go index a1ac3e1d..0a677a80 100644 --- a/pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_settings_network_configurations_with_network_escaped_configuration_escaped_item_request_builder.go @@ -26,7 +26,7 @@ func NewItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBu // Delete deletes a hosted compute network configuration from an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#delete-a-hosted-compute-network-configuration-from-an-organization +// [API method documentation]: https://docs.github.com/rest/orgs/network-configurations#delete-a-hosted-compute-network-configuration-from-an-organization func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -42,7 +42,7 @@ func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestB // returns a NetworkConfigurationable when successful // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#get-a-hosted-compute-network-configuration-for-an-organization +// [API method documentation]: https://docs.github.com/rest/orgs/network-configurations#get-a-hosted-compute-network-configuration-for-an-organization func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -61,7 +61,7 @@ func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestB // returns a NetworkConfigurationable when successful // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#update-a-hosted-compute-network-configuration-for-an-organization +// [API method documentation]: https://docs.github.com/rest/orgs/network-configurations#update-a-hosted-compute-network-configuration-for-an-organization func (m *ItemSettingsNetworkConfigurationsWithNetwork_configuration_ItemRequestBuilder) Patch(ctx context.Context, body ItemSettingsNetworkConfigurationsItemWithNetwork_configuration_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkConfigurationable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { diff --git a/pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go b/pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go index 121b283e..b28b16ab 100644 --- a/pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_settings_network_settings_with_network_escaped_settings_escaped_item_request_builder.go @@ -27,7 +27,7 @@ func NewItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder(rawUr // returns a NetworkSettingsable when successful // [API method documentation] // -// [API method documentation]: https://docs.github.com/rest/settings/network-configurations#get-a-hosted-compute-network-settings-resource-for-an-organization +// [API method documentation]: https://docs.github.com/rest/orgs/network-configurations#get-a-hosted-compute-network-settings-resource-for-an-organization func (m *ItemSettingsNetworkSettingsWithNetwork_settings_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NetworkSettingsable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { From 63a010095770855c00727adfc21ae7c4072efbf7 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 28 Jan 2025 00:09:34 +0000 Subject: [PATCH 11/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/copilot_dotcom_chat.go | 2 +- pkg/github/models/copilot_usage_metrics_day.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index be863213..c34412ab 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "9314B3C73BC6A84364C771DC58616CEB1477AA0B63FE7E60B33CB5E9654FFF508F4F07D82D3339A176A68425383C9D18D39EAFB8D0F18F2A0CBAF16090D868EB", + "descriptionHash": "B508ABF346C2C18D16F9BFC9395F40F2C51625A09E837C8C786BE5307A451ECF604B86D26EB89F04305FCD1A51029384765BC001C78BA24635A66DFC0F2C11E3", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/copilot_dotcom_chat.go b/pkg/github/models/copilot_dotcom_chat.go index 5c81fe47..8d3428dd 100644 --- a/pkg/github/models/copilot_dotcom_chat.go +++ b/pkg/github/models/copilot_dotcom_chat.go @@ -4,7 +4,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CopilotDotcomChat usage metrics for Copilot Chat in github.com +// CopilotDotcomChat usage metrics for Copilot Chat in GitHub.com type CopilotDotcomChat struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any diff --git a/pkg/github/models/copilot_usage_metrics_day.go b/pkg/github/models/copilot_usage_metrics_day.go index 55c181d8..77a4e9fd 100644 --- a/pkg/github/models/copilot_usage_metrics_day.go +++ b/pkg/github/models/copilot_usage_metrics_day.go @@ -8,7 +8,7 @@ import ( type CopilotUsageMetricsDay struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // Usage metrics for Copilot Chat in github.com + // Usage metrics for Copilot Chat in GitHub.com copilot_dotcom_chat CopilotDotcomChatable // Usage metrics for Copilot for pull requests. copilot_dotcom_pull_requests CopilotDotcomPullRequestsable @@ -40,7 +40,7 @@ func CreateCopilotUsageMetricsDayFromDiscriminatorValue(parseNode i878a80d2330e8 func (m *CopilotUsageMetricsDay) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetCopilotDotcomChat gets the copilot_dotcom_chat property value. Usage metrics for Copilot Chat in github.com +// GetCopilotDotcomChat gets the copilot_dotcom_chat property value. Usage metrics for Copilot Chat in GitHub.com // returns a CopilotDotcomChatable when successful func (m *CopilotUsageMetricsDay) GetCopilotDotcomChat()(CopilotDotcomChatable) { return m.copilot_dotcom_chat @@ -207,7 +207,7 @@ func (m *CopilotUsageMetricsDay) Serialize(writer i878a80d2330e89d26896388a3f487 func (m *CopilotUsageMetricsDay) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetCopilotDotcomChat sets the copilot_dotcom_chat property value. Usage metrics for Copilot Chat in github.com +// SetCopilotDotcomChat sets the copilot_dotcom_chat property value. Usage metrics for Copilot Chat in GitHub.com func (m *CopilotUsageMetricsDay) SetCopilotDotcomChat(value CopilotDotcomChatable)() { m.copilot_dotcom_chat = value } From f86ce38ca62de61f7d8eabd9b892d510b7d8b325 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 31 Jan 2025 00:09:31 +0000 Subject: [PATCH 12/25] New updates to generated code --- .../attach_post_request_body_escaped_scope.go | 2 +- pkg/github/kiota-lock.json | 2 +- .../orgs/item_projects_request_builder.go | 15 ++++++++++----- ...olumns_cards_item_moves_request_builder.go | 6 +++++- .../projects/columns_cards_request_builder.go | 1 + ..._with_card_escaped_item_request_builder.go | 18 +++++++++++++----- .../columns_item_cards_request_builder.go | 14 ++++++++++---- .../columns_item_moves_request_builder.go | 6 +++++- .../projects/columns_request_builder.go | 1 + ...ith_column_escaped_item_request_builder.go | 18 +++++++++++++----- ...orators_item_permission_request_builder.go | 7 +++++-- .../item_collaborators_request_builder.go | 10 +++++++--- ...tors_with_username_item_request_builder.go | 13 +++++++++---- .../projects/item_columns_request_builder.go | 15 ++++++++++----- .../projects/projects_request_builder.go | 1 + ...th_project_escaped_item_request_builder.go | 19 +++++++++++++------ .../item_item_projects_request_builder.go | 15 ++++++++++----- pkg/github/user/projects_request_builder.go | 7 +++++-- .../users/item_projects_request_builder.go | 9 ++++++--- 19 files changed, 126 insertions(+), 53 deletions(-) diff --git a/pkg/github/enterprises/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go b/pkg/github/enterprises/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go index 74549665..f5119733 100644 --- a/pkg/github/enterprises/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go +++ b/pkg/github/enterprises/item/codesecurity/configurations/item/attach/attach_post_request_body_escaped_scope.go @@ -1,5 +1,5 @@ package attach -// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` +// The type of repositories to attach the configuration to. type AttachPostRequestBody_scope int const ( diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index c34412ab..a87c497a 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "B508ABF346C2C18D16F9BFC9395F40F2C51625A09E837C8C786BE5307A451ECF604B86D26EB89F04305FCD1A51029384765BC001C78BA24635A66DFC0F2C11E3", + "descriptionHash": "C0322B9A5712D23AD427C58567C214F7D23FF8BC66D5FD02E6ACECB81F3C8FCE1319279891223F13E00A2EBEA5C6037B05BF5BCA20D8C6C6502D61330B6994A6", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/orgs/item_projects_request_builder.go b/pkg/github/orgs/item_projects_request_builder.go index 009de45e..7c295a68 100644 --- a/pkg/github/orgs/item_projects_request_builder.go +++ b/pkg/github/orgs/item_projects_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemProjectsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemProjectsRequestBuilderGetQueryParameters lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ItemProjectsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ItemProjectsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -33,7 +33,8 @@ func NewItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewItemProjectsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a []Projectable when successful // returns a ValidationErrorSimple error when the service returns a 422 status code // [API method documentation] @@ -59,7 +60,8 @@ func (m *ItemProjectsRequestBuilder) Get(ctx context.Context, requestConfigurati } return val, nil } -// Post creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// Post > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a Projectable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -90,7 +92,8 @@ func (m *ItemProjectsRequestBuilder) Post(ctx context.Context, body ItemProjects } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Projectable), nil } -// ToGetRequestInformation lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -98,7 +101,8 @@ func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ToPostRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -111,6 +115,7 @@ func (m *ItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Contex return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemProjectsRequestBuilder when successful func (m *ItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemProjectsRequestBuilder) { return NewItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/columns_cards_item_moves_request_builder.go b/pkg/github/projects/columns_cards_item_moves_request_builder.go index 44658fc5..240f8e53 100644 --- a/pkg/github/projects/columns_cards_item_moves_request_builder.go +++ b/pkg/github/projects/columns_cards_item_moves_request_builder.go @@ -23,7 +23,8 @@ func NewColumnsCardsItemMovesRequestBuilder(rawUrl string, requestAdapter i2ae41 urlParams["request-raw-url"] = rawUrl return NewColumnsCardsItemMovesRequestBuilderInternal(urlParams, requestAdapter) } -// Post move a project card +// Post > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ColumnsCardsItemMovesPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a ColumnsCardsItemMoves403Error error when the service returns a 403 status code @@ -52,6 +53,8 @@ func (m *ColumnsCardsItemMovesRequestBuilder) Post(ctx context.Context, body Col } return res.(ColumnsCardsItemMovesPostResponseable), nil } +// ToPostRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsCardsItemMovesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ColumnsCardsItemMovesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -64,6 +67,7 @@ func (m *ColumnsCardsItemMovesRequestBuilder) ToPostRequestInformation(ctx conte return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ColumnsCardsItemMovesRequestBuilder when successful func (m *ColumnsCardsItemMovesRequestBuilder) WithUrl(rawUrl string)(*ColumnsCardsItemMovesRequestBuilder) { return NewColumnsCardsItemMovesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/columns_cards_request_builder.go b/pkg/github/projects/columns_cards_request_builder.go index af3db5a2..41fc7b8f 100644 --- a/pkg/github/projects/columns_cards_request_builder.go +++ b/pkg/github/projects/columns_cards_request_builder.go @@ -10,6 +10,7 @@ type ColumnsCardsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } // ByCard_id gets an item from the github.com/octokit/go-sdk/pkg/github.projects.columns.cards.item collection +// Deprecated: // returns a *ColumnsCardsWithCard_ItemRequestBuilder when successful func (m *ColumnsCardsRequestBuilder) ByCard_id(card_id int32)(*ColumnsCardsWithCard_ItemRequestBuilder) { urlTplParams := make(map[string]string) diff --git a/pkg/github/projects/columns_cards_with_card_escaped_item_request_builder.go b/pkg/github/projects/columns_cards_with_card_escaped_item_request_builder.go index 6ee3a363..33e24598 100644 --- a/pkg/github/projects/columns_cards_with_card_escaped_item_request_builder.go +++ b/pkg/github/projects/columns_cards_with_card_escaped_item_request_builder.go @@ -23,7 +23,8 @@ func NewColumnsCardsWithCard_ItemRequestBuilder(rawUrl string, requestAdapter i2 urlParams["request-raw-url"] = rawUrl return NewColumnsCardsWithCard_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a project card +// Delete > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a BasicError error when the service returns a 401 status code // returns a ColumnsCardsItemWithCard_403Error error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +47,8 @@ func (m *ColumnsCardsWithCard_ItemRequestBuilder) Delete(ctx context.Context, re } return nil } -// Get gets information about a project card. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ProjectCardable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -78,7 +80,8 @@ func (m *ColumnsCardsWithCard_ItemRequestBuilder) Get(ctx context.Context, reque func (m *ColumnsCardsWithCard_ItemRequestBuilder) Moves()(*ColumnsCardsItemMovesRequestBuilder) { return NewColumnsCardsItemMovesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch update an existing project card +// Patch > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ProjectCardable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -107,7 +110,8 @@ func (m *ColumnsCardsWithCard_ItemRequestBuilder) Patch(ctx context.Context, bod } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ProjectCardable), nil } -// ToDeleteRequestInformation deletes a project card +// ToDeleteRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -115,7 +119,8 @@ func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToDeleteRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets information about a project card. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -123,6 +128,8 @@ func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToGetRequestInformation(ctx co requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } +// ToPatchRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ColumnsCardsItemWithCard_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -135,6 +142,7 @@ func (m *ColumnsCardsWithCard_ItemRequestBuilder) ToPatchRequestInformation(ctx return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ColumnsCardsWithCard_ItemRequestBuilder when successful func (m *ColumnsCardsWithCard_ItemRequestBuilder) WithUrl(rawUrl string)(*ColumnsCardsWithCard_ItemRequestBuilder) { return NewColumnsCardsWithCard_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/columns_item_cards_request_builder.go b/pkg/github/projects/columns_item_cards_request_builder.go index 97fa2daa..216fc55d 100644 --- a/pkg/github/projects/columns_item_cards_request_builder.go +++ b/pkg/github/projects/columns_item_cards_request_builder.go @@ -120,7 +120,7 @@ func (m *CardsPostRequestBody) SetColumnsItemCardsPostRequestBodyMember1(value C func (m *CardsPostRequestBody) SetColumnsItemCardsPostRequestBodyMember2(value ColumnsItemCardsPostRequestBodyMember2able)() { m.columnsItemCardsPostRequestBodyMember2 = value } -// ColumnsItemCardsRequestBuilderGetQueryParameters lists the project cards in a project. +// ColumnsItemCardsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ColumnsItemCardsRequestBuilderGetQueryParameters struct { // Filters the project cards that are returned by the card's state. Archived_state *iaecb1d9ce8f039d73681b50025b6b1a10860720b981e5b38dba5e4bcaf58ea7c.GetArchived_stateQueryParameterType `uriparametername:"archived_state"` @@ -153,7 +153,8 @@ func NewColumnsItemCardsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewColumnsItemCardsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the project cards in a project. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a []ProjectCardable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -181,7 +182,8 @@ func (m *ColumnsItemCardsRequestBuilder) Get(ctx context.Context, requestConfigu } return val, nil } -// Post create a project card +// Post > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ProjectCardable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -208,7 +210,8 @@ func (m *ColumnsItemCardsRequestBuilder) Post(ctx context.Context, body CardsPos } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ProjectCardable), nil } -// ToGetRequestInformation lists the project cards in a project. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsItemCardsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ColumnsItemCardsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -216,6 +219,8 @@ func (m *ColumnsItemCardsRequestBuilder) ToGetRequestInformation(ctx context.Con requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } +// ToPostRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsItemCardsRequestBuilder) ToPostRequestInformation(ctx context.Context, body CardsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -228,6 +233,7 @@ func (m *ColumnsItemCardsRequestBuilder) ToPostRequestInformation(ctx context.Co return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ColumnsItemCardsRequestBuilder when successful func (m *ColumnsItemCardsRequestBuilder) WithUrl(rawUrl string)(*ColumnsItemCardsRequestBuilder) { return NewColumnsItemCardsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/columns_item_moves_request_builder.go b/pkg/github/projects/columns_item_moves_request_builder.go index b9e14527..423b4e38 100644 --- a/pkg/github/projects/columns_item_moves_request_builder.go +++ b/pkg/github/projects/columns_item_moves_request_builder.go @@ -23,7 +23,8 @@ func NewColumnsItemMovesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewColumnsItemMovesRequestBuilderInternal(urlParams, requestAdapter) } -// Post move a project column +// Post > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ColumnsItemMovesPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -50,6 +51,8 @@ func (m *ColumnsItemMovesRequestBuilder) Post(ctx context.Context, body ColumnsI } return res.(ColumnsItemMovesPostResponseable), nil } +// ToPostRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsItemMovesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ColumnsItemMovesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -62,6 +65,7 @@ func (m *ColumnsItemMovesRequestBuilder) ToPostRequestInformation(ctx context.Co return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ColumnsItemMovesRequestBuilder when successful func (m *ColumnsItemMovesRequestBuilder) WithUrl(rawUrl string)(*ColumnsItemMovesRequestBuilder) { return NewColumnsItemMovesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/columns_request_builder.go b/pkg/github/projects/columns_request_builder.go index 0cc311c6..830799f3 100644 --- a/pkg/github/projects/columns_request_builder.go +++ b/pkg/github/projects/columns_request_builder.go @@ -10,6 +10,7 @@ type ColumnsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } // ByColumn_id gets an item from the github.com/octokit/go-sdk/pkg/github.projects.columns.item collection +// Deprecated: // returns a *ColumnsWithColumn_ItemRequestBuilder when successful func (m *ColumnsRequestBuilder) ByColumn_id(column_id int32)(*ColumnsWithColumn_ItemRequestBuilder) { urlTplParams := make(map[string]string) diff --git a/pkg/github/projects/columns_with_column_escaped_item_request_builder.go b/pkg/github/projects/columns_with_column_escaped_item_request_builder.go index 87642e9a..c01d68d7 100644 --- a/pkg/github/projects/columns_with_column_escaped_item_request_builder.go +++ b/pkg/github/projects/columns_with_column_escaped_item_request_builder.go @@ -28,7 +28,8 @@ func NewColumnsWithColumn_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4 urlParams["request-raw-url"] = rawUrl return NewColumnsWithColumn_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a project column. +// Delete > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // [API method documentation] @@ -49,7 +50,8 @@ func (m *ColumnsWithColumn_ItemRequestBuilder) Delete(ctx context.Context, reque } return nil } -// Get gets information about a project column. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ProjectColumnable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -81,7 +83,8 @@ func (m *ColumnsWithColumn_ItemRequestBuilder) Get(ctx context.Context, requestC func (m *ColumnsWithColumn_ItemRequestBuilder) Moves()(*ColumnsItemMovesRequestBuilder) { return NewColumnsItemMovesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch update an existing project column +// Patch > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ProjectColumnable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -106,7 +109,8 @@ func (m *ColumnsWithColumn_ItemRequestBuilder) Patch(ctx context.Context, body C } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ProjectColumnable), nil } -// ToDeleteRequestInformation deletes a project column. +// ToDeleteRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsWithColumn_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -114,7 +118,8 @@ func (m *ColumnsWithColumn_ItemRequestBuilder) ToDeleteRequestInformation(ctx co requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets information about a project column. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsWithColumn_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -122,6 +127,8 @@ func (m *ColumnsWithColumn_ItemRequestBuilder) ToGetRequestInformation(ctx conte requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } +// ToPatchRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ColumnsWithColumn_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ColumnsItemWithColumn_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -134,6 +141,7 @@ func (m *ColumnsWithColumn_ItemRequestBuilder) ToPatchRequestInformation(ctx con return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ColumnsWithColumn_ItemRequestBuilder when successful func (m *ColumnsWithColumn_ItemRequestBuilder) WithUrl(rawUrl string)(*ColumnsWithColumn_ItemRequestBuilder) { return NewColumnsWithColumn_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/item_collaborators_item_permission_request_builder.go b/pkg/github/projects/item_collaborators_item_permission_request_builder.go index d67f369b..35857dc7 100644 --- a/pkg/github/projects/item_collaborators_item_permission_request_builder.go +++ b/pkg/github/projects/item_collaborators_item_permission_request_builder.go @@ -23,7 +23,8 @@ func NewItemCollaboratorsItemPermissionRequestBuilder(rawUrl string, requestAdap urlParams["request-raw-url"] = rawUrl return NewItemCollaboratorsItemPermissionRequestBuilderInternal(urlParams, requestAdapter) } -// Get returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ProjectCollaboratorPermissionable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +53,8 @@ func (m *ItemCollaboratorsItemPermissionRequestBuilder) Get(ctx context.Context, } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ProjectCollaboratorPermissionable), nil } -// ToGetRequestInformation returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemCollaboratorsItemPermissionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -61,6 +63,7 @@ func (m *ItemCollaboratorsItemPermissionRequestBuilder) ToGetRequestInformation( return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemCollaboratorsItemPermissionRequestBuilder when successful func (m *ItemCollaboratorsItemPermissionRequestBuilder) WithUrl(rawUrl string)(*ItemCollaboratorsItemPermissionRequestBuilder) { return NewItemCollaboratorsItemPermissionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/item_collaborators_request_builder.go b/pkg/github/projects/item_collaborators_request_builder.go index 06297304..14998279 100644 --- a/pkg/github/projects/item_collaborators_request_builder.go +++ b/pkg/github/projects/item_collaborators_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemCollaboratorsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCollaboratorsRequestBuilderGetQueryParameters lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. +// ItemCollaboratorsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ItemCollaboratorsRequestBuilderGetQueryParameters struct { // Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. Affiliation *i9278c50c134ed2203c081269c8e0d5b023412eaec35c331232e99d24d73fec75.GetAffiliationQueryParameterType `uriparametername:"affiliation"` @@ -21,6 +21,7 @@ type ItemCollaboratorsRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` } // ByUsername gets an item from the github.com/octokit/go-sdk/pkg/github.projects.item.collaborators.item collection +// Deprecated: // returns a *ItemCollaboratorsWithUsernameItemRequestBuilder when successful func (m *ItemCollaboratorsRequestBuilder) ByUsername(username string)(*ItemCollaboratorsWithUsernameItemRequestBuilder) { urlTplParams := make(map[string]string) @@ -45,7 +46,8 @@ func NewItemCollaboratorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7 urlParams["request-raw-url"] = rawUrl return NewItemCollaboratorsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a []SimpleUserable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -77,7 +79,8 @@ func (m *ItemCollaboratorsRequestBuilder) Get(ctx context.Context, requestConfig } return val, nil } -// ToGetRequestInformation lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemCollaboratorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCollaboratorsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -86,6 +89,7 @@ func (m *ItemCollaboratorsRequestBuilder) ToGetRequestInformation(ctx context.Co return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemCollaboratorsRequestBuilder when successful func (m *ItemCollaboratorsRequestBuilder) WithUrl(rawUrl string)(*ItemCollaboratorsRequestBuilder) { return NewItemCollaboratorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/item_collaborators_with_username_item_request_builder.go b/pkg/github/projects/item_collaborators_with_username_item_request_builder.go index f65328ec..8c520998 100644 --- a/pkg/github/projects/item_collaborators_with_username_item_request_builder.go +++ b/pkg/github/projects/item_collaborators_with_username_item_request_builder.go @@ -23,7 +23,8 @@ func NewItemCollaboratorsWithUsernameItemRequestBuilder(rawUrl string, requestAd urlParams["request-raw-url"] = rawUrl return NewItemCollaboratorsWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. +// Delete > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -53,7 +54,8 @@ func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) Delete(ctx context.Con func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) Permission()(*ItemCollaboratorsItemPermissionRequestBuilder) { return NewItemCollaboratorsItemPermissionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Put adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. +// Put > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -78,7 +80,8 @@ func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) Put(ctx context.Contex } return nil } -// ToDeleteRequestInformation removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. +// ToDeleteRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -86,7 +89,8 @@ func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) ToDeleteRequestInforma requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPutRequestInformation adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. +// ToPutRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemCollaboratorsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -99,6 +103,7 @@ func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) ToPutRequestInformatio return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemCollaboratorsWithUsernameItemRequestBuilder when successful func (m *ItemCollaboratorsWithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*ItemCollaboratorsWithUsernameItemRequestBuilder) { return NewItemCollaboratorsWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/item_columns_request_builder.go b/pkg/github/projects/item_columns_request_builder.go index bcb6df3c..a898e47a 100644 --- a/pkg/github/projects/item_columns_request_builder.go +++ b/pkg/github/projects/item_columns_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemColumnsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemColumnsRequestBuilderGetQueryParameters lists the project columns in a project. +// ItemColumnsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ItemColumnsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,8 @@ func NewItemColumnsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26 urlParams["request-raw-url"] = rawUrl return NewItemColumnsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the project columns in a project. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a []ProjectColumnable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -58,7 +59,8 @@ func (m *ItemColumnsRequestBuilder) Get(ctx context.Context, requestConfiguratio } return val, nil } -// Post creates a new project column. +// Post > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ProjectColumnable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -85,7 +87,8 @@ func (m *ItemColumnsRequestBuilder) Post(ctx context.Context, body ItemColumnsPo } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ProjectColumnable), nil } -// ToGetRequestInformation lists the project columns in a project. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemColumnsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemColumnsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -93,7 +96,8 @@ func (m *ItemColumnsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a new project column. +// ToPostRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemColumnsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemColumnsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -106,6 +110,7 @@ func (m *ItemColumnsRequestBuilder) ToPostRequestInformation(ctx context.Context return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemColumnsRequestBuilder when successful func (m *ItemColumnsRequestBuilder) WithUrl(rawUrl string)(*ItemColumnsRequestBuilder) { return NewItemColumnsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/projects/projects_request_builder.go b/pkg/github/projects/projects_request_builder.go index a8cb788d..ff48fdaf 100644 --- a/pkg/github/projects/projects_request_builder.go +++ b/pkg/github/projects/projects_request_builder.go @@ -10,6 +10,7 @@ type ProjectsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } // ByProject_id gets an item from the github.com/octokit/go-sdk/pkg/github.projects.item collection +// Deprecated: // returns a *WithProject_ItemRequestBuilder when successful func (m *ProjectsRequestBuilder) ByProject_id(project_id int32)(*WithProject_ItemRequestBuilder) { urlTplParams := make(map[string]string) diff --git a/pkg/github/projects/with_project_escaped_item_request_builder.go b/pkg/github/projects/with_project_escaped_item_request_builder.go index 0ca49081..7840b651 100644 --- a/pkg/github/projects/with_project_escaped_item_request_builder.go +++ b/pkg/github/projects/with_project_escaped_item_request_builder.go @@ -33,7 +33,8 @@ func NewWithProject_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewWithProject_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a project board. Returns a `404 Not Found` status if projects are disabled. +// Delete > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a BasicError error when the service returns a 401 status code // returns a ItemWithProject_403Error error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -58,7 +59,8 @@ func (m *WithProject_ItemRequestBuilder) Delete(ctx context.Context, requestConf } return nil } -// Get gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a Projectable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -83,7 +85,8 @@ func (m *WithProject_ItemRequestBuilder) Get(ctx context.Context, requestConfigu } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Projectable), nil } -// Patch updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// Patch > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a Projectable when successful // returns a BasicError error when the service returns a 401 status code // returns a ItemProject403Error error when the service returns a 403 status code @@ -112,7 +115,8 @@ func (m *WithProject_ItemRequestBuilder) Patch(ctx context.Context, body ItemWit } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Projectable), nil } -// ToDeleteRequestInformation deletes a project board. Returns a `404 Not Found` status if projects are disabled. +// ToDeleteRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *WithProject_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -120,7 +124,8 @@ func (m *WithProject_ItemRequestBuilder) ToDeleteRequestInformation(ctx context. requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *WithProject_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -128,7 +133,8 @@ func (m *WithProject_ItemRequestBuilder) ToGetRequestInformation(ctx context.Con requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ToPatchRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *WithProject_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithProject_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -141,6 +147,7 @@ func (m *WithProject_ItemRequestBuilder) ToPatchRequestInformation(ctx context.C return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *WithProject_ItemRequestBuilder when successful func (m *WithProject_ItemRequestBuilder) WithUrl(rawUrl string)(*WithProject_ItemRequestBuilder) { return NewWithProject_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/repos/item_item_projects_request_builder.go b/pkg/github/repos/item_item_projects_request_builder.go index 0bea6ded..b8908c92 100644 --- a/pkg/github/repos/item_item_projects_request_builder.go +++ b/pkg/github/repos/item_item_projects_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemItemProjectsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemProjectsRequestBuilderGetQueryParameters lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ItemItemProjectsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ItemItemProjectsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -33,7 +33,8 @@ func NewItemItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewItemItemProjectsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a []Projectable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -67,7 +68,8 @@ func (m *ItemItemProjectsRequestBuilder) Get(ctx context.Context, requestConfigu } return val, nil } -// Post creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// Post > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a Projectable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -98,7 +100,8 @@ func (m *ItemItemProjectsRequestBuilder) Post(ctx context.Context, body ItemItem } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Projectable), nil } -// ToGetRequestInformation lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -106,7 +109,8 @@ func (m *ItemItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Con requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ToPostRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -119,6 +123,7 @@ func (m *ItemItemProjectsRequestBuilder) ToPostRequestInformation(ctx context.Co return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemItemProjectsRequestBuilder when successful func (m *ItemItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemItemProjectsRequestBuilder) { return NewItemItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/user/projects_request_builder.go b/pkg/github/user/projects_request_builder.go index a8c42a80..a1c223bb 100644 --- a/pkg/github/user/projects_request_builder.go +++ b/pkg/github/user/projects_request_builder.go @@ -23,7 +23,8 @@ func NewProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26337 urlParams["request-raw-url"] = rawUrl return NewProjectsRequestBuilderInternal(urlParams, requestAdapter) } -// Post creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// Post > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a Projectable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -50,7 +51,8 @@ func (m *ProjectsRequestBuilder) Post(ctx context.Context, body ProjectsPostRequ } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Projectable), nil } -// ToPostRequestInformation creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. +// ToPostRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ProjectsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -63,6 +65,7 @@ func (m *ProjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, b return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ProjectsRequestBuilder when successful func (m *ProjectsRequestBuilder) WithUrl(rawUrl string)(*ProjectsRequestBuilder) { return NewProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/users/item_projects_request_builder.go b/pkg/github/users/item_projects_request_builder.go index 8530c384..772a2f89 100644 --- a/pkg/github/users/item_projects_request_builder.go +++ b/pkg/github/users/item_projects_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemProjectsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemProjectsRequestBuilderGetQueryParameters lists projects for a user. +// ItemProjectsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ItemProjectsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -33,7 +33,8 @@ func NewItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewItemProjectsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists projects for a user. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a []Projectable when successful // returns a ValidationError error when the service returns a 422 status code // [API method documentation] @@ -59,7 +60,8 @@ func (m *ItemProjectsRequestBuilder) Get(ctx context.Context, requestConfigurati } return val, nil } -// ToGetRequestInformation lists projects for a user. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -68,6 +70,7 @@ func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemProjectsRequestBuilder when successful func (m *ItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemProjectsRequestBuilder) { return NewItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); From 40f4d8bef42dec03a1793b8e8492b340d3e98a4d Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 1 Feb 2025 00:10:01 +0000 Subject: [PATCH 13/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- .../item_settings_billing_usage_request_builder.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index a87c497a..940397b2 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "C0322B9A5712D23AD427C58567C214F7D23FF8BC66D5FD02E6ACECB81F3C8FCE1319279891223F13E00A2EBEA5C6037B05BF5BCA20D8C6C6502D61330B6994A6", + "descriptionHash": "E2FAE21694DD5FA26B4270669070D3694A4EA9C733965C0AF63A60219AD7BFD7B57108205F64E14768A88C9210ADF4F5D9B503AEB95750A315098776BECF629A", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/organizations/item_settings_billing_usage_request_builder.go b/pkg/github/organizations/item_settings_billing_usage_request_builder.go index 1761d7c1..24f197fd 100644 --- a/pkg/github/organizations/item_settings_billing_usage_request_builder.go +++ b/pkg/github/organizations/item_settings_billing_usage_request_builder.go @@ -12,13 +12,13 @@ type ItemSettingsBillingUsageRequestBuilder struct { } // ItemSettingsBillingUsageRequestBuilderGetQueryParameters gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." type ItemSettingsBillingUsageRequestBuilderGetQueryParameters struct { - // If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. + // If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used. Day *int32 `uriparametername:"day"` - // If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. + // If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. If no `year`, `month`, or `day` is specified, the default `year`, `month`, and `day` are used. Hour *int32 `uriparametername:"hour"` - // If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. + // If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. If no year is specified the default `year` is used. Month *int32 `uriparametername:"month"` - // If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2024`. Default value is the current year. + // If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year. Year *int32 `uriparametername:"year"` } // NewItemSettingsBillingUsageRequestBuilderInternal instantiates a new ItemSettingsBillingUsageRequestBuilder and sets the default values. From 0e93d6447d5ea71aedeed181987a21a71db5cb57 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 6 Feb 2025 00:09:40 +0000 Subject: [PATCH 14/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/runner.go | 29 +++++++++++++++++++ ...ners_generate_jitconfig_request_builder.go | 2 ++ ...ners_generate_jitconfig_request_builder.go | 2 ++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 940397b2..ddfc8d00 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "E2FAE21694DD5FA26B4270669070D3694A4EA9C733965C0AF63A60219AD7BFD7B57108205F64E14768A88C9210ADF4F5D9B503AEB95750A315098776BECF629A", + "descriptionHash": "A7978E8913075557C50AEE2477AE2BCA0660E1AAA959AC836D664EA0908A4CAF66AA4C0B4729BAB702FD9510D34AA24A5C04AF1BE1D957AE8E6945CB52FE7E72", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/runner.go b/pkg/github/models/runner.go index 09ce496e..c2ff8066 100644 --- a/pkg/github/models/runner.go +++ b/pkg/github/models/runner.go @@ -10,6 +10,8 @@ type Runner struct { additionalData map[string]any // The busy property busy *bool + // The ephemeral property + ephemeral *bool // The id of the runner. id *int32 // The labels property @@ -45,6 +47,11 @@ func (m *Runner) GetAdditionalData()(map[string]any) { func (m *Runner) GetBusy()(*bool) { return m.busy } +// GetEphemeral gets the ephemeral property value. The ephemeral property +// returns a *bool when successful +func (m *Runner) GetEphemeral()(*bool) { + return m.ephemeral +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Runner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -59,6 +66,16 @@ func (m *Runner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689638 } return nil } + res["ephemeral"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEphemeral(val) + } + return nil + } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() if err != nil { @@ -165,6 +182,12 @@ func (m *Runner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c return err } } + { + err := writer.WriteBoolValue("ephemeral", m.GetEphemeral()) + if err != nil { + return err + } + } { err := writer.WriteInt32Value("id", m.GetId()) if err != nil { @@ -223,6 +246,10 @@ func (m *Runner) SetAdditionalData(value map[string]any)() { func (m *Runner) SetBusy(value *bool)() { m.busy = value } +// SetEphemeral sets the ephemeral property value. The ephemeral property +func (m *Runner) SetEphemeral(value *bool)() { + m.ephemeral = value +} // SetId sets the id property value. The id of the runner. func (m *Runner) SetId(value *int32)() { m.id = value @@ -251,6 +278,7 @@ type Runnerable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBusy()(*bool) + GetEphemeral()(*bool) GetId()(*int32) GetLabels()([]RunnerLabelable) GetName()(*string) @@ -258,6 +286,7 @@ type Runnerable interface { GetRunnerGroupId()(*int32) GetStatus()(*string) SetBusy(value *bool)() + SetEphemeral(value *bool)() SetId(value *int32)() SetLabels(value []RunnerLabelable)() SetName(value *string)() diff --git a/pkg/github/orgs/item_actions_runners_generate_jitconfig_request_builder.go b/pkg/github/orgs/item_actions_runners_generate_jitconfig_request_builder.go index fe3291f3..8669274a 100644 --- a/pkg/github/orgs/item_actions_runners_generate_jitconfig_request_builder.go +++ b/pkg/github/orgs/item_actions_runners_generate_jitconfig_request_builder.go @@ -26,6 +26,7 @@ func NewItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, request // Post generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the organization.OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. // returns a ItemActionsRunnersGenerateJitconfigPostResponseable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // returns a ValidationErrorSimple error when the service returns a 422 status code // [API method documentation] // @@ -37,6 +38,7 @@ func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context.Con } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorSimpleFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping) diff --git a/pkg/github/repos/item_item_actions_runners_generate_jitconfig_request_builder.go b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_request_builder.go index c8383d28..7c959a69 100644 --- a/pkg/github/repos/item_item_actions_runners_generate_jitconfig_request_builder.go +++ b/pkg/github/repos/item_item_actions_runners_generate_jitconfig_request_builder.go @@ -26,6 +26,7 @@ func NewItemItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, req // Post generates a configuration that can be passed to the runner application at startup.The authenticated user must have admin access to the repository.OAuth tokens and personal access tokens (classic) need the`repo` scope to use this endpoint. // returns a ItemItemActionsRunnersGenerateJitconfigPostResponseable when successful // returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code // returns a ValidationErrorSimple error when the service returns a 422 status code // [API method documentation] // @@ -37,6 +38,7 @@ func (m *ItemItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context } errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorSimpleFromDiscriminatorValue, } res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping) From 226a9d67371a2f7b525dc066c645b6bd7698cb33 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 7 Feb 2025 00:09:42 +0000 Subject: [PATCH 15/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/orgs/item_copilot_usage_request_builder.go | 6 +++--- .../orgs/item_team_item_copilot_usage_request_builder.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index ddfc8d00..a5eeb6a9 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "A7978E8913075557C50AEE2477AE2BCA0660E1AAA959AC836D664EA0908A4CAF66AA4C0B4729BAB702FD9510D34AA24A5C04AF1BE1D957AE8E6945CB52FE7E72", + "descriptionHash": "54DFFC7EB507E65D53C3A0449C5BC4B126CEF0E349A014BC9E1AAFCB1710EA64E21080AF4659E1C6FB42FB9D0F6A1995554000671F8F26D4CCE5941832ACDBAE", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/orgs/item_copilot_usage_request_builder.go b/pkg/github/orgs/item_copilot_usage_request_builder.go index c8811437..97e12bac 100644 --- a/pkg/github/orgs/item_copilot_usage_request_builder.go +++ b/pkg/github/orgs/item_copilot_usage_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemCopilotUsageRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is closing down. It will be accessible throughout February 2025, but will not return any new data after February 1st.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. type ItemCopilotUsageRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -34,7 +34,7 @@ func NewItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is closing down. It will be accessible throughout February 2025, but will not return any new data after February 1st.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. // returns a []CopilotUsageMetricsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -66,7 +66,7 @@ func (m *ItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfigu } return val, nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is closing down. It will be accessible throughout February 2025, but will not return any new data after February 1st.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEacross an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_team_item_copilot_usage_request_builder.go b/pkg/github/orgs/item_team_item_copilot_usage_request_builder.go index 4229b6fb..bc302055 100644 --- a/pkg/github/orgs/item_team_item_copilot_usage_request_builder.go +++ b/pkg/github/orgs/item_team_item_copilot_usage_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemTeamItemCopilotUsageRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is closing down. It will be accessible throughout February 2025, but will not return any new data after February 1st.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. type ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -34,7 +34,7 @@ func NewItemTeamItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2a urlParams["request-raw-url"] = rawUrl return NewItemTeamItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is closing down. It will be accessible throughout February 2025, but will not return any new data after February 1st.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. // returns a []CopilotUsageMetricsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -66,7 +66,7 @@ func (m *ItemTeamItemCopilotUsageRequestBuilder) Get(ctx context.Context, reques } return val, nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is closing down. It will be accessible throughout February 2025, but will not return any new data after February 1st.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From f9bfbd3fc81c42b6a53fd173cb4e47b05cd84596 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 8 Feb 2025 00:09:13 +0000 Subject: [PATCH 16/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/copilot_dotcom_chat_escaped_models.go | 6 +++--- ...com_pull_requests_escaped_repositories_escaped_models.go | 6 +++--- .../copilot_ide_chat_escaped_editors_escaped_models.go | 6 +++--- pkg/github/models/repository_rule_member4.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index a5eeb6a9..c7bc906c 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "54DFFC7EB507E65D53C3A0449C5BC4B126CEF0E349A014BC9E1AAFCB1710EA64E21080AF4659E1C6FB42FB9D0F6A1995554000671F8F26D4CCE5941832ACDBAE", + "descriptionHash": "D86036D44C27F08C783743D652C1AF65EACB2341F9B8CB2205D65F22AB7D506EB8004E7AFBC19E6B75C33D39F6EF7E2456C9F8A2ACBA3B13B25B3990C905AAB2", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/copilot_dotcom_chat_escaped_models.go b/pkg/github/models/copilot_dotcom_chat_escaped_models.go index 75a5039e..58a4b5b3 100644 --- a/pkg/github/models/copilot_dotcom_chat_escaped_models.go +++ b/pkg/github/models/copilot_dotcom_chat_escaped_models.go @@ -11,7 +11,7 @@ type CopilotDotcomChat_models struct { custom_model_training_date *string // Indicates whether a model is custom or default. is_custom_model *bool - // Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. + // Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. name *string // Total number of chats initiated by users on github.com. total_chats *int32 @@ -101,7 +101,7 @@ func (m *CopilotDotcomChat_models) GetFieldDeserializers()(map[string]func(i878a func (m *CopilotDotcomChat_models) GetIsCustomModel()(*bool) { return m.is_custom_model } -// GetName gets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. +// GetName gets the name property value. Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. // returns a *string when successful func (m *CopilotDotcomChat_models) GetName()(*string) { return m.name @@ -168,7 +168,7 @@ func (m *CopilotDotcomChat_models) SetCustomModelTrainingDate(value *string)() { func (m *CopilotDotcomChat_models) SetIsCustomModel(value *bool)() { m.is_custom_model = value } -// SetName sets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. +// SetName sets the name property value. Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. func (m *CopilotDotcomChat_models) SetName(value *string)() { m.name = value } diff --git a/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go index 3d91291f..9d0b22c2 100644 --- a/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go +++ b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go @@ -11,7 +11,7 @@ type CopilotDotcomPullRequests_repositories_models struct { custom_model_training_date *string // Indicates whether a model is custom or default. is_custom_model *bool - // Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. + // Name of the model used for Copilot pull request summaries. If the default model is used will appear as 'default'. name *string // The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. total_engaged_users *int32 @@ -101,7 +101,7 @@ func (m *CopilotDotcomPullRequests_repositories_models) GetFieldDeserializers()( func (m *CopilotDotcomPullRequests_repositories_models) GetIsCustomModel()(*bool) { return m.is_custom_model } -// GetName gets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. +// GetName gets the name property value. Name of the model used for Copilot pull request summaries. If the default model is used will appear as 'default'. // returns a *string when successful func (m *CopilotDotcomPullRequests_repositories_models) GetName()(*string) { return m.name @@ -168,7 +168,7 @@ func (m *CopilotDotcomPullRequests_repositories_models) SetCustomModelTrainingDa func (m *CopilotDotcomPullRequests_repositories_models) SetIsCustomModel(value *bool)() { m.is_custom_model = value } -// SetName sets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. +// SetName sets the name property value. Name of the model used for Copilot pull request summaries. If the default model is used will appear as 'default'. func (m *CopilotDotcomPullRequests_repositories_models) SetName(value *string)() { m.name = value } diff --git a/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go b/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go index 0847bcce..6dc01476 100644 --- a/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go +++ b/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go @@ -11,7 +11,7 @@ type CopilotIdeChat_editors_models struct { custom_model_training_date *string // Indicates whether a model is custom or default. is_custom_model *bool - // Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. + // Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. name *string // The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. total_chat_copy_events *int32 @@ -125,7 +125,7 @@ func (m *CopilotIdeChat_editors_models) GetFieldDeserializers()(map[string]func( func (m *CopilotIdeChat_editors_models) GetIsCustomModel()(*bool) { return m.is_custom_model } -// GetName gets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. +// GetName gets the name property value. Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. // returns a *string when successful func (m *CopilotIdeChat_editors_models) GetName()(*string) { return m.name @@ -214,7 +214,7 @@ func (m *CopilotIdeChat_editors_models) SetCustomModelTrainingDate(value *string func (m *CopilotIdeChat_editors_models) SetIsCustomModel(value *bool)() { m.is_custom_model = value } -// SetName sets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. +// SetName sets the name property value. Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. func (m *CopilotIdeChat_editors_models) SetName(value *string)() { m.name = value } diff --git a/pkg/github/models/repository_rule_member4.go b/pkg/github/models/repository_rule_member4.go index 5df8b381..b930b8f4 100644 --- a/pkg/github/models/repository_rule_member4.go +++ b/pkg/github/models/repository_rule_member4.go @@ -4,7 +4,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// RepositoryRuleMember4 prevent commits that exceed a specified file size limit from being pushed to the commit. +// RepositoryRuleMember4 prevent commits that exceed a specified file size limit from being pushed to the commit graph. type RepositoryRuleMember4 struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any From 99815e5fc61635b754b85658b31c7c52f5670956 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 12 Feb 2025 00:09:43 +0000 Subject: [PATCH 17/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/ruleset_version.go | 140 ++++++++++++++++++ .../models/ruleset_version_escaped_actor.go | 110 ++++++++++++++ .../models/ruleset_version_with_state.go | 68 +++++++++ ...uleset_version_with_state_escaped_state.go | 52 +++++++ ...m_rulesets_item_history_request_builder.go | 84 +++++++++++ ...th_version_escaped_item_request_builder.go | 63 ++++++++ ...th_ruleset_escaped_item_request_builder.go | 5 + ...ctions_runs_item_timing_request_builder.go | 4 +- ...s_workflows_item_timing_request_builder.go | 4 +- ...m_rulesets_item_history_request_builder.go | 84 +++++++++++ ...th_version_escaped_item_request_builder.go | 63 ++++++++ ...th_ruleset_escaped_item_request_builder.go | 5 + 13 files changed, 679 insertions(+), 5 deletions(-) create mode 100644 pkg/github/models/ruleset_version.go create mode 100644 pkg/github/models/ruleset_version_escaped_actor.go create mode 100644 pkg/github/models/ruleset_version_with_state.go create mode 100644 pkg/github/models/ruleset_version_with_state_escaped_state.go create mode 100644 pkg/github/orgs/item_rulesets_item_history_request_builder.go create mode 100644 pkg/github/orgs/item_rulesets_item_history_with_version_escaped_item_request_builder.go create mode 100644 pkg/github/repos/item_item_rulesets_item_history_request_builder.go create mode 100644 pkg/github/repos/item_item_rulesets_item_history_with_version_escaped_item_request_builder.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index c7bc906c..7048759a 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "D86036D44C27F08C783743D652C1AF65EACB2341F9B8CB2205D65F22AB7D506EB8004E7AFBC19E6B75C33D39F6EF7E2456C9F8A2ACBA3B13B25B3990C905AAB2", + "descriptionHash": "5E22B6B3AC4A41A34566D90D55134112D053A628254158FB8225F85B5B0A41D6AEF1B97ADDCB4C53C63087376D1D1A3A288AA05227CB07D54AAC0B4233403E0B", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/ruleset_version.go b/pkg/github/models/ruleset_version.go new file mode 100644 index 00000000..8947b5d9 --- /dev/null +++ b/pkg/github/models/ruleset_version.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RulesetVersion the historical version of a ruleset +type RulesetVersion struct { + // The actor who updated the ruleset + actor RulesetVersion_actorable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ID of the previous version of the ruleset + version_id *int32 +} +// NewRulesetVersion instantiates a new RulesetVersion and sets the default values. +func NewRulesetVersion()(*RulesetVersion) { + m := &RulesetVersion{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRulesetVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRulesetVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRulesetVersion(), nil +} +// GetActor gets the actor property value. The actor who updated the ruleset +// returns a RulesetVersion_actorable when successful +func (m *RulesetVersion) GetActor()(RulesetVersion_actorable) { + return m.actor +} +// 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 *RulesetVersion) 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 *RulesetVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRulesetVersion_actorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(RulesetVersion_actorable)) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["version_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersionId(val) + } + return nil + } + return res +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *RulesetVersion) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetVersionId gets the version_id property value. The ID of the previous version of the ruleset +// returns a *int32 when successful +func (m *RulesetVersion) GetVersionId()(*int32) { + return m.version_id +} +// Serialize serializes information the current object +func (m *RulesetVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("version_id", m.GetVersionId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActor sets the actor property value. The actor who updated the ruleset +func (m *RulesetVersion) SetActor(value RulesetVersion_actorable)() { + m.actor = value +} +// 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 *RulesetVersion) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *RulesetVersion) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetVersionId sets the version_id property value. The ID of the previous version of the ruleset +func (m *RulesetVersion) SetVersionId(value *int32)() { + m.version_id = value +} +type RulesetVersionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActor()(RulesetVersion_actorable) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVersionId()(*int32) + SetActor(value RulesetVersion_actorable)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVersionId(value *int32)() +} diff --git a/pkg/github/models/ruleset_version_escaped_actor.go b/pkg/github/models/ruleset_version_escaped_actor.go new file mode 100644 index 00000000..998bb4b5 --- /dev/null +++ b/pkg/github/models/ruleset_version_escaped_actor.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RulesetVersion_actor the actor who updated the ruleset +type RulesetVersion_actor 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 id property + id *int32 + // The type property + typeEscaped *string +} +// NewRulesetVersion_actor instantiates a new RulesetVersion_actor and sets the default values. +func NewRulesetVersion_actor()(*RulesetVersion_actor) { + m := &RulesetVersion_actor{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRulesetVersion_actorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRulesetVersion_actorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRulesetVersion_actor(), 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 *RulesetVersion_actor) 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 *RulesetVersion_actor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *RulesetVersion_actor) GetId()(*int32) { + return m.id +} +// GetTypeEscaped gets the type property value. The type property +// returns a *string when successful +func (m *RulesetVersion_actor) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *RulesetVersion_actor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + 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 *RulesetVersion_actor) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *RulesetVersion_actor) SetId(value *int32)() { + m.id = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *RulesetVersion_actor) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type RulesetVersion_actorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetTypeEscaped()(*string) + SetId(value *int32)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/ruleset_version_with_state.go b/pkg/github/models/ruleset_version_with_state.go new file mode 100644 index 00000000..66bde1e0 --- /dev/null +++ b/pkg/github/models/ruleset_version_with_state.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RulesetVersionWithState struct { + RulesetVersion + // The state of the ruleset version + state RulesetVersionWithState_stateable +} +// NewRulesetVersionWithState instantiates a new RulesetVersionWithState and sets the default values. +func NewRulesetVersionWithState()(*RulesetVersionWithState) { + m := &RulesetVersionWithState{ + RulesetVersion: *NewRulesetVersion(), + } + return m +} +// CreateRulesetVersionWithStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRulesetVersionWithStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRulesetVersionWithState(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RulesetVersionWithState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RulesetVersion.GetFieldDeserializers() + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRulesetVersionWithState_stateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(RulesetVersionWithState_stateable)) + } + return nil + } + return res +} +// GetState gets the state property value. The state of the ruleset version +// returns a RulesetVersionWithState_stateable when successful +func (m *RulesetVersionWithState) GetState()(RulesetVersionWithState_stateable) { + return m.state +} +// Serialize serializes information the current object +func (m *RulesetVersionWithState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RulesetVersion.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("state", m.GetState()) + if err != nil { + return err + } + } + return nil +} +// SetState sets the state property value. The state of the ruleset version +func (m *RulesetVersionWithState) SetState(value RulesetVersionWithState_stateable)() { + m.state = value +} +type RulesetVersionWithStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RulesetVersionable + GetState()(RulesetVersionWithState_stateable) + SetState(value RulesetVersionWithState_stateable)() +} diff --git a/pkg/github/models/ruleset_version_with_state_escaped_state.go b/pkg/github/models/ruleset_version_with_state_escaped_state.go new file mode 100644 index 00000000..fb0b5bbf --- /dev/null +++ b/pkg/github/models/ruleset_version_with_state_escaped_state.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RulesetVersionWithState_state the state of the ruleset version +type RulesetVersionWithState_state struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewRulesetVersionWithState_state instantiates a new RulesetVersionWithState_state and sets the default values. +func NewRulesetVersionWithState_state()(*RulesetVersionWithState_state) { + m := &RulesetVersionWithState_state{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRulesetVersionWithState_stateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRulesetVersionWithState_stateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRulesetVersionWithState_state(), 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 *RulesetVersionWithState_state) 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 *RulesetVersionWithState_state) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *RulesetVersionWithState_state) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *RulesetVersionWithState_state) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type RulesetVersionWithState_stateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_rulesets_item_history_request_builder.go b/pkg/github/orgs/item_rulesets_item_history_request_builder.go new file mode 100644 index 00000000..baf55dff --- /dev/null +++ b/pkg/github/orgs/item_rulesets_item_history_request_builder.go @@ -0,0 +1,84 @@ +package orgs + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemRulesetsItemHistoryRequestBuilder builds and executes requests for operations under \orgs\{org}\rulesets\{ruleset_id}\history +type ItemRulesetsItemHistoryRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemRulesetsItemHistoryRequestBuilderGetQueryParameters get the history of an organization ruleset. +type ItemRulesetsItemHistoryRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByVersion_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.rulesets.item.history.item collection +// returns a *ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder when successful +func (m *ItemRulesetsItemHistoryRequestBuilder) ByVersion_id(version_id int32)(*ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["version_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(version_id), 10) + return NewItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemRulesetsItemHistoryRequestBuilderInternal instantiates a new ItemRulesetsItemHistoryRequestBuilder and sets the default values. +func NewItemRulesetsItemHistoryRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsItemHistoryRequestBuilder) { + m := &ItemRulesetsItemHistoryRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}/history{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemRulesetsItemHistoryRequestBuilder instantiates a new ItemRulesetsItemHistoryRequestBuilder and sets the default values. +func NewItemRulesetsItemHistoryRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsItemHistoryRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRulesetsItemHistoryRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the history of an organization ruleset. +// returns a []RulesetVersionable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/rules#get-organization-ruleset-history +func (m *ItemRulesetsItemHistoryRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRulesetsItemHistoryRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateRulesetVersionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionable) + } + } + return val, nil +} +// ToGetRequestInformation get the history of an organization ruleset. +// returns a *RequestInformation when successful +func (m *ItemRulesetsItemHistoryRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemRulesetsItemHistoryRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesetsItemHistoryRequestBuilder when successful +func (m *ItemRulesetsItemHistoryRequestBuilder) WithUrl(rawUrl string)(*ItemRulesetsItemHistoryRequestBuilder) { + return NewItemRulesetsItemHistoryRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_rulesets_item_history_with_version_escaped_item_request_builder.go b/pkg/github/orgs/item_rulesets_item_history_with_version_escaped_item_request_builder.go new file mode 100644 index 00000000..93c0d161 --- /dev/null +++ b/pkg/github/orgs/item_rulesets_item_history_with_version_escaped_item_request_builder.go @@ -0,0 +1,63 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\rulesets\{ruleset_id}\history\{version_id} +type ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal instantiates a new ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder and sets the default values. +func NewItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + m := &ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}/history/{version_id}", pathParameters), + } + return m +} +// NewItemRulesetsItemHistoryWithVersion_ItemRequestBuilder instantiates a new ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder and sets the default values. +func NewItemRulesetsItemHistoryWithVersion_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get a version of an organization ruleset. +// returns a RulesetVersionWithStateable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/rules#get-organization-ruleset-version +func (m *ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionWithStateable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateRulesetVersionWithStateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionWithStateable), nil +} +// ToGetRequestInformation get a version of an organization ruleset. +// returns a *RequestInformation when successful +func (m *ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder when successful +func (m *ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + return NewItemRulesetsItemHistoryWithVersion_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_rulesets_with_ruleset_escaped_item_request_builder.go b/pkg/github/orgs/item_rulesets_with_ruleset_escaped_item_request_builder.go index e604ca1c..782ee006 100644 --- a/pkg/github/orgs/item_rulesets_with_ruleset_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_rulesets_with_ruleset_escaped_item_request_builder.go @@ -69,6 +69,11 @@ func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) Get(ctx context.Context, re } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RepositoryRulesetable), nil } +// History the history property +// returns a *ItemRulesetsItemHistoryRequestBuilder when successful +func (m *ItemRulesetsWithRuleset_ItemRequestBuilder) History()(*ItemRulesetsItemHistoryRequestBuilder) { + return NewItemRulesetsItemHistoryRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Put update a ruleset for an organization. // returns a RepositoryRulesetable when successful // returns a BasicError error when the service returns a 404 status code diff --git a/pkg/github/repos/item_item_actions_runs_item_timing_request_builder.go b/pkg/github/repos/item_item_actions_runs_item_timing_request_builder.go index 255a832d..280de9c1 100644 --- a/pkg/github/repos/item_item_actions_runs_item_timing_request_builder.go +++ b/pkg/github/repos/item_item_actions_runs_item_timing_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemActionsRunsItemTimingRequestBuilder(rawUrl string, requestAdapte urlParams["request-raw-url"] = rawUrl return NewItemItemActionsRunsItemTimingRequestBuilderInternal(urlParams, requestAdapter) } -// Get gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// Get > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. // returns a WorkflowRunUsageable when successful // [API method documentation] // @@ -42,7 +42,7 @@ func (m *ItemItemActionsRunsItemTimingRequestBuilder) Get(ctx context.Context, r } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.WorkflowRunUsageable), nil } -// ToGetRequestInformation gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// ToGetRequestInformation > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. // returns a *RequestInformation when successful func (m *ItemItemActionsRunsItemTimingRequestBuilder) 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_actions_workflows_item_timing_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_timing_request_builder.go index 0de1722c..2dfe0e7e 100644 --- a/pkg/github/repos/item_item_actions_workflows_item_timing_request_builder.go +++ b/pkg/github/repos/item_item_actions_workflows_item_timing_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemActionsWorkflowsItemTimingRequestBuilder(rawUrl string, requestA urlParams["request-raw-url"] = rawUrl return NewItemItemActionsWorkflowsItemTimingRequestBuilderInternal(urlParams, requestAdapter) } -// Get gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// Get > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. // returns a WorkflowUsageable when successful // [API method documentation] // @@ -42,7 +42,7 @@ func (m *ItemItemActionsWorkflowsItemTimingRequestBuilder) Get(ctx context.Conte } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.WorkflowUsageable), nil } -// ToGetRequestInformation gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// ToGetRequestInformation > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. // returns a *RequestInformation when successful func (m *ItemItemActionsWorkflowsItemTimingRequestBuilder) 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_rulesets_item_history_request_builder.go b/pkg/github/repos/item_item_rulesets_item_history_request_builder.go new file mode 100644 index 00000000..a8b3f4bc --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_item_history_request_builder.go @@ -0,0 +1,84 @@ +package repos + +import ( + "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemRulesetsItemHistoryRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\{ruleset_id}\history +type ItemItemRulesetsItemHistoryRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemRulesetsItemHistoryRequestBuilderGetQueryParameters get the history of a repository ruleset. +type ItemItemRulesetsItemHistoryRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// ByVersion_id gets an item from the github.com/octokit/go-sdk/pkg/github.repos.item.item.rulesets.item.history.item collection +// returns a *ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder when successful +func (m *ItemItemRulesetsItemHistoryRequestBuilder) ByVersion_id(version_id int32)(*ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["version_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(version_id), 10) + return NewItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemRulesetsItemHistoryRequestBuilderInternal instantiates a new ItemItemRulesetsItemHistoryRequestBuilder and sets the default values. +func NewItemItemRulesetsItemHistoryRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsItemHistoryRequestBuilder) { + m := &ItemItemRulesetsItemHistoryRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}/history{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemRulesetsItemHistoryRequestBuilder instantiates a new ItemItemRulesetsItemHistoryRequestBuilder and sets the default values. +func NewItemItemRulesetsItemHistoryRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsItemHistoryRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesetsItemHistoryRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the history of a repository ruleset. +// returns a []RulesetVersionable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/repos/rules#get-repository-ruleset-history +func (m *ItemItemRulesetsItemHistoryRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsItemHistoryRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateRulesetVersionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionable) + } + } + return val, nil +} +// ToGetRequestInformation get the history of a repository ruleset. +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsItemHistoryRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemRulesetsItemHistoryRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemRulesetsItemHistoryRequestBuilder when successful +func (m *ItemItemRulesetsItemHistoryRequestBuilder) WithUrl(rawUrl string)(*ItemItemRulesetsItemHistoryRequestBuilder) { + return NewItemItemRulesetsItemHistoryRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_rulesets_item_history_with_version_escaped_item_request_builder.go b/pkg/github/repos/item_item_rulesets_item_history_with_version_escaped_item_request_builder.go new file mode 100644 index 00000000..940a7336 --- /dev/null +++ b/pkg/github/repos/item_item_rulesets_item_history_with_version_escaped_item_request_builder.go @@ -0,0 +1,63 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\{ruleset_id}\history\{version_id} +type ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal instantiates a new ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder and sets the default values. +func NewItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + m := &ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}/history/{version_id}", pathParameters), + } + return m +} +// NewItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder instantiates a new ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder and sets the default values. +func NewItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get a version of a repository ruleset. +// returns a RulesetVersionWithStateable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 500 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/repos/rules#get-repository-ruleset-version +func (m *ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionWithStateable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateRulesetVersionWithStateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RulesetVersionWithStateable), nil +} +// ToGetRequestInformation get a version of a repository ruleset. +// returns a *RequestInformation when successful +func (m *ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder when successful +func (m *ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder) { + return NewItemItemRulesetsItemHistoryWithVersion_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_rulesets_with_ruleset_escaped_item_request_builder.go b/pkg/github/repos/item_item_rulesets_with_ruleset_escaped_item_request_builder.go index 289b5d73..b9437636 100644 --- a/pkg/github/repos/item_item_rulesets_with_ruleset_escaped_item_request_builder.go +++ b/pkg/github/repos/item_item_rulesets_with_ruleset_escaped_item_request_builder.go @@ -74,6 +74,11 @@ func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) Get(ctx context.Context } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.RepositoryRulesetable), nil } +// History the history property +// returns a *ItemItemRulesetsItemHistoryRequestBuilder when successful +func (m *ItemItemRulesetsWithRuleset_ItemRequestBuilder) History()(*ItemItemRulesetsItemHistoryRequestBuilder) { + return NewItemItemRulesetsItemHistoryRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Put update a ruleset for a repository. // returns a RepositoryRulesetable when successful // returns a BasicError error when the service returns a 404 status code From 501414be34fae02c5721dccd45ca3f2d1be58b0f Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 13 Feb 2025 00:09:45 +0000 Subject: [PATCH 18/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/code_scanning_alert.go | 29 +++++++++++++++++++ .../models/code_scanning_alert_items.go | 29 +++++++++++++++++++ .../code_scanning_organization_alert_items.go | 29 +++++++++++++++++++ .../organization_secret_scanning_alert.go | 29 +++++++++++++++++++ pkg/github/models/secret_scanning_alert.go | 29 +++++++++++++++++++ 6 files changed, 146 insertions(+), 1 deletion(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 7048759a..33829fdc 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "5E22B6B3AC4A41A34566D90D55134112D053A628254158FB8225F85B5B0A41D6AEF1B97ADDCB4C53C63087376D1D1A3A288AA05227CB07D54AAC0B4233403E0B", + "descriptionHash": "C0508A702650A30818E7A2A6E566C062CE73FFAC1FAE973EEB029076B9A3E56CA925AD24AD23AD18A97B497067842F196E1B9C6D23306F571FB2AD27B9394E64", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/code_scanning_alert.go b/pkg/github/models/code_scanning_alert.go index 125b73c0..17993e1b 100644 --- a/pkg/github/models/code_scanning_alert.go +++ b/pkg/github/models/code_scanning_alert.go @@ -10,6 +10,8 @@ type CodeScanningAlert struct { additionalData map[string]any // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissal_approved_by NullableSimpleUserable // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // A GitHub user. @@ -61,6 +63,11 @@ func (m *CodeScanningAlert) GetAdditionalData()(map[string]any) { func (m *CodeScanningAlert) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { return m.created_at } +// GetDismissalApprovedBy gets the dismissal_approved_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CodeScanningAlert) GetDismissalApprovedBy()(NullableSimpleUserable) { + return m.dismissal_approved_by +} // GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. // returns a *Time when successful func (m *CodeScanningAlert) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -95,6 +102,16 @@ func (m *CodeScanningAlert) GetFieldDeserializers()(map[string]func(i878a80d2330 } return nil } + res["dismissal_approved_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissalApprovedBy(val.(NullableSimpleUserable)) + } + return nil + } res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -289,6 +306,12 @@ func (m *CodeScanningAlert) GetUrl()(*string) { } // Serialize serializes information the current object func (m *CodeScanningAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissal_approved_by", m.GetDismissalApprovedBy()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) if err != nil { @@ -349,6 +372,10 @@ func (m *CodeScanningAlert) SetAdditionalData(value map[string]any)() { func (m *CodeScanningAlert) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.created_at = value } +// SetDismissalApprovedBy sets the dismissal_approved_by property value. A GitHub user. +func (m *CodeScanningAlert) SetDismissalApprovedBy(value NullableSimpleUserable)() { + m.dismissal_approved_by = value +} // SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. func (m *CodeScanningAlert) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.dismissed_at = value @@ -409,6 +436,7 @@ type CodeScanningAlertable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissalApprovedBy()(NullableSimpleUserable) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDismissedBy()(NullableSimpleUserable) GetDismissedComment()(*string) @@ -424,6 +452,7 @@ type CodeScanningAlertable interface { GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetUrl()(*string) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissalApprovedBy(value NullableSimpleUserable)() SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDismissedBy(value NullableSimpleUserable)() SetDismissedComment(value *string)() diff --git a/pkg/github/models/code_scanning_alert_items.go b/pkg/github/models/code_scanning_alert_items.go index 1bc9aa20..6addc04b 100644 --- a/pkg/github/models/code_scanning_alert_items.go +++ b/pkg/github/models/code_scanning_alert_items.go @@ -10,6 +10,8 @@ type CodeScanningAlertItems struct { additionalData map[string]any // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissal_approved_by NullableSimpleUserable // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // A GitHub user. @@ -61,6 +63,11 @@ func (m *CodeScanningAlertItems) GetAdditionalData()(map[string]any) { func (m *CodeScanningAlertItems) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { return m.created_at } +// GetDismissalApprovedBy gets the dismissal_approved_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CodeScanningAlertItems) GetDismissalApprovedBy()(NullableSimpleUserable) { + return m.dismissal_approved_by +} // GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. // returns a *Time when successful func (m *CodeScanningAlertItems) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -95,6 +102,16 @@ func (m *CodeScanningAlertItems) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["dismissal_approved_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissalApprovedBy(val.(NullableSimpleUserable)) + } + return nil + } res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -289,6 +306,12 @@ func (m *CodeScanningAlertItems) GetUrl()(*string) { } // Serialize serializes information the current object func (m *CodeScanningAlertItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissal_approved_by", m.GetDismissalApprovedBy()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) if err != nil { @@ -349,6 +372,10 @@ func (m *CodeScanningAlertItems) SetAdditionalData(value map[string]any)() { func (m *CodeScanningAlertItems) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.created_at = value } +// SetDismissalApprovedBy sets the dismissal_approved_by property value. A GitHub user. +func (m *CodeScanningAlertItems) SetDismissalApprovedBy(value NullableSimpleUserable)() { + m.dismissal_approved_by = value +} // SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. func (m *CodeScanningAlertItems) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.dismissed_at = value @@ -409,6 +436,7 @@ type CodeScanningAlertItemsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissalApprovedBy()(NullableSimpleUserable) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDismissedBy()(NullableSimpleUserable) GetDismissedComment()(*string) @@ -424,6 +452,7 @@ type CodeScanningAlertItemsable interface { GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetUrl()(*string) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissalApprovedBy(value NullableSimpleUserable)() SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDismissedBy(value NullableSimpleUserable)() SetDismissedComment(value *string)() diff --git a/pkg/github/models/code_scanning_organization_alert_items.go b/pkg/github/models/code_scanning_organization_alert_items.go index c35910ab..55e6da49 100644 --- a/pkg/github/models/code_scanning_organization_alert_items.go +++ b/pkg/github/models/code_scanning_organization_alert_items.go @@ -10,6 +10,8 @@ type CodeScanningOrganizationAlertItems struct { additionalData map[string]any // The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A GitHub user. + dismissal_approved_by NullableSimpleUserable // The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. dismissed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // A GitHub user. @@ -63,6 +65,11 @@ func (m *CodeScanningOrganizationAlertItems) GetAdditionalData()(map[string]any) func (m *CodeScanningOrganizationAlertItems) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { return m.created_at } +// GetDismissalApprovedBy gets the dismissal_approved_by property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *CodeScanningOrganizationAlertItems) GetDismissalApprovedBy()(NullableSimpleUserable) { + return m.dismissal_approved_by +} // GetDismissedAt gets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. // returns a *Time when successful func (m *CodeScanningOrganizationAlertItems) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -97,6 +104,16 @@ func (m *CodeScanningOrganizationAlertItems) GetFieldDeserializers()(map[string] } return nil } + res["dismissal_approved_by"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDismissalApprovedBy(val.(NullableSimpleUserable)) + } + return nil + } res["dismissed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -306,6 +323,12 @@ func (m *CodeScanningOrganizationAlertItems) GetUrl()(*string) { } // Serialize serializes information the current object func (m *CodeScanningOrganizationAlertItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dismissal_approved_by", m.GetDismissalApprovedBy()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("dismissed_by", m.GetDismissedBy()) if err != nil { @@ -372,6 +395,10 @@ func (m *CodeScanningOrganizationAlertItems) SetAdditionalData(value map[string] func (m *CodeScanningOrganizationAlertItems) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.created_at = value } +// SetDismissalApprovedBy sets the dismissal_approved_by property value. A GitHub user. +func (m *CodeScanningOrganizationAlertItems) SetDismissalApprovedBy(value NullableSimpleUserable)() { + m.dismissal_approved_by = value +} // SetDismissedAt sets the dismissed_at property value. The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. func (m *CodeScanningOrganizationAlertItems) SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.dismissed_at = value @@ -436,6 +463,7 @@ type CodeScanningOrganizationAlertItemsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissalApprovedBy()(NullableSimpleUserable) GetDismissedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDismissedBy()(NullableSimpleUserable) GetDismissedComment()(*string) @@ -452,6 +480,7 @@ type CodeScanningOrganizationAlertItemsable interface { GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetUrl()(*string) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissalApprovedBy(value NullableSimpleUserable)() SetDismissedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDismissedBy(value NullableSimpleUserable)() SetDismissedComment(value *string)() diff --git a/pkg/github/models/organization_secret_scanning_alert.go b/pkg/github/models/organization_secret_scanning_alert.go index dcd9a4cc..33ba74f4 100644 --- a/pkg/github/models/organization_secret_scanning_alert.go +++ b/pkg/github/models/organization_secret_scanning_alert.go @@ -12,6 +12,8 @@ type OrganizationSecretScanningAlert struct { created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The GitHub URL of the alert resource. html_url *string + // A boolean value representing whether or not alert is base64 encoded + is_base64_encoded *bool // The REST API URL of the code locations for this alert. locations_url *string // Whether the detected secret was found in multiple repositories in the same organization or enterprise. @@ -105,6 +107,16 @@ func (m *OrganizationSecretScanningAlert) GetFieldDeserializers()(map[string]fun } return nil } + res["is_base64_encoded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBase64Encoded(val) + } + return nil + } res["locations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -342,6 +354,11 @@ func (m *OrganizationSecretScanningAlert) GetFieldDeserializers()(map[string]fun func (m *OrganizationSecretScanningAlert) GetHtmlUrl()(*string) { return m.html_url } +// GetIsBase64Encoded gets the is_base64_encoded property value. A boolean value representing whether or not alert is base64 encoded +// returns a *bool when successful +func (m *OrganizationSecretScanningAlert) GetIsBase64Encoded()(*bool) { + return m.is_base64_encoded +} // GetLocationsUrl gets the locations_url property value. The REST API URL of the code locations for this alert. // returns a *string when successful func (m *OrganizationSecretScanningAlert) GetLocationsUrl()(*string) { @@ -459,6 +476,12 @@ func (m *OrganizationSecretScanningAlert) GetValidity()(*OrganizationSecretScann } // Serialize serializes information the current object func (m *OrganizationSecretScanningAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("is_base64_encoded", m.GetIsBase64Encoded()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("locations_url", m.GetLocationsUrl()) if err != nil { @@ -602,6 +625,10 @@ func (m *OrganizationSecretScanningAlert) SetCreatedAt(value *i336074805fc853987 func (m *OrganizationSecretScanningAlert) SetHtmlUrl(value *string)() { m.html_url = value } +// SetIsBase64Encoded sets the is_base64_encoded property value. A boolean value representing whether or not alert is base64 encoded +func (m *OrganizationSecretScanningAlert) SetIsBase64Encoded(value *bool)() { + m.is_base64_encoded = value +} // SetLocationsUrl sets the locations_url property value. The REST API URL of the code locations for this alert. func (m *OrganizationSecretScanningAlert) SetLocationsUrl(value *string)() { m.locations_url = value @@ -699,6 +726,7 @@ type OrganizationSecretScanningAlertable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetHtmlUrl()(*string) + GetIsBase64Encoded()(*bool) GetLocationsUrl()(*string) GetMultiRepo()(*bool) GetNumber()(*int32) @@ -724,6 +752,7 @@ type OrganizationSecretScanningAlertable interface { GetValidity()(*OrganizationSecretScanningAlert_validity) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetHtmlUrl(value *string)() + SetIsBase64Encoded(value *bool)() SetLocationsUrl(value *string)() SetMultiRepo(value *bool)() SetNumber(value *int32)() diff --git a/pkg/github/models/secret_scanning_alert.go b/pkg/github/models/secret_scanning_alert.go index b71ef98f..582cdfca 100644 --- a/pkg/github/models/secret_scanning_alert.go +++ b/pkg/github/models/secret_scanning_alert.go @@ -12,6 +12,8 @@ type SecretScanningAlert struct { created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The GitHub URL of the alert resource. html_url *string + // A boolean value representing whether or not alert is base64 encoded + is_base64_encoded *bool // The REST API URL of the code locations for this alert. locations_url *string // Whether the detected secret was found in multiple repositories under the same organization or enterprise. @@ -103,6 +105,16 @@ func (m *SecretScanningAlert) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["is_base64_encoded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBase64Encoded(val) + } + return nil + } res["locations_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -330,6 +342,11 @@ func (m *SecretScanningAlert) GetFieldDeserializers()(map[string]func(i878a80d23 func (m *SecretScanningAlert) GetHtmlUrl()(*string) { return m.html_url } +// GetIsBase64Encoded gets the is_base64_encoded property value. A boolean value representing whether or not alert is base64 encoded +// returns a *bool when successful +func (m *SecretScanningAlert) GetIsBase64Encoded()(*bool) { + return m.is_base64_encoded +} // GetLocationsUrl gets the locations_url property value. The REST API URL of the code locations for this alert. // returns a *string when successful func (m *SecretScanningAlert) GetLocationsUrl()(*string) { @@ -442,6 +459,12 @@ func (m *SecretScanningAlert) GetValidity()(*SecretScanningAlert_validity) { } // Serialize serializes information the current object func (m *SecretScanningAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("is_base64_encoded", m.GetIsBase64Encoded()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("locations_url", m.GetLocationsUrl()) if err != nil { @@ -579,6 +602,10 @@ func (m *SecretScanningAlert) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad9 func (m *SecretScanningAlert) SetHtmlUrl(value *string)() { m.html_url = value } +// SetIsBase64Encoded sets the is_base64_encoded property value. A boolean value representing whether or not alert is base64 encoded +func (m *SecretScanningAlert) SetIsBase64Encoded(value *bool)() { + m.is_base64_encoded = value +} // SetLocationsUrl sets the locations_url property value. The REST API URL of the code locations for this alert. func (m *SecretScanningAlert) SetLocationsUrl(value *string)() { m.locations_url = value @@ -672,6 +699,7 @@ type SecretScanningAlertable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetHtmlUrl()(*string) + GetIsBase64Encoded()(*bool) GetLocationsUrl()(*string) GetMultiRepo()(*bool) GetNumber()(*int32) @@ -696,6 +724,7 @@ type SecretScanningAlertable interface { GetValidity()(*SecretScanningAlert_validity) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetHtmlUrl(value *string)() + SetIsBase64Encoded(value *bool)() SetLocationsUrl(value *string)() SetMultiRepo(value *bool)() SetNumber(value *int32)() From 15f0a3c677e31ccef57b45d2cc9ec759a23cd594 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 14 Feb 2025 00:09:35 +0000 Subject: [PATCH 19/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- .../models/copilot_organization_details.go | 40 ++++++------- ...opilot_organization_details_escaped_cli.go | 2 +- ...zation_details_escaped_ide_escaped_chat.go | 2 +- ...ation_details_escaped_plan_escaped_type.go | 5 +- ...n_details_escaped_platform_escaped_chat.go | 2 +- ...public_escaped_code_escaped_suggestions.go | 7 +-- ...=> copilot_organization_seat_breakdown.go} | 56 +++++++++---------- ...em_sub_escaped_issues_post_request_body.go | 6 +- 9 files changed, 58 insertions(+), 64 deletions(-) rename pkg/github/models/{copilot_seat_breakdown.go => copilot_organization_seat_breakdown.go} (74%) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 33829fdc..f53fbb45 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "C0508A702650A30818E7A2A6E566C062CE73FFAC1FAE973EEB029076B9A3E56CA925AD24AD23AD18A97B497067842F196E1B9C6D23306F571FB2AD27B9394E64", + "descriptionHash": "4AE8F84DABE7CC4E03FCC72896961BB03F6AE342006F4D6ACB34EBF31E14369F2A7511356BC375B3E8EC6B34D8B70A710A20D8033144B0F75CAD99D31F3879E0", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/copilot_organization_details.go b/pkg/github/models/copilot_organization_details.go index 8508ba91..7e65b2fc 100644 --- a/pkg/github/models/copilot_organization_details.go +++ b/pkg/github/models/copilot_organization_details.go @@ -8,18 +8,18 @@ import ( type CopilotOrganizationDetails 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 organization policy for allowing or disallowing organization members to use Copilot within their CLI. + // The organization policy for allowing or disallowing Copilot in the CLI. cli *CopilotOrganizationDetails_cli - // The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + // The organization policy for allowing or disallowing Copilot Chat in the IDE. ide_chat *CopilotOrganizationDetails_ide_chat // The Copilot plan of the organization, or the parent enterprise, when applicable. plan_type *CopilotOrganizationDetails_plan_type - // The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + // The organization policy for allowing or disallowing Copilot features on GitHub.com. platform_chat *CopilotOrganizationDetails_platform_chat - // The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + // The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). public_code_suggestions *CopilotOrganizationDetails_public_code_suggestions // The breakdown of Copilot Business seats for the organization. - seat_breakdown CopilotSeatBreakdownable + seat_breakdown CopilotOrganizationSeatBreakdownable // The mode of assigning new seats. seat_management_setting *CopilotOrganizationDetails_seat_management_setting } @@ -40,7 +40,7 @@ func CreateCopilotOrganizationDetailsFromDiscriminatorValue(parseNode i878a80d23 func (m *CopilotOrganizationDetails) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetCli gets the cli property value. The organization policy for allowing or disallowing organization members to use Copilot within their CLI. +// GetCli gets the cli property value. The organization policy for allowing or disallowing Copilot in the CLI. // returns a *CopilotOrganizationDetails_cli when successful func (m *CopilotOrganizationDetails) GetCli()(*CopilotOrganizationDetails_cli) { return m.cli @@ -100,12 +100,12 @@ func (m *CopilotOrganizationDetails) GetFieldDeserializers()(map[string]func(i87 return nil } res["seat_breakdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateCopilotSeatBreakdownFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateCopilotOrganizationSeatBreakdownFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetSeatBreakdown(val.(CopilotSeatBreakdownable)) + m.SetSeatBreakdown(val.(CopilotOrganizationSeatBreakdownable)) } return nil } @@ -121,7 +121,7 @@ func (m *CopilotOrganizationDetails) GetFieldDeserializers()(map[string]func(i87 } return res } -// GetIdeChat gets the ide_chat property value. The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. +// GetIdeChat gets the ide_chat property value. The organization policy for allowing or disallowing Copilot Chat in the IDE. // returns a *CopilotOrganizationDetails_ide_chat when successful func (m *CopilotOrganizationDetails) GetIdeChat()(*CopilotOrganizationDetails_ide_chat) { return m.ide_chat @@ -131,19 +131,19 @@ func (m *CopilotOrganizationDetails) GetIdeChat()(*CopilotOrganizationDetails_id func (m *CopilotOrganizationDetails) GetPlanType()(*CopilotOrganizationDetails_plan_type) { return m.plan_type } -// GetPlatformChat gets the platform_chat property value. The organization policy for allowing or disallowing organization members to use Copilot features within github.com. +// GetPlatformChat gets the platform_chat property value. The organization policy for allowing or disallowing Copilot features on GitHub.com. // returns a *CopilotOrganizationDetails_platform_chat when successful func (m *CopilotOrganizationDetails) GetPlatformChat()(*CopilotOrganizationDetails_platform_chat) { return m.platform_chat } -// GetPublicCodeSuggestions gets the public_code_suggestions property value. The organization policy for allowing or disallowing Copilot to make suggestions that match public code. +// GetPublicCodeSuggestions gets the public_code_suggestions property value. The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). // returns a *CopilotOrganizationDetails_public_code_suggestions when successful func (m *CopilotOrganizationDetails) GetPublicCodeSuggestions()(*CopilotOrganizationDetails_public_code_suggestions) { return m.public_code_suggestions } // GetSeatBreakdown gets the seat_breakdown property value. The breakdown of Copilot Business seats for the organization. -// returns a CopilotSeatBreakdownable when successful -func (m *CopilotOrganizationDetails) GetSeatBreakdown()(CopilotSeatBreakdownable) { +// returns a CopilotOrganizationSeatBreakdownable when successful +func (m *CopilotOrganizationDetails) GetSeatBreakdown()(CopilotOrganizationSeatBreakdownable) { return m.seat_breakdown } // GetSeatManagementSetting gets the seat_management_setting property value. The mode of assigning new seats. @@ -213,11 +213,11 @@ func (m *CopilotOrganizationDetails) Serialize(writer i878a80d2330e89d26896388a3 func (m *CopilotOrganizationDetails) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetCli sets the cli property value. The organization policy for allowing or disallowing organization members to use Copilot within their CLI. +// SetCli sets the cli property value. The organization policy for allowing or disallowing Copilot in the CLI. func (m *CopilotOrganizationDetails) SetCli(value *CopilotOrganizationDetails_cli)() { m.cli = value } -// SetIdeChat sets the ide_chat property value. The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. +// SetIdeChat sets the ide_chat property value. The organization policy for allowing or disallowing Copilot Chat in the IDE. func (m *CopilotOrganizationDetails) SetIdeChat(value *CopilotOrganizationDetails_ide_chat)() { m.ide_chat = value } @@ -225,16 +225,16 @@ func (m *CopilotOrganizationDetails) SetIdeChat(value *CopilotOrganizationDetail func (m *CopilotOrganizationDetails) SetPlanType(value *CopilotOrganizationDetails_plan_type)() { m.plan_type = value } -// SetPlatformChat sets the platform_chat property value. The organization policy for allowing or disallowing organization members to use Copilot features within github.com. +// SetPlatformChat sets the platform_chat property value. The organization policy for allowing or disallowing Copilot features on GitHub.com. func (m *CopilotOrganizationDetails) SetPlatformChat(value *CopilotOrganizationDetails_platform_chat)() { m.platform_chat = value } -// SetPublicCodeSuggestions sets the public_code_suggestions property value. The organization policy for allowing or disallowing Copilot to make suggestions that match public code. +// SetPublicCodeSuggestions sets the public_code_suggestions property value. The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). func (m *CopilotOrganizationDetails) SetPublicCodeSuggestions(value *CopilotOrganizationDetails_public_code_suggestions)() { m.public_code_suggestions = value } // SetSeatBreakdown sets the seat_breakdown property value. The breakdown of Copilot Business seats for the organization. -func (m *CopilotOrganizationDetails) SetSeatBreakdown(value CopilotSeatBreakdownable)() { +func (m *CopilotOrganizationDetails) SetSeatBreakdown(value CopilotOrganizationSeatBreakdownable)() { m.seat_breakdown = value } // SetSeatManagementSetting sets the seat_management_setting property value. The mode of assigning new seats. @@ -249,13 +249,13 @@ type CopilotOrganizationDetailsable interface { GetPlanType()(*CopilotOrganizationDetails_plan_type) GetPlatformChat()(*CopilotOrganizationDetails_platform_chat) GetPublicCodeSuggestions()(*CopilotOrganizationDetails_public_code_suggestions) - GetSeatBreakdown()(CopilotSeatBreakdownable) + GetSeatBreakdown()(CopilotOrganizationSeatBreakdownable) GetSeatManagementSetting()(*CopilotOrganizationDetails_seat_management_setting) SetCli(value *CopilotOrganizationDetails_cli)() SetIdeChat(value *CopilotOrganizationDetails_ide_chat)() SetPlanType(value *CopilotOrganizationDetails_plan_type)() SetPlatformChat(value *CopilotOrganizationDetails_platform_chat)() SetPublicCodeSuggestions(value *CopilotOrganizationDetails_public_code_suggestions)() - SetSeatBreakdown(value CopilotSeatBreakdownable)() + SetSeatBreakdown(value CopilotOrganizationSeatBreakdownable)() SetSeatManagementSetting(value *CopilotOrganizationDetails_seat_management_setting)() } diff --git a/pkg/github/models/copilot_organization_details_escaped_cli.go b/pkg/github/models/copilot_organization_details_escaped_cli.go index 60e0eebd..19ca7f0e 100644 --- a/pkg/github/models/copilot_organization_details_escaped_cli.go +++ b/pkg/github/models/copilot_organization_details_escaped_cli.go @@ -1,5 +1,5 @@ package models -// The organization policy for allowing or disallowing organization members to use Copilot within their CLI. +// The organization policy for allowing or disallowing Copilot in the CLI. type CopilotOrganizationDetails_cli int const ( diff --git a/pkg/github/models/copilot_organization_details_escaped_ide_escaped_chat.go b/pkg/github/models/copilot_organization_details_escaped_ide_escaped_chat.go index 6f551c3f..42824e70 100644 --- a/pkg/github/models/copilot_organization_details_escaped_ide_escaped_chat.go +++ b/pkg/github/models/copilot_organization_details_escaped_ide_escaped_chat.go @@ -1,5 +1,5 @@ package models -// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. +// The organization policy for allowing or disallowing Copilot Chat in the IDE. type CopilotOrganizationDetails_ide_chat int const ( diff --git a/pkg/github/models/copilot_organization_details_escaped_plan_escaped_type.go b/pkg/github/models/copilot_organization_details_escaped_plan_escaped_type.go index 00b9480c..cf8cfcb1 100644 --- a/pkg/github/models/copilot_organization_details_escaped_plan_escaped_type.go +++ b/pkg/github/models/copilot_organization_details_escaped_plan_escaped_type.go @@ -5,11 +5,10 @@ type CopilotOrganizationDetails_plan_type int const ( BUSINESS_COPILOTORGANIZATIONDETAILS_PLAN_TYPE CopilotOrganizationDetails_plan_type = iota ENTERPRISE_COPILOTORGANIZATIONDETAILS_PLAN_TYPE - UNKNOWN_COPILOTORGANIZATIONDETAILS_PLAN_TYPE ) func (i CopilotOrganizationDetails_plan_type) String() string { - return []string{"business", "enterprise", "unknown"}[i] + return []string{"business", "enterprise"}[i] } func ParseCopilotOrganizationDetails_plan_type(v string) (any, error) { result := BUSINESS_COPILOTORGANIZATIONDETAILS_PLAN_TYPE @@ -18,8 +17,6 @@ func ParseCopilotOrganizationDetails_plan_type(v string) (any, error) { result = BUSINESS_COPILOTORGANIZATIONDETAILS_PLAN_TYPE case "enterprise": result = ENTERPRISE_COPILOTORGANIZATIONDETAILS_PLAN_TYPE - case "unknown": - result = UNKNOWN_COPILOTORGANIZATIONDETAILS_PLAN_TYPE default: return nil, nil } diff --git a/pkg/github/models/copilot_organization_details_escaped_platform_escaped_chat.go b/pkg/github/models/copilot_organization_details_escaped_platform_escaped_chat.go index cd15f1d8..1aed2816 100644 --- a/pkg/github/models/copilot_organization_details_escaped_platform_escaped_chat.go +++ b/pkg/github/models/copilot_organization_details_escaped_platform_escaped_chat.go @@ -1,5 +1,5 @@ package models -// The organization policy for allowing or disallowing organization members to use Copilot features within github.com. +// The organization policy for allowing or disallowing Copilot features on GitHub.com. type CopilotOrganizationDetails_platform_chat int const ( diff --git a/pkg/github/models/copilot_organization_details_escaped_public_escaped_code_escaped_suggestions.go b/pkg/github/models/copilot_organization_details_escaped_public_escaped_code_escaped_suggestions.go index 5f49303c..c64bdd56 100644 --- a/pkg/github/models/copilot_organization_details_escaped_public_escaped_code_escaped_suggestions.go +++ b/pkg/github/models/copilot_organization_details_escaped_public_escaped_code_escaped_suggestions.go @@ -1,16 +1,15 @@ package models -// The organization policy for allowing or disallowing Copilot to make suggestions that match public code. +// The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). type CopilotOrganizationDetails_public_code_suggestions int const ( ALLOW_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS CopilotOrganizationDetails_public_code_suggestions = iota BLOCK_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS UNCONFIGURED_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS - UNKNOWN_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS ) func (i CopilotOrganizationDetails_public_code_suggestions) String() string { - return []string{"allow", "block", "unconfigured", "unknown"}[i] + return []string{"allow", "block", "unconfigured"}[i] } func ParseCopilotOrganizationDetails_public_code_suggestions(v string) (any, error) { result := ALLOW_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS @@ -21,8 +20,6 @@ func ParseCopilotOrganizationDetails_public_code_suggestions(v string) (any, err result = BLOCK_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS case "unconfigured": result = UNCONFIGURED_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS - case "unknown": - result = UNKNOWN_COPILOTORGANIZATIONDETAILS_PUBLIC_CODE_SUGGESTIONS default: return nil, nil } diff --git a/pkg/github/models/copilot_seat_breakdown.go b/pkg/github/models/copilot_organization_seat_breakdown.go similarity index 74% rename from pkg/github/models/copilot_seat_breakdown.go rename to pkg/github/models/copilot_organization_seat_breakdown.go index 87262c58..ada1d4f9 100644 --- a/pkg/github/models/copilot_seat_breakdown.go +++ b/pkg/github/models/copilot_organization_seat_breakdown.go @@ -4,8 +4,8 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// CopilotSeatBreakdown the breakdown of Copilot Business seats for the organization. -type CopilotSeatBreakdown struct { +// CopilotOrganizationSeatBreakdown the breakdown of Copilot Business seats for the organization. +type CopilotOrganizationSeatBreakdown struct { // The number of seats that have used Copilot during the current billing cycle. active_this_cycle *int32 // Seats added during the current billing cycle. @@ -16,41 +16,41 @@ type CopilotSeatBreakdown struct { inactive_this_cycle *int32 // The number of seats that are pending cancellation at the end of the current billing cycle. pending_cancellation *int32 - // The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. + // The number of users who have been invited to receive a Copilot seat through this organization. pending_invitation *int32 // The total number of seats being billed for the organization as of the current billing cycle. total *int32 } -// NewCopilotSeatBreakdown instantiates a new CopilotSeatBreakdown and sets the default values. -func NewCopilotSeatBreakdown()(*CopilotSeatBreakdown) { - m := &CopilotSeatBreakdown{ +// NewCopilotOrganizationSeatBreakdown instantiates a new CopilotOrganizationSeatBreakdown and sets the default values. +func NewCopilotOrganizationSeatBreakdown()(*CopilotOrganizationSeatBreakdown) { + m := &CopilotOrganizationSeatBreakdown{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateCopilotSeatBreakdownFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateCopilotOrganizationSeatBreakdownFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateCopilotSeatBreakdownFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewCopilotSeatBreakdown(), nil +func CreateCopilotOrganizationSeatBreakdownFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotOrganizationSeatBreakdown(), nil } // GetActiveThisCycle gets the active_this_cycle property value. The number of seats that have used Copilot during the current billing cycle. // returns a *int32 when successful -func (m *CopilotSeatBreakdown) GetActiveThisCycle()(*int32) { +func (m *CopilotOrganizationSeatBreakdown) GetActiveThisCycle()(*int32) { return m.active_this_cycle } // GetAddedThisCycle gets the added_this_cycle property value. Seats added during the current billing cycle. // returns a *int32 when successful -func (m *CopilotSeatBreakdown) GetAddedThisCycle()(*int32) { +func (m *CopilotOrganizationSeatBreakdown) GetAddedThisCycle()(*int32) { return m.added_this_cycle } // 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 *CopilotSeatBreakdown) GetAdditionalData()(map[string]any) { +func (m *CopilotOrganizationSeatBreakdown) 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 *CopilotSeatBreakdown) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *CopilotOrganizationSeatBreakdown) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["active_this_cycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() @@ -116,26 +116,26 @@ func (m *CopilotSeatBreakdown) GetFieldDeserializers()(map[string]func(i878a80d2 } // GetInactiveThisCycle gets the inactive_this_cycle property value. The number of seats that have not used Copilot during the current billing cycle. // returns a *int32 when successful -func (m *CopilotSeatBreakdown) GetInactiveThisCycle()(*int32) { +func (m *CopilotOrganizationSeatBreakdown) GetInactiveThisCycle()(*int32) { return m.inactive_this_cycle } // GetPendingCancellation gets the pending_cancellation property value. The number of seats that are pending cancellation at the end of the current billing cycle. // returns a *int32 when successful -func (m *CopilotSeatBreakdown) GetPendingCancellation()(*int32) { +func (m *CopilotOrganizationSeatBreakdown) GetPendingCancellation()(*int32) { return m.pending_cancellation } -// GetPendingInvitation gets the pending_invitation property value. The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. +// GetPendingInvitation gets the pending_invitation property value. The number of users who have been invited to receive a Copilot seat through this organization. // returns a *int32 when successful -func (m *CopilotSeatBreakdown) GetPendingInvitation()(*int32) { +func (m *CopilotOrganizationSeatBreakdown) GetPendingInvitation()(*int32) { return m.pending_invitation } // GetTotal gets the total property value. The total number of seats being billed for the organization as of the current billing cycle. // returns a *int32 when successful -func (m *CopilotSeatBreakdown) GetTotal()(*int32) { +func (m *CopilotOrganizationSeatBreakdown) GetTotal()(*int32) { return m.total } // Serialize serializes information the current object -func (m *CopilotSeatBreakdown) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *CopilotOrganizationSeatBreakdown) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { err := writer.WriteInt32Value("active_this_cycle", m.GetActiveThisCycle()) if err != nil { @@ -181,34 +181,34 @@ func (m *CopilotSeatBreakdown) Serialize(writer i878a80d2330e89d26896388a3f487ee return nil } // SetActiveThisCycle sets the active_this_cycle property value. The number of seats that have used Copilot during the current billing cycle. -func (m *CopilotSeatBreakdown) SetActiveThisCycle(value *int32)() { +func (m *CopilotOrganizationSeatBreakdown) SetActiveThisCycle(value *int32)() { m.active_this_cycle = value } // SetAddedThisCycle sets the added_this_cycle property value. Seats added during the current billing cycle. -func (m *CopilotSeatBreakdown) SetAddedThisCycle(value *int32)() { +func (m *CopilotOrganizationSeatBreakdown) SetAddedThisCycle(value *int32)() { m.added_this_cycle = value } // 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 *CopilotSeatBreakdown) SetAdditionalData(value map[string]any)() { +func (m *CopilotOrganizationSeatBreakdown) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetInactiveThisCycle sets the inactive_this_cycle property value. The number of seats that have not used Copilot during the current billing cycle. -func (m *CopilotSeatBreakdown) SetInactiveThisCycle(value *int32)() { +func (m *CopilotOrganizationSeatBreakdown) SetInactiveThisCycle(value *int32)() { m.inactive_this_cycle = value } // SetPendingCancellation sets the pending_cancellation property value. The number of seats that are pending cancellation at the end of the current billing cycle. -func (m *CopilotSeatBreakdown) SetPendingCancellation(value *int32)() { +func (m *CopilotOrganizationSeatBreakdown) SetPendingCancellation(value *int32)() { m.pending_cancellation = value } -// SetPendingInvitation sets the pending_invitation property value. The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. -func (m *CopilotSeatBreakdown) SetPendingInvitation(value *int32)() { +// SetPendingInvitation sets the pending_invitation property value. The number of users who have been invited to receive a Copilot seat through this organization. +func (m *CopilotOrganizationSeatBreakdown) SetPendingInvitation(value *int32)() { m.pending_invitation = value } // SetTotal sets the total property value. The total number of seats being billed for the organization as of the current billing cycle. -func (m *CopilotSeatBreakdown) SetTotal(value *int32)() { +func (m *CopilotOrganizationSeatBreakdown) SetTotal(value *int32)() { m.total = value } -type CopilotSeatBreakdownable interface { +type CopilotOrganizationSeatBreakdownable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetActiveThisCycle()(*int32) diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go index c17ff1f9..38d9e659 100644 --- a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go @@ -9,7 +9,7 @@ type ItemItemIssuesItemSub_issuesPostRequestBody struct { additionalData map[string]any // Option that, when true, instructs the operation to replace the sub-issues current parent issue replace_parent *bool - // The id of the sub-issue to add. The sub-issue must belong to the same repository as the parent issue + // The id of the sub-issue to add. The sub-issue must belong to the same repository owner as the parent issue sub_issue_id *int32 } // NewItemItemIssuesItemSub_issuesPostRequestBody instantiates a new ItemItemIssuesItemSub_issuesPostRequestBody and sets the default values. @@ -60,7 +60,7 @@ func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetFieldDeserializers()(ma func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetReplaceParent()(*bool) { return m.replace_parent } -// GetSubIssueId gets the sub_issue_id property value. The id of the sub-issue to add. The sub-issue must belong to the same repository as the parent issue +// GetSubIssueId gets the sub_issue_id property value. The id of the sub-issue to add. The sub-issue must belong to the same repository owner as the parent issue // returns a *int32 when successful func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetSubIssueId()(*int32) { return m.sub_issue_id @@ -95,7 +95,7 @@ func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetAdditionalData(value ma func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetReplaceParent(value *bool)() { m.replace_parent = value } -// SetSubIssueId sets the sub_issue_id property value. The id of the sub-issue to add. The sub-issue must belong to the same repository as the parent issue +// SetSubIssueId sets the sub_issue_id property value. The id of the sub-issue to add. The sub-issue must belong to the same repository owner as the parent issue func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetSubIssueId(value *int32)() { m.sub_issue_id = value } From 9e50a356206f5b8a3d8ef82056ada7074a8b35f9 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 22 Feb 2025 00:09:23 +0000 Subject: [PATCH 20/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/artifact.go | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index f53fbb45..d6244023 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "4AE8F84DABE7CC4E03FCC72896961BB03F6AE342006F4D6ACB34EBF31E14369F2A7511356BC375B3E8EC6B34D8B70A710A20D8033144B0F75CAD99D31F3879E0", + "descriptionHash": "EDFD98A2A411F4A5023128D32E2865CA9369DEFE651A98248E049933FB67037AB211957E8638ECC7DD206BFABF0D3E30233F974503F89E290B17E1C4B8ABC570", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/artifact.go b/pkg/github/models/artifact.go index ef53f106..13508416 100644 --- a/pkg/github/models/artifact.go +++ b/pkg/github/models/artifact.go @@ -13,6 +13,8 @@ type Artifact struct { archive_download_url *string // The created_at property created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The SHA256 digest of the artifact. This field will only be populated on artifacts uploaded with upload-artifact v4 or newer. For older versions, this field will be null. + digest *string // Whether or not the artifact has expired. expired *bool // The expires_at property @@ -59,6 +61,11 @@ func (m *Artifact) GetArchiveDownloadUrl()(*string) { func (m *Artifact) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { return m.created_at } +// GetDigest gets the digest property value. The SHA256 digest of the artifact. This field will only be populated on artifacts uploaded with upload-artifact v4 or newer. For older versions, this field will be null. +// returns a *string when successful +func (m *Artifact) GetDigest()(*string) { + return m.digest +} // GetExpired gets the expired property value. Whether or not the artifact has expired. // returns a *bool when successful func (m *Artifact) GetExpired()(*bool) { @@ -93,6 +100,16 @@ func (m *Artifact) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896 } return nil } + res["digest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDigest(val) + } + return nil + } res["expired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -234,6 +251,12 @@ func (m *Artifact) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01 return err } } + { + err := writer.WriteStringValue("digest", m.GetDigest()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("expired", m.GetExpired()) if err != nil { @@ -308,6 +331,10 @@ func (m *Artifact) SetArchiveDownloadUrl(value *string)() { func (m *Artifact) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.created_at = value } +// SetDigest sets the digest property value. The SHA256 digest of the artifact. This field will only be populated on artifacts uploaded with upload-artifact v4 or newer. For older versions, this field will be null. +func (m *Artifact) SetDigest(value *string)() { + m.digest = value +} // SetExpired sets the expired property value. Whether or not the artifact has expired. func (m *Artifact) SetExpired(value *bool)() { m.expired = value @@ -349,6 +376,7 @@ type Artifactable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetArchiveDownloadUrl()(*string) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDigest()(*string) GetExpired()(*bool) GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetId()(*int32) @@ -360,6 +388,7 @@ type Artifactable interface { GetWorkflowRun()(Artifact_workflow_runable) SetArchiveDownloadUrl(value *string)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDigest(value *string)() SetExpired(value *bool)() SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetId(value *int32)() From cbe870280b63bd798bd11a3d5eae8f8bd5302cc1 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 27 Feb 2025 00:09:59 +0000 Subject: [PATCH 21/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- ...1c43982ad8e452d891455ac3654f15d4f0c48ac.go | 37 +++++++++++++++++++ .../models/code_security_configuration.go | 30 +++++++++++++++ ...1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go | 37 +++++++++++++++++++ ...47c2f6536fec11000269972e9cb56eb006f7bcd.go | 37 +++++++++++++++++++ .../orgs/with_org_item_request_builder.go | 4 +- ...ts_item_autofix_commits_request_builder.go | 4 +- 7 files changed, 146 insertions(+), 5 deletions(-) create mode 100644 pkg/github/models/8b9d5037245d057cf01dceab81c43982ad8e452d891455ac3654f15d4f0c48ac.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index d6244023..299233fd 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "EDFD98A2A411F4A5023128D32E2865CA9369DEFE651A98248E049933FB67037AB211957E8638ECC7DD206BFABF0D3E30233F974503F89E290B17E1C4B8ABC570", + "descriptionHash": "64EB32DFE8B16256EBF4D5F9666527C83CA24C5B34D998F33E82E8C54B10F8FCBF68498A40EA2DD745EC8054D95BDDDA6AE7192AC851CA9BC23CB85182DE074B", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/8b9d5037245d057cf01dceab81c43982ad8e452d891455ac3654f15d4f0c48ac.go b/pkg/github/models/8b9d5037245d057cf01dceab81c43982ad8e452d891455ac3654f15d4f0c48ac.go new file mode 100644 index 00000000..8f2e9dac --- /dev/null +++ b/pkg/github/models/8b9d5037245d057cf01dceab81c43982ad8e452d891455ac3654f15d4f0c48ac.go @@ -0,0 +1,37 @@ +package models +// The enablement status of secret scanning delegated alert dismissal +type CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal int + +const ( + ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal = iota + DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL +) + +func (i CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + default: + return nil, nil + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal(values []CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration.go b/pkg/github/models/code_security_configuration.go index af22e337..fa35acd1 100644 --- a/pkg/github/models/code_security_configuration.go +++ b/pkg/github/models/code_security_configuration.go @@ -41,6 +41,8 @@ type CodeSecurityConfiguration struct { private_vulnerability_reporting *CodeSecurityConfiguration_private_vulnerability_reporting // The enablement status of secret scanning secret_scanning *CodeSecurityConfiguration_secret_scanning + // The enablement status of secret scanning delegated alert dismissal + secret_scanning_delegated_alert_dismissal *CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal // The enablement status of secret scanning delegated bypass secret_scanning_delegated_bypass *CodeSecurityConfiguration_secret_scanning_delegated_bypass // Feature options for secret scanning delegated bypass @@ -294,6 +296,16 @@ func (m *CodeSecurityConfiguration) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["secret_scanning_delegated_alert_dismissal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningDelegatedAlertDismissal(val.(*CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal)) + } + return nil + } res["secret_scanning_delegated_bypass"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_secret_scanning_delegated_bypass) if err != nil { @@ -401,6 +413,11 @@ func (m *CodeSecurityConfiguration) GetPrivateVulnerabilityReporting()(*CodeSecu func (m *CodeSecurityConfiguration) GetSecretScanning()(*CodeSecurityConfiguration_secret_scanning) { return m.secret_scanning } +// GetSecretScanningDelegatedAlertDismissal gets the secret_scanning_delegated_alert_dismissal property value. The enablement status of secret scanning delegated alert dismissal +// returns a *CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal when successful +func (m *CodeSecurityConfiguration) GetSecretScanningDelegatedAlertDismissal()(*CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal) { + return m.secret_scanning_delegated_alert_dismissal +} // GetSecretScanningDelegatedBypass gets the secret_scanning_delegated_bypass property value. The enablement status of secret scanning delegated bypass // returns a *CodeSecurityConfiguration_secret_scanning_delegated_bypass when successful func (m *CodeSecurityConfiguration) GetSecretScanningDelegatedBypass()(*CodeSecurityConfiguration_secret_scanning_delegated_bypass) { @@ -548,6 +565,13 @@ func (m *CodeSecurityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetSecretScanningDelegatedAlertDismissal() != nil { + cast := (*m.GetSecretScanningDelegatedAlertDismissal()).String() + err := writer.WriteStringValue("secret_scanning_delegated_alert_dismissal", &cast) + if err != nil { + return err + } + } if m.GetSecretScanningDelegatedBypass() != nil { cast := (*m.GetSecretScanningDelegatedBypass()).String() err := writer.WriteStringValue("secret_scanning_delegated_bypass", &cast) @@ -677,6 +701,10 @@ func (m *CodeSecurityConfiguration) SetPrivateVulnerabilityReporting(value *Code func (m *CodeSecurityConfiguration) SetSecretScanning(value *CodeSecurityConfiguration_secret_scanning)() { m.secret_scanning = value } +// SetSecretScanningDelegatedAlertDismissal sets the secret_scanning_delegated_alert_dismissal property value. The enablement status of secret scanning delegated alert dismissal +func (m *CodeSecurityConfiguration) SetSecretScanningDelegatedAlertDismissal(value *CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal)() { + m.secret_scanning_delegated_alert_dismissal = value +} // SetSecretScanningDelegatedBypass sets the secret_scanning_delegated_bypass property value. The enablement status of secret scanning delegated bypass func (m *CodeSecurityConfiguration) SetSecretScanningDelegatedBypass(value *CodeSecurityConfiguration_secret_scanning_delegated_bypass)() { m.secret_scanning_delegated_bypass = value @@ -728,6 +756,7 @@ type CodeSecurityConfigurationable interface { GetName()(*string) GetPrivateVulnerabilityReporting()(*CodeSecurityConfiguration_private_vulnerability_reporting) GetSecretScanning()(*CodeSecurityConfiguration_secret_scanning) + GetSecretScanningDelegatedAlertDismissal()(*CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal) GetSecretScanningDelegatedBypass()(*CodeSecurityConfiguration_secret_scanning_delegated_bypass) GetSecretScanningDelegatedBypassOptions()(CodeSecurityConfiguration_secret_scanning_delegated_bypass_optionsable) GetSecretScanningNonProviderPatterns()(*CodeSecurityConfiguration_secret_scanning_non_provider_patterns) @@ -752,6 +781,7 @@ type CodeSecurityConfigurationable interface { SetName(value *string)() SetPrivateVulnerabilityReporting(value *CodeSecurityConfiguration_private_vulnerability_reporting)() SetSecretScanning(value *CodeSecurityConfiguration_secret_scanning)() + SetSecretScanningDelegatedAlertDismissal(value *CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal)() SetSecretScanningDelegatedBypass(value *CodeSecurityConfiguration_secret_scanning_delegated_bypass)() SetSecretScanningDelegatedBypassOptions(value CodeSecurityConfiguration_secret_scanning_delegated_bypass_optionsable)() SetSecretScanningNonProviderPatterns(value *CodeSecurityConfiguration_secret_scanning_non_provider_patterns)() diff --git a/pkg/github/orgs/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go b/pkg/github/orgs/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go new file mode 100644 index 00000000..14145bb7 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go @@ -0,0 +1,37 @@ +package configurations +// The enablement status of secret scanning delegated alert dismissal +type ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL +) + +func (i ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + default: + return nil, nil + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal(values []ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go b/pkg/github/orgs/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go new file mode 100644 index 00000000..ffd2b9f1 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go @@ -0,0 +1,37 @@ +package item +// The enablement status of secret scanning delegated alert dismissal +type WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL +) + +func (i WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + default: + return nil, nil + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal(values []WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/with_org_item_request_builder.go b/pkg/github/orgs/with_org_item_request_builder.go index 153059c9..89ca3625 100644 --- a/pkg/github/orgs/with_org_item_request_builder.go +++ b/pkg/github/orgs/with_org_item_request_builder.go @@ -115,7 +115,7 @@ func (m *WithOrgItemRequestBuilder) Events()(*ItemEventsRequestBuilder) { func (m *WithOrgItemRequestBuilder) Failed_invitations()(*ItemFailed_invitationsRequestBuilder) { return NewItemFailed_invitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. +// Get gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. // returns a OrganizationFullable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -304,7 +304,7 @@ func (m *WithOrgItemRequestBuilder) ToDeleteRequestInformation(ctx context.Conte requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. +// ToGetRequestInformation gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. // returns a *RequestInformation when successful func (m *WithOrgItemRequestBuilder) 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_code_scanning_alerts_item_autofix_commits_request_builder.go b/pkg/github/repos/item_item_code_scanning_alerts_item_autofix_commits_request_builder.go index 719da89b..289855a3 100644 --- a/pkg/github/repos/item_item_code_scanning_alerts_item_autofix_commits_request_builder.go +++ b/pkg/github/repos/item_item_code_scanning_alerts_item_autofix_commits_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemCodeScanningAlertsItemAutofixCommitsRequestBuilder(rawUrl string urlParams["request-raw-url"] = rawUrl return NewItemItemCodeScanningAlertsItemAutofixCommitsRequestBuilderInternal(urlParams, requestAdapter) } -// Post commits an autofix for a code scanning alert.If an autofix is commited as a result of this request, then this endpoint will return a 201 Created response.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// Post commits an autofix for a code scanning alert.If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. // returns a CodeScanningAutofixCommitsResponseable when successful // returns a BasicError error when the service returns a 400 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemItemCodeScanningAlertsItemAutofixCommitsRequestBuilder) Post(ctx co } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningAutofixCommitsResponseable), nil } -// ToPostRequestInformation commits an autofix for a code scanning alert.If an autofix is commited as a result of this request, then this endpoint will return a 201 Created response.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. +// ToPostRequestInformation commits an autofix for a code scanning alert.If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. // returns a *RequestInformation when successful func (m *ItemItemCodeScanningAlertsItemAutofixCommitsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningAutofixCommitsable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From b17ee06c9d63a399e4a4e93b198a551720ec3b38 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 28 Feb 2025 00:09:53 +0000 Subject: [PATCH 22/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- ...ry_rule_pull_request_escaped_parameters.go | 6 +- pkg/github/models/sigstore_bundle0.go | 139 ---------- .../sigstore_bundle0_escaped_dsse_envelope.go | 150 ----------- ...scaped_dsse_envelope_escaped_signatures.go | 109 -------- ...e_bundle0_escaped_verification_material.go | 150 ----------- ...ification_material_escaped_tlog_entries.go | 254 ------------------ ..._tlog_entries_escaped_inclusion_promise.go | 80 ------ ...caped_tlog_entries_escaped_kind_version.go | 109 -------- ...ial_escaped_tlog_entries_escaped_log_id.go | 80 ------ ...material_escaped_x509_certificate_chain.go | 92 ------- ..._certificate_chain_escaped_certificates.go | 80 ------ ...ect_escaped_digest_item_request_builder.go | 4 +- ...ect_escaped_digest_item_request_builder.go | 4 +- ...37904f35eeccfec3a60c5483f493c49ecf41b6c.go | 51 ++++ ...e93e4be6e10455c61c408493023f9e113cf8fc4.go | 51 ++++ ...igest_get_response_escaped_attestations.go | 23 +- ...nse_escaped_attestations_escaped_bundle.go | 139 ++++++++++ ...ect_escaped_digest_item_request_builder.go | 4 +- 19 files changed, 265 insertions(+), 1262 deletions(-) delete mode 100644 pkg/github/models/sigstore_bundle0.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_dsse_envelope.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_dsse_envelope_escaped_signatures.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_verification_material.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_inclusion_promise.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_kind_version.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_log_id.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain.go delete mode 100644 pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain_escaped_certificates.go create mode 100644 pkg/github/users/8754136e29101d16f0aa1718437904f35eeccfec3a60c5483f493c49ecf41b6c.go create mode 100644 pkg/github/users/f344491b81c70db2f2a7191f4e93e4be6e10455c61c408493023f9e113cf8fc4.go create mode 100644 pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations_escaped_bundle.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 299233fd..5dddb3da 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "64EB32DFE8B16256EBF4D5F9666527C83CA24C5B34D998F33E82E8C54B10F8FCBF68498A40EA2DD745EC8054D95BDDDA6AE7192AC851CA9BC23CB85182DE074B", + "descriptionHash": "2537CD81A91EDDC09316F1D8250F23BFF08721F9294B3C4BA793800FC602361691A63121535941A12EAB4A4F647ADC0EA341F5143BBD879BB16C99295E1A7EEC", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/repository_rule_pull_request_escaped_parameters.go b/pkg/github/models/repository_rule_pull_request_escaped_parameters.go index 19b2046f..2fa3c685 100644 --- a/pkg/github/models/repository_rule_pull_request_escaped_parameters.go +++ b/pkg/github/models/repository_rule_pull_request_escaped_parameters.go @@ -7,7 +7,7 @@ import ( type RepositoryRulePullRequest_parameters struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. + // Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. allowed_merge_methods []string // New, reviewable commits pushed will dismiss previous pull request review approvals. dismiss_stale_reviews_on_push *bool @@ -37,7 +37,7 @@ func CreateRepositoryRulePullRequest_parametersFromDiscriminatorValue(parseNode func (m *RepositoryRulePullRequest_parameters) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetAllowedMergeMethods gets the allowed_merge_methods property value. When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. +// GetAllowedMergeMethods gets the allowed_merge_methods property value. Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. // returns a []string when successful func (m *RepositoryRulePullRequest_parameters) GetAllowedMergeMethods()([]string) { return m.allowed_merge_methods @@ -189,7 +189,7 @@ func (m *RepositoryRulePullRequest_parameters) Serialize(writer i878a80d2330e89d func (m *RepositoryRulePullRequest_parameters) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetAllowedMergeMethods sets the allowed_merge_methods property value. When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. +// SetAllowedMergeMethods sets the allowed_merge_methods property value. Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. func (m *RepositoryRulePullRequest_parameters) SetAllowedMergeMethods(value []string)() { m.allowed_merge_methods = value } diff --git a/pkg/github/models/sigstore_bundle0.go b/pkg/github/models/sigstore_bundle0.go deleted file mode 100644 index 45c6d51f..00000000 --- a/pkg/github/models/sigstore_bundle0.go +++ /dev/null @@ -1,139 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -// SigstoreBundle0 sigstore Bundle v0.1 -type SigstoreBundle0 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 dsseEnvelope property - dsseEnvelope SigstoreBundle0_dsseEnvelopeable - // The mediaType property - mediaType *string - // The verificationMaterial property - verificationMaterial SigstoreBundle0_verificationMaterialable -} -// NewSigstoreBundle0 instantiates a new SigstoreBundle0 and sets the default values. -func NewSigstoreBundle0()(*SigstoreBundle0) { - m := &SigstoreBundle0{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0(), 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 *SigstoreBundle0) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property -// returns a SigstoreBundle0_dsseEnvelopeable when successful -func (m *SigstoreBundle0) GetDsseEnvelope()(SigstoreBundle0_dsseEnvelopeable) { - return m.dsseEnvelope -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *SigstoreBundle0) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetDsseEnvelope(val.(SigstoreBundle0_dsseEnvelopeable)) - } - return nil - } - res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMediaType(val) - } - return nil - } - res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetVerificationMaterial(val.(SigstoreBundle0_verificationMaterialable)) - } - return nil - } - return res -} -// GetMediaType gets the mediaType property value. The mediaType property -// returns a *string when successful -func (m *SigstoreBundle0) GetMediaType()(*string) { - return m.mediaType -} -// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property -// returns a SigstoreBundle0_verificationMaterialable when successful -func (m *SigstoreBundle0) GetVerificationMaterial()(SigstoreBundle0_verificationMaterialable) { - return m.verificationMaterial -} -// Serialize serializes information the current object -func (m *SigstoreBundle0) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("mediaType", m.GetMediaType()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) - 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 *SigstoreBundle0) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property -func (m *SigstoreBundle0) SetDsseEnvelope(value SigstoreBundle0_dsseEnvelopeable)() { - m.dsseEnvelope = value -} -// SetMediaType sets the mediaType property value. The mediaType property -func (m *SigstoreBundle0) SetMediaType(value *string)() { - m.mediaType = value -} -// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property -func (m *SigstoreBundle0) SetVerificationMaterial(value SigstoreBundle0_verificationMaterialable)() { - m.verificationMaterial = value -} -type SigstoreBundle0able interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetDsseEnvelope()(SigstoreBundle0_dsseEnvelopeable) - GetMediaType()(*string) - GetVerificationMaterial()(SigstoreBundle0_verificationMaterialable) - SetDsseEnvelope(value SigstoreBundle0_dsseEnvelopeable)() - SetMediaType(value *string)() - SetVerificationMaterial(value SigstoreBundle0_verificationMaterialable)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_dsse_envelope.go b/pkg/github/models/sigstore_bundle0_escaped_dsse_envelope.go deleted file mode 100644 index dbfa43c9..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_dsse_envelope.go +++ /dev/null @@ -1,150 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_dsseEnvelope 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 payload property - payload *string - // The payloadType property - payloadType *string - // The signatures property - signatures []SigstoreBundle0_dsseEnvelope_signaturesable -} -// NewSigstoreBundle0_dsseEnvelope instantiates a new SigstoreBundle0_dsseEnvelope and sets the default values. -func NewSigstoreBundle0_dsseEnvelope()(*SigstoreBundle0_dsseEnvelope) { - m := &SigstoreBundle0_dsseEnvelope{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_dsseEnvelope(), 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 *SigstoreBundle0_dsseEnvelope) 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 *SigstoreBundle0_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetPayload(val) - } - return nil - } - res["payloadType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetPayloadType(val) - } - return nil - } - res["signatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]SigstoreBundle0_dsseEnvelope_signaturesable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(SigstoreBundle0_dsseEnvelope_signaturesable) - } - } - m.SetSignatures(res) - } - return nil - } - return res -} -// GetPayload gets the payload property value. The payload property -// returns a *string when successful -func (m *SigstoreBundle0_dsseEnvelope) GetPayload()(*string) { - return m.payload -} -// GetPayloadType gets the payloadType property value. The payloadType property -// returns a *string when successful -func (m *SigstoreBundle0_dsseEnvelope) GetPayloadType()(*string) { - return m.payloadType -} -// GetSignatures gets the signatures property value. The signatures property -// returns a []SigstoreBundle0_dsseEnvelope_signaturesable when successful -func (m *SigstoreBundle0_dsseEnvelope) GetSignatures()([]SigstoreBundle0_dsseEnvelope_signaturesable) { - return m.signatures -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("payload", m.GetPayload()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("payloadType", m.GetPayloadType()) - if err != nil { - return err - } - } - if m.GetSignatures() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSignatures())) - for i, v := range m.GetSignatures() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("signatures", 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 *SigstoreBundle0_dsseEnvelope) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetPayload sets the payload property value. The payload property -func (m *SigstoreBundle0_dsseEnvelope) SetPayload(value *string)() { - m.payload = value -} -// SetPayloadType sets the payloadType property value. The payloadType property -func (m *SigstoreBundle0_dsseEnvelope) SetPayloadType(value *string)() { - m.payloadType = value -} -// SetSignatures sets the signatures property value. The signatures property -func (m *SigstoreBundle0_dsseEnvelope) SetSignatures(value []SigstoreBundle0_dsseEnvelope_signaturesable)() { - m.signatures = value -} -type SigstoreBundle0_dsseEnvelopeable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetPayload()(*string) - GetPayloadType()(*string) - GetSignatures()([]SigstoreBundle0_dsseEnvelope_signaturesable) - SetPayload(value *string)() - SetPayloadType(value *string)() - SetSignatures(value []SigstoreBundle0_dsseEnvelope_signaturesable)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_dsse_envelope_escaped_signatures.go b/pkg/github/models/sigstore_bundle0_escaped_dsse_envelope_escaped_signatures.go deleted file mode 100644 index 92c1cf2d..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_dsse_envelope_escaped_signatures.go +++ /dev/null @@ -1,109 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_dsseEnvelope_signatures 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 keyid property - keyid *string - // The sig property - sig *string -} -// NewSigstoreBundle0_dsseEnvelope_signatures instantiates a new SigstoreBundle0_dsseEnvelope_signatures and sets the default values. -func NewSigstoreBundle0_dsseEnvelope_signatures()(*SigstoreBundle0_dsseEnvelope_signatures) { - m := &SigstoreBundle0_dsseEnvelope_signatures{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_dsseEnvelope_signatures(), 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 *SigstoreBundle0_dsseEnvelope_signatures) 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 *SigstoreBundle0_dsseEnvelope_signatures) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["keyid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetKeyid(val) - } - return nil - } - res["sig"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSig(val) - } - return nil - } - return res -} -// GetKeyid gets the keyid property value. The keyid property -// returns a *string when successful -func (m *SigstoreBundle0_dsseEnvelope_signatures) GetKeyid()(*string) { - return m.keyid -} -// GetSig gets the sig property value. The sig property -// returns a *string when successful -func (m *SigstoreBundle0_dsseEnvelope_signatures) GetSig()(*string) { - return m.sig -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_dsseEnvelope_signatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("keyid", m.GetKeyid()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("sig", m.GetSig()) - 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 *SigstoreBundle0_dsseEnvelope_signatures) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetKeyid sets the keyid property value. The keyid property -func (m *SigstoreBundle0_dsseEnvelope_signatures) SetKeyid(value *string)() { - m.keyid = value -} -// SetSig sets the sig property value. The sig property -func (m *SigstoreBundle0_dsseEnvelope_signatures) SetSig(value *string)() { - m.sig = value -} -type SigstoreBundle0_dsseEnvelope_signaturesable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetKeyid()(*string) - GetSig()(*string) - SetKeyid(value *string)() - SetSig(value *string)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_verification_material.go b/pkg/github/models/sigstore_bundle0_escaped_verification_material.go deleted file mode 100644 index a80a4265..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_verification_material.go +++ /dev/null @@ -1,150 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_verificationMaterial 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 timestampVerificationData property - timestampVerificationData *string - // The tlogEntries property - tlogEntries []SigstoreBundle0_verificationMaterial_tlogEntriesable - // The x509CertificateChain property - x509CertificateChain SigstoreBundle0_verificationMaterial_x509CertificateChainable -} -// NewSigstoreBundle0_verificationMaterial instantiates a new SigstoreBundle0_verificationMaterial and sets the default values. -func NewSigstoreBundle0_verificationMaterial()(*SigstoreBundle0_verificationMaterial) { - m := &SigstoreBundle0_verificationMaterial{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_verificationMaterial(), 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 *SigstoreBundle0_verificationMaterial) 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 *SigstoreBundle0_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["timestampVerificationData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTimestampVerificationData(val) - } - return nil - } - res["tlogEntries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]SigstoreBundle0_verificationMaterial_tlogEntriesable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(SigstoreBundle0_verificationMaterial_tlogEntriesable) - } - } - m.SetTlogEntries(res) - } - return nil - } - res["x509CertificateChain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetX509CertificateChain(val.(SigstoreBundle0_verificationMaterial_x509CertificateChainable)) - } - return nil - } - return res -} -// GetTimestampVerificationData gets the timestampVerificationData property value. The timestampVerificationData property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial) GetTimestampVerificationData()(*string) { - return m.timestampVerificationData -} -// GetTlogEntries gets the tlogEntries property value. The tlogEntries property -// returns a []SigstoreBundle0_verificationMaterial_tlogEntriesable when successful -func (m *SigstoreBundle0_verificationMaterial) GetTlogEntries()([]SigstoreBundle0_verificationMaterial_tlogEntriesable) { - return m.tlogEntries -} -// GetX509CertificateChain gets the x509CertificateChain property value. The x509CertificateChain property -// returns a SigstoreBundle0_verificationMaterial_x509CertificateChainable when successful -func (m *SigstoreBundle0_verificationMaterial) GetX509CertificateChain()(SigstoreBundle0_verificationMaterial_x509CertificateChainable) { - return m.x509CertificateChain -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("timestampVerificationData", m.GetTimestampVerificationData()) - if err != nil { - return err - } - } - if m.GetTlogEntries() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTlogEntries())) - for i, v := range m.GetTlogEntries() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("tlogEntries", cast) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("x509CertificateChain", m.GetX509CertificateChain()) - 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 *SigstoreBundle0_verificationMaterial) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetTimestampVerificationData sets the timestampVerificationData property value. The timestampVerificationData property -func (m *SigstoreBundle0_verificationMaterial) SetTimestampVerificationData(value *string)() { - m.timestampVerificationData = value -} -// SetTlogEntries sets the tlogEntries property value. The tlogEntries property -func (m *SigstoreBundle0_verificationMaterial) SetTlogEntries(value []SigstoreBundle0_verificationMaterial_tlogEntriesable)() { - m.tlogEntries = value -} -// SetX509CertificateChain sets the x509CertificateChain property value. The x509CertificateChain property -func (m *SigstoreBundle0_verificationMaterial) SetX509CertificateChain(value SigstoreBundle0_verificationMaterial_x509CertificateChainable)() { - m.x509CertificateChain = value -} -type SigstoreBundle0_verificationMaterialable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetTimestampVerificationData()(*string) - GetTlogEntries()([]SigstoreBundle0_verificationMaterial_tlogEntriesable) - GetX509CertificateChain()(SigstoreBundle0_verificationMaterial_x509CertificateChainable) - SetTimestampVerificationData(value *string)() - SetTlogEntries(value []SigstoreBundle0_verificationMaterial_tlogEntriesable)() - SetX509CertificateChain(value SigstoreBundle0_verificationMaterial_x509CertificateChainable)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries.go b/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries.go deleted file mode 100644 index c406172d..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries.go +++ /dev/null @@ -1,254 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_verificationMaterial_tlogEntries 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 canonicalizedBody property - canonicalizedBody *string - // The inclusionPromise property - inclusionPromise SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable - // The inclusionProof property - inclusionProof *string - // The integratedTime property - integratedTime *string - // The kindVersion property - kindVersion SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable - // The logId property - logId SigstoreBundle0_verificationMaterial_tlogEntries_logIdable - // The logIndex property - logIndex *string -} -// NewSigstoreBundle0_verificationMaterial_tlogEntries instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries and sets the default values. -func NewSigstoreBundle0_verificationMaterial_tlogEntries()(*SigstoreBundle0_verificationMaterial_tlogEntries) { - m := &SigstoreBundle0_verificationMaterial_tlogEntries{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_verificationMaterial_tlogEntries(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetCanonicalizedBody gets the canonicalizedBody property value. The canonicalizedBody property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetCanonicalizedBody()(*string) { - return m.canonicalizedBody -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["canonicalizedBody"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetCanonicalizedBody(val) - } - return nil - } - res["inclusionPromise"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetInclusionPromise(val.(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)) - } - return nil - } - res["inclusionProof"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetInclusionProof(val) - } - return nil - } - res["integratedTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetIntegratedTime(val) - } - return nil - } - res["kindVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetKindVersion(val.(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)) - } - return nil - } - res["logId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetLogId(val.(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)) - } - return nil - } - res["logIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLogIndex(val) - } - return nil - } - return res -} -// GetInclusionPromise gets the inclusionPromise property value. The inclusionPromise property -// returns a SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetInclusionPromise()(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable) { - return m.inclusionPromise -} -// GetInclusionProof gets the inclusionProof property value. The inclusionProof property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetInclusionProof()(*string) { - return m.inclusionProof -} -// GetIntegratedTime gets the integratedTime property value. The integratedTime property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetIntegratedTime()(*string) { - return m.integratedTime -} -// GetKindVersion gets the kindVersion property value. The kindVersion property -// returns a SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetKindVersion()(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable) { - return m.kindVersion -} -// GetLogId gets the logId property value. The logId property -// returns a SigstoreBundle0_verificationMaterial_tlogEntries_logIdable when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetLogId()(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable) { - return m.logId -} -// GetLogIndex gets the logIndex property value. The logIndex property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetLogIndex()(*string) { - return m.logIndex -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("canonicalizedBody", m.GetCanonicalizedBody()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("inclusionPromise", m.GetInclusionPromise()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("inclusionProof", m.GetInclusionProof()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("integratedTime", m.GetIntegratedTime()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("kindVersion", m.GetKindVersion()) - if err != nil { - return err - } - } - { - err := writer.WriteObjectValue("logId", m.GetLogId()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("logIndex", m.GetLogIndex()) - 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 *SigstoreBundle0_verificationMaterial_tlogEntries) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetCanonicalizedBody sets the canonicalizedBody property value. The canonicalizedBody property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetCanonicalizedBody(value *string)() { - m.canonicalizedBody = value -} -// SetInclusionPromise sets the inclusionPromise property value. The inclusionPromise property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetInclusionPromise(value SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)() { - m.inclusionPromise = value -} -// SetInclusionProof sets the inclusionProof property value. The inclusionProof property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetInclusionProof(value *string)() { - m.inclusionProof = value -} -// SetIntegratedTime sets the integratedTime property value. The integratedTime property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetIntegratedTime(value *string)() { - m.integratedTime = value -} -// SetKindVersion sets the kindVersion property value. The kindVersion property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetKindVersion(value SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)() { - m.kindVersion = value -} -// SetLogId sets the logId property value. The logId property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetLogId(value SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)() { - m.logId = value -} -// SetLogIndex sets the logIndex property value. The logIndex property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetLogIndex(value *string)() { - m.logIndex = value -} -type SigstoreBundle0_verificationMaterial_tlogEntriesable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetCanonicalizedBody()(*string) - GetInclusionPromise()(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable) - GetInclusionProof()(*string) - GetIntegratedTime()(*string) - GetKindVersion()(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable) - GetLogId()(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable) - GetLogIndex()(*string) - SetCanonicalizedBody(value *string)() - SetInclusionPromise(value SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)() - SetInclusionProof(value *string)() - SetIntegratedTime(value *string)() - SetKindVersion(value SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)() - SetLogId(value SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)() - SetLogIndex(value *string)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_inclusion_promise.go b/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_inclusion_promise.go deleted file mode 100644 index f10a0221..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_inclusion_promise.go +++ /dev/null @@ -1,80 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise 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 signedEntryTimestamp property - signedEntryTimestamp *string -} -// NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise and sets the default values. -func NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise()(*SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) { - m := &SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) 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 *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["signedEntryTimestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetSignedEntryTimestamp(val) - } - return nil - } - return res -} -// GetSignedEntryTimestamp gets the signedEntryTimestamp property value. The signedEntryTimestamp property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) GetSignedEntryTimestamp()(*string) { - return m.signedEntryTimestamp -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("signedEntryTimestamp", m.GetSignedEntryTimestamp()) - 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 *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetSignedEntryTimestamp sets the signedEntryTimestamp property value. The signedEntryTimestamp property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) SetSignedEntryTimestamp(value *string)() { - m.signedEntryTimestamp = value -} -type SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetSignedEntryTimestamp()(*string) - SetSignedEntryTimestamp(value *string)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_kind_version.go b/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_kind_version.go deleted file mode 100644 index 9715e6a9..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_kind_version.go +++ /dev/null @@ -1,109 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion 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 kind property - kind *string - // The version property - version *string -} -// NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion and sets the default values. -func NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion()(*SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) { - m := &SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) 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 *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["kind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetKind(val) - } - return nil - } - res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetVersion(val) - } - return nil - } - return res -} -// GetKind gets the kind property value. The kind property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetKind()(*string) { - return m.kind -} -// GetVersion gets the version property value. The version property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetVersion()(*string) { - return m.version -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("kind", m.GetKind()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("version", m.GetVersion()) - 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 *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetKind sets the kind property value. The kind property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetKind(value *string)() { - m.kind = value -} -// SetVersion sets the version property value. The version property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetVersion(value *string)() { - m.version = value -} -type SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetKind()(*string) - GetVersion()(*string) - SetKind(value *string)() - SetVersion(value *string)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_log_id.go b/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_log_id.go deleted file mode 100644 index a7884c68..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_tlog_entries_escaped_log_id.go +++ /dev/null @@ -1,80 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_verificationMaterial_tlogEntries_logId 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 keyId property - keyId *string -} -// NewSigstoreBundle0_verificationMaterial_tlogEntries_logId instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_logId and sets the default values. -func NewSigstoreBundle0_verificationMaterial_tlogEntries_logId()(*SigstoreBundle0_verificationMaterial_tlogEntries_logId) { - m := &SigstoreBundle0_verificationMaterial_tlogEntries_logId{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_verificationMaterial_tlogEntries_logId(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries_logId) 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 *SigstoreBundle0_verificationMaterial_tlogEntries_logId) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["keyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetKeyId(val) - } - return nil - } - return res -} -// GetKeyId gets the keyId property value. The keyId property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) GetKeyId()(*string) { - return m.keyId -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("keyId", m.GetKeyId()) - 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 *SigstoreBundle0_verificationMaterial_tlogEntries_logId) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetKeyId sets the keyId property value. The keyId property -func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) SetKeyId(value *string)() { - m.keyId = value -} -type SigstoreBundle0_verificationMaterial_tlogEntries_logIdable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetKeyId()(*string) - SetKeyId(value *string)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain.go b/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain.go deleted file mode 100644 index 37447097..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain.go +++ /dev/null @@ -1,92 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_verificationMaterial_x509CertificateChain 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 certificates property - certificates []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable -} -// NewSigstoreBundle0_verificationMaterial_x509CertificateChain instantiates a new SigstoreBundle0_verificationMaterial_x509CertificateChain and sets the default values. -func NewSigstoreBundle0_verificationMaterial_x509CertificateChain()(*SigstoreBundle0_verificationMaterial_x509CertificateChain) { - m := &SigstoreBundle0_verificationMaterial_x509CertificateChain{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_verificationMaterial_x509CertificateChain(), 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetAdditionalData()(map[string]any) { - return m.additionalData -} -// GetCertificates gets the certificates property value. The certificates property -// returns a []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable when successful -func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetCertificates()([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) { - return m.certificates -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["certificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) - } - } - m.SetCertificates(res) - } - return nil - } - return res -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetCertificates() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificates())) - for i, v := range m.GetCertificates() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err := writer.WriteCollectionOfObjectValues("certificates", 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetCertificates sets the certificates property value. The certificates property -func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) SetCertificates(value []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable)() { - m.certificates = value -} -type SigstoreBundle0_verificationMaterial_x509CertificateChainable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetCertificates()([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) - SetCertificates(value []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable)() -} diff --git a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain_escaped_certificates.go b/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain_escaped_certificates.go deleted file mode 100644 index 101c4a6c..00000000 --- a/pkg/github/models/sigstore_bundle0_escaped_verification_material_escaped_x509_certificate_chain_escaped_certificates.go +++ /dev/null @@ -1,80 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -type SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates 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 rawBytes property - rawBytes *string -} -// NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates instantiates a new SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates and sets the default values. -func NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates()(*SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) { - m := &SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates(), 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["rawBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetRawBytes(val) - } - return nil - } - return res -} -// GetRawBytes gets the rawBytes property value. The rawBytes property -// returns a *string when successful -func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) GetRawBytes()(*string) { - return m.rawBytes -} -// Serialize serializes information the current object -func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("rawBytes", m.GetRawBytes()) - 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -// SetRawBytes sets the rawBytes property value. The rawBytes property -func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) SetRawBytes(value *string)() { - m.rawBytes = value -} -type SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetRawBytes()(*string) - SetRawBytes(value *string)() -} diff --git a/pkg/github/orgs/item_attestations_with_subject_escaped_digest_item_request_builder.go b/pkg/github/orgs/item_attestations_with_subject_escaped_digest_item_request_builder.go index cdfa8f16..b7870a3f 100644 --- a/pkg/github/orgs/item_attestations_with_subject_escaped_digest_item_request_builder.go +++ b/pkg/github/orgs/item_attestations_with_subject_escaped_digest_item_request_builder.go @@ -17,11 +17,13 @@ type ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters stru Before *string `uriparametername:"before"` // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Per_page *int32 `uriparametername:"per_page"` + // Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + Predicate_type *string `uriparametername:"predicate_type"` } // NewItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. func NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { m := &ItemAttestationsWithSubject_digestItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/attestations/{subject_digest}{?after*,before*,per_page*,predicate_type*}", pathParameters), } return m } diff --git a/pkg/github/repos/item_item_attestations_with_subject_escaped_digest_item_request_builder.go b/pkg/github/repos/item_item_attestations_with_subject_escaped_digest_item_request_builder.go index f74c474a..2abeba28 100644 --- a/pkg/github/repos/item_item_attestations_with_subject_escaped_digest_item_request_builder.go +++ b/pkg/github/repos/item_item_attestations_with_subject_escaped_digest_item_request_builder.go @@ -17,11 +17,13 @@ type ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters Before *string `uriparametername:"before"` // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Per_page *int32 `uriparametername:"per_page"` + // Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + Predicate_type *string `uriparametername:"predicate_type"` } // NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. func NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { m := &ItemItemAttestationsWithSubject_digestItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations/{subject_digest}{?after*,before*,per_page*,predicate_type*}", pathParameters), } return m } diff --git a/pkg/github/users/8754136e29101d16f0aa1718437904f35eeccfec3a60c5483f493c49ecf41b6c.go b/pkg/github/users/8754136e29101d16f0aa1718437904f35eeccfec3a60c5483f493c49ecf41b6c.go new file mode 100644 index 00000000..8cffc6df --- /dev/null +++ b/pkg/github/users/8754136e29101d16f0aa1718437904f35eeccfec3a60c5483f493c49ecf41b6c.go @@ -0,0 +1,51 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/users/f344491b81c70db2f2a7191f4e93e4be6e10455c61c408493023f9e113cf8fc4.go b/pkg/github/users/f344491b81c70db2f2a7191f4e93e4be6e10455c61c408493023f9e113cf8fc4.go new file mode 100644 index 00000000..7ca8c46f --- /dev/null +++ b/pkg/github/users/f344491b81c70db2f2a7191f4e93e4be6e10455c61c408493023f9e113cf8fc4.go @@ -0,0 +1,51 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations.go b/pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations.go index 5f5b005c..b7da81f0 100644 --- a/pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations.go +++ b/pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations.go @@ -2,14 +2,13 @@ package users import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" ) type ItemAttestationsItemWithSubject_digestGetResponse_attestations struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // Sigstore Bundle v0.1 - bundle i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able + // The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + bundle ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable // The bundle_url property bundle_url *string // The repository_id property @@ -32,9 +31,9 @@ func CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDis func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetBundle gets the bundle property value. Sigstore Bundle v0.1 -// returns a SigstoreBundle0able when successful -func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able) { +// GetBundle gets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) { return m.bundle } // GetBundleUrl gets the bundle_url property value. The bundle_url property @@ -47,12 +46,12 @@ func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBund func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateSigstoreBundle0FromDiscriminatorValue) + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetBundle(val.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able)) + m.SetBundle(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)) } return nil } @@ -115,8 +114,8 @@ func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) Seriali func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetBundle sets the bundle property value. Sigstore Bundle v0.1 -func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able)() { +// SetBundle sets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() { m.bundle = value } // SetBundleUrl sets the bundle_url property value. The bundle_url property @@ -130,10 +129,10 @@ func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetRepo type ItemAttestationsItemWithSubject_digestGetResponse_attestationsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBundle()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able) + GetBundle()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) GetBundleUrl()(*string) GetRepositoryId()(*int32) - SetBundle(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able)() + SetBundle(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() SetBundleUrl(value *string)() SetRepositoryId(value *int32)() } diff --git a/pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations_escaped_bundle.go b/pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations_escaped_bundle.go new file mode 100644 index 00000000..7aea444e --- /dev/null +++ b/pkg/github/users/item_attestations_item_with_subject_escaped_digest_get_response_escaped_attestations_escaped_bundle.go @@ -0,0 +1,139 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle the attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle 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 dsseEnvelope property + dsseEnvelope ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetDsseEnvelope()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetVerificationMaterial()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetDsseEnvelope(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetVerificationMaterial(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() { + m.verificationMaterial = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) + SetDsseEnvelope(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() +} diff --git a/pkg/github/users/item_attestations_with_subject_escaped_digest_item_request_builder.go b/pkg/github/users/item_attestations_with_subject_escaped_digest_item_request_builder.go index 8f2924e0..93f4fdc9 100644 --- a/pkg/github/users/item_attestations_with_subject_escaped_digest_item_request_builder.go +++ b/pkg/github/users/item_attestations_with_subject_escaped_digest_item_request_builder.go @@ -18,11 +18,13 @@ type ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters stru Before *string `uriparametername:"before"` // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Per_page *int32 `uriparametername:"per_page"` + // Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. + Predicate_type *string `uriparametername:"predicate_type"` } // NewItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. func NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { m := &ItemAttestationsWithSubject_digestItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/attestations/{subject_digest}{?after*,before*,per_page*,predicate_type*}", pathParameters), } return m } From 186f1c894f49c0316ecad8c46b4e2d6bf475af24 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 1 Mar 2025 00:10:59 +0000 Subject: [PATCH 23/25] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- ...tem_teams_item_projects_request_builder.go | 10 +++++++--- ...th_project_escaped_item_request_builder.go | 19 +++++++++++++------ pkg/github/search/issues_request_builder.go | 13 +++++++++---- .../teams/item_projects_request_builder.go | 6 +++--- ...th_project_escaped_item_request_builder.go | 12 ++++++------ pkg/github/zen/zen_request_builder.go | 2 +- 7 files changed, 40 insertions(+), 24 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 5dddb3da..b9bcfd4c 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "2537CD81A91EDDC09316F1D8250F23BFF08721F9294B3C4BA793800FC602361691A63121535941A12EAB4A4F647ADC0EA341F5143BBD879BB16C99295E1A7EEC", + "descriptionHash": "8FDD0512F84F964E0BA943CFF1D726135945FA40F252E918C2385E1CD5A215077151C3BF505DA67FE728351A47598D83287C8592162B6355DC5747113F051C56", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/orgs/item_teams_item_projects_request_builder.go b/pkg/github/orgs/item_teams_item_projects_request_builder.go index 7e4dfc50..0b290f88 100644 --- a/pkg/github/orgs/item_teams_item_projects_request_builder.go +++ b/pkg/github/orgs/item_teams_item_projects_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemTeamsItemProjectsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamsItemProjectsRequestBuilderGetQueryParameters lists the organization projects for a team.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. +// ItemTeamsItemProjectsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ItemTeamsItemProjectsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -19,6 +19,7 @@ type ItemTeamsItemProjectsRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` } // ByProject_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.teams.item.projects.item collection +// Deprecated: // returns a *ItemTeamsItemProjectsWithProject_ItemRequestBuilder when successful func (m *ItemTeamsItemProjectsRequestBuilder) ByProject_id(project_id int32)(*ItemTeamsItemProjectsWithProject_ItemRequestBuilder) { urlTplParams := make(map[string]string) @@ -41,7 +42,8 @@ func NewItemTeamsItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae41 urlParams["request-raw-url"] = rawUrl return NewItemTeamsItemProjectsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the organization projects for a team.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a []TeamProjectable when successful // [API method documentation] // @@ -63,7 +65,8 @@ func (m *ItemTeamsItemProjectsRequestBuilder) Get(ctx context.Context, requestCo } return val, nil } -// ToGetRequestInformation lists the organization projects for a team.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemTeamsItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamsItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -72,6 +75,7 @@ func (m *ItemTeamsItemProjectsRequestBuilder) ToGetRequestInformation(ctx contex return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemTeamsItemProjectsRequestBuilder when successful func (m *ItemTeamsItemProjectsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemProjectsRequestBuilder) { return NewItemTeamsItemProjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/orgs/item_teams_item_projects_with_project_escaped_item_request_builder.go b/pkg/github/orgs/item_teams_item_projects_with_project_escaped_item_request_builder.go index 4ce11c35..e4cf218d 100644 --- a/pkg/github/orgs/item_teams_item_projects_with_project_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_teams_item_projects_with_project_escaped_item_request_builder.go @@ -23,7 +23,8 @@ func NewItemTeamsItemProjectsWithProject_ItemRequestBuilder(rawUrl string, reque urlParams["request-raw-url"] = rawUrl return NewItemTeamsItemProjectsWithProject_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// Delete > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team @@ -38,7 +39,8 @@ func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) Delete(ctx context } return nil } -// Get checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a TeamProjectable when successful // [API method documentation] // @@ -57,7 +59,8 @@ func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) Get(ctx context.Co } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.TeamProjectable), nil } -// Put adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// Put > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a ItemTeamsItemProjectsItemWithProject_403Error error when the service returns a 403 status code // [API method documentation] // @@ -76,14 +79,16 @@ func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) Put(ctx context.Co } return nil } -// ToDeleteRequestInformation removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// ToDeleteRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToGetRequestInformation checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -91,7 +96,8 @@ func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToGetRequestInform requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPutRequestInformation adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. +// ToPutRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. +// Deprecated: // returns a *RequestInformation when successful func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemTeamsItemProjectsItemWithProject_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -104,6 +110,7 @@ func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) ToPutRequestInform return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *ItemTeamsItemProjectsWithProject_ItemRequestBuilder when successful func (m *ItemTeamsItemProjectsWithProject_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamsItemProjectsWithProject_ItemRequestBuilder) { return NewItemTeamsItemProjectsWithProject_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/search/issues_request_builder.go b/pkg/github/search/issues_request_builder.go index 306a5279..de37eee2 100644 --- a/pkg/github/search/issues_request_builder.go +++ b/pkg/github/search/issues_request_builder.go @@ -11,8 +11,10 @@ import ( type IssuesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// IssuesRequestBuilderGetQueryParameters find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlightedsearch results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.`q=windows+label:bug+language:python+state:open&sort=created&order=asc`This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.> [!NOTE]> For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." +// IssuesRequestBuilderGetQueryParameters > [!WARNING]> **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. type IssuesRequestBuilderGetQueryParameters struct { + // Set to `true` to use advanced search.Example: `http://api.github.com/search/issues?q={query}&advanced_search=true` + Advanced_search *string `uriparametername:"advanced_search"` // Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. Order *i60f7782ca360402c5ca504d6e0a3ccd1fa72dc30352dc710edab252368039c3f.GetOrderQueryParameterType `uriparametername:"order"` // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." @@ -27,7 +29,7 @@ type IssuesRequestBuilderGetQueryParameters struct { // NewIssuesRequestBuilderInternal instantiates a new IssuesRequestBuilder and sets the default values. func NewIssuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IssuesRequestBuilder) { m := &IssuesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/issues?q={q}{&order*,page*,per_page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/search/issues?q={q}{&advanced_search*,order*,page*,per_page*,sort*}", pathParameters), } return m } @@ -37,7 +39,8 @@ func NewIssuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c urlParams["request-raw-url"] = rawUrl return NewIssuesRequestBuilderInternal(urlParams, requestAdapter) } -// Get find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlightedsearch results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.`q=windows+label:bug+language:python+state:open&sort=created&order=asc`This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.> [!NOTE]> For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." +// Get > [!WARNING]> **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. +// Deprecated: // returns a IssuesGetResponseable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -64,7 +67,8 @@ func (m *IssuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2 } return res.(IssuesGetResponseable), nil } -// ToGetRequestInformation find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlightedsearch results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.`q=windows+label:bug+language:python+state:open&sort=created&order=asc`This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.> [!NOTE]> For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." +// ToGetRequestInformation > [!WARNING]> **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. +// Deprecated: // returns a *RequestInformation when successful func (m *IssuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[IssuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -73,6 +77,7 @@ func (m *IssuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requ return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: // returns a *IssuesRequestBuilder when successful func (m *IssuesRequestBuilder) WithUrl(rawUrl string)(*IssuesRequestBuilder) { return NewIssuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/pkg/github/teams/item_projects_request_builder.go b/pkg/github/teams/item_projects_request_builder.go index 372c982c..b3279e3e 100644 --- a/pkg/github/teams/item_projects_request_builder.go +++ b/pkg/github/teams/item_projects_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemProjectsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemProjectsRequestBuilderGetQueryParameters > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint.Lists the organization projects for a team. +// ItemProjectsRequestBuilderGetQueryParameters > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. type ItemProjectsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -42,7 +42,7 @@ func NewItemProjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewItemProjectsRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint.Lists the organization projects for a team. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a []TeamProjectable when successful // returns a BasicError error when the service returns a 404 status code @@ -69,7 +69,7 @@ func (m *ItemProjectsRequestBuilder) Get(ctx context.Context, requestConfigurati } return val, nil } -// ToGetRequestInformation > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint.Lists the organization projects for a team. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a *RequestInformation when successful func (m *ItemProjectsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemProjectsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/pkg/github/teams/item_projects_with_project_escaped_item_request_builder.go b/pkg/github/teams/item_projects_with_project_escaped_item_request_builder.go index 42e5a7f3..a771f6f9 100644 --- a/pkg/github/teams/item_projects_with_project_escaped_item_request_builder.go +++ b/pkg/github/teams/item_projects_with_project_escaped_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemProjectsWithProject_ItemRequestBuilder(rawUrl string, requestAdapter urlParams["request-raw-url"] = rawUrl return NewItemProjectsWithProject_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint.Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. +// Delete > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a BasicError error when the service returns a 404 status code // returns a ValidationError error when the service returns a 422 status code @@ -45,7 +45,7 @@ func (m *ItemProjectsWithProject_ItemRequestBuilder) Delete(ctx context.Context, } return nil } -// Get > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint.Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. +// Get > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a TeamProjectable when successful // [API method documentation] @@ -65,7 +65,7 @@ func (m *ItemProjectsWithProject_ItemRequestBuilder) Get(ctx context.Context, re } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.TeamProjectable), nil } -// Put > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint.Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. +// Put > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a ItemProjectsItemWithProject_403Error error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -89,7 +89,7 @@ func (m *ItemProjectsWithProject_ItemRequestBuilder) Put(ctx context.Context, bo } return nil } -// ToDeleteRequestInformation > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint.Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. +// ToDeleteRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a *RequestInformation when successful func (m *ItemProjectsWithProject_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { @@ -98,7 +98,7 @@ func (m *ItemProjectsWithProject_ItemRequestBuilder) ToDeleteRequestInformation( requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint.Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. +// ToGetRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a *RequestInformation when successful func (m *ItemProjectsWithProject_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { @@ -107,7 +107,7 @@ func (m *ItemProjectsWithProject_ItemRequestBuilder) ToGetRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPutRequestInformation > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint.Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. +// ToPutRequestInformation > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. // Deprecated: // returns a *RequestInformation when successful func (m *ItemProjectsWithProject_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemProjectsItemWithProject_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/pkg/github/zen/zen_request_builder.go b/pkg/github/zen/zen_request_builder.go index a9a08bdf..f379e0d9 100644 --- a/pkg/github/zen/zen_request_builder.go +++ b/pkg/github/zen/zen_request_builder.go @@ -46,7 +46,7 @@ func (m *ZenRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4 func (m *ZenRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) - requestInfo.Headers.TryAdd("Accept", "application/json") + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9") return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. From 892456ea57a2b8db7ca089d977d52e7b3c042f48 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 4 Mar 2025 00:09:45 +0000 Subject: [PATCH 24/25] New updates to generated code --- ...canning_escaped_generic_escaped_secrets.go | 37 +++++++++++++++++++ ...0db857f14de49e8ae638cc06efc1430e28b53a1.go | 37 +++++++++++++++++++ pkg/github/kiota-lock.json | 2 +- .../models/code_security_configuration.go | 30 +++++++++++++++ ...canning_escaped_generic_escaped_secrets.go | 37 +++++++++++++++++++ ...canning_escaped_generic_escaped_secrets.go | 37 +++++++++++++++++++ ...0db857f14de49e8ae638cc06efc1430e28b53a1.go | 37 +++++++++++++++++++ 7 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 pkg/github/enterprises/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go create mode 100644 pkg/github/enterprises/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go create mode 100644 pkg/github/models/code_security_configuration_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go diff --git a/pkg/github/enterprises/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go b/pkg/github/enterprises/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go new file mode 100644 index 00000000..4d435e8e --- /dev/null +++ b/pkg/github/enterprises/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go @@ -0,0 +1,37 @@ +package configurations +// The enablement status of Copilot secret scanning +type ConfigurationsPostRequestBody_secret_scanning_generic_secrets int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS ConfigurationsPostRequestBody_secret_scanning_generic_secrets = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS +) + +func (i ConfigurationsPostRequestBody_secret_scanning_generic_secrets) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_secret_scanning_generic_secrets(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + default: + return nil, nil + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_secret_scanning_generic_secrets(values []ConfigurationsPostRequestBody_secret_scanning_generic_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_secret_scanning_generic_secrets) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go b/pkg/github/enterprises/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go new file mode 100644 index 00000000..6eb10a53 --- /dev/null +++ b/pkg/github/enterprises/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go @@ -0,0 +1,37 @@ +package item +// The enablement status of Copilot secret scanning +type WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS +) + +func (i WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_secret_scanning_generic_secrets(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + default: + return nil, nil + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_secret_scanning_generic_secrets(values []WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets) isMultiValue() bool { + return false +} diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index b9bcfd4c..ab85c0e9 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "8FDD0512F84F964E0BA943CFF1D726135945FA40F252E918C2385E1CD5A215077151C3BF505DA67FE728351A47598D83287C8592162B6355DC5747113F051C56", + "descriptionHash": "9DDEE73719FF386AA72F574B6D8B95882A0AC8BFD4423DA035CDC5530706F06991FB0A945CFE94BECE29C6694C5D6F32612E91CB825EBA13CAA210F3D23B2E92", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/code_security_configuration.go b/pkg/github/models/code_security_configuration.go index fa35acd1..70002676 100644 --- a/pkg/github/models/code_security_configuration.go +++ b/pkg/github/models/code_security_configuration.go @@ -47,6 +47,8 @@ type CodeSecurityConfiguration struct { secret_scanning_delegated_bypass *CodeSecurityConfiguration_secret_scanning_delegated_bypass // Feature options for secret scanning delegated bypass secret_scanning_delegated_bypass_options CodeSecurityConfiguration_secret_scanning_delegated_bypass_optionsable + // The enablement status of Copilot secret scanning + secret_scanning_generic_secrets *CodeSecurityConfiguration_secret_scanning_generic_secrets // The enablement status of secret scanning non-provider patterns secret_scanning_non_provider_patterns *CodeSecurityConfiguration_secret_scanning_non_provider_patterns // The enablement status of secret scanning push protection @@ -326,6 +328,16 @@ func (m *CodeSecurityConfiguration) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["secret_scanning_generic_secrets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_secret_scanning_generic_secrets) + if err != nil { + return err + } + if val != nil { + m.SetSecretScanningGenericSecrets(val.(*CodeSecurityConfiguration_secret_scanning_generic_secrets)) + } + return nil + } res["secret_scanning_non_provider_patterns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_secret_scanning_non_provider_patterns) if err != nil { @@ -428,6 +440,11 @@ func (m *CodeSecurityConfiguration) GetSecretScanningDelegatedBypass()(*CodeSecu func (m *CodeSecurityConfiguration) GetSecretScanningDelegatedBypassOptions()(CodeSecurityConfiguration_secret_scanning_delegated_bypass_optionsable) { return m.secret_scanning_delegated_bypass_options } +// GetSecretScanningGenericSecrets gets the secret_scanning_generic_secrets property value. The enablement status of Copilot secret scanning +// returns a *CodeSecurityConfiguration_secret_scanning_generic_secrets when successful +func (m *CodeSecurityConfiguration) GetSecretScanningGenericSecrets()(*CodeSecurityConfiguration_secret_scanning_generic_secrets) { + return m.secret_scanning_generic_secrets +} // GetSecretScanningNonProviderPatterns gets the secret_scanning_non_provider_patterns property value. The enablement status of secret scanning non-provider patterns // returns a *CodeSecurityConfiguration_secret_scanning_non_provider_patterns when successful func (m *CodeSecurityConfiguration) GetSecretScanningNonProviderPatterns()(*CodeSecurityConfiguration_secret_scanning_non_provider_patterns) { @@ -585,6 +602,13 @@ func (m *CodeSecurityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f return err } } + if m.GetSecretScanningGenericSecrets() != nil { + cast := (*m.GetSecretScanningGenericSecrets()).String() + err := writer.WriteStringValue("secret_scanning_generic_secrets", &cast) + if err != nil { + return err + } + } if m.GetSecretScanningNonProviderPatterns() != nil { cast := (*m.GetSecretScanningNonProviderPatterns()).String() err := writer.WriteStringValue("secret_scanning_non_provider_patterns", &cast) @@ -713,6 +737,10 @@ func (m *CodeSecurityConfiguration) SetSecretScanningDelegatedBypass(value *Code func (m *CodeSecurityConfiguration) SetSecretScanningDelegatedBypassOptions(value CodeSecurityConfiguration_secret_scanning_delegated_bypass_optionsable)() { m.secret_scanning_delegated_bypass_options = value } +// SetSecretScanningGenericSecrets sets the secret_scanning_generic_secrets property value. The enablement status of Copilot secret scanning +func (m *CodeSecurityConfiguration) SetSecretScanningGenericSecrets(value *CodeSecurityConfiguration_secret_scanning_generic_secrets)() { + m.secret_scanning_generic_secrets = value +} // SetSecretScanningNonProviderPatterns sets the secret_scanning_non_provider_patterns property value. The enablement status of secret scanning non-provider patterns func (m *CodeSecurityConfiguration) SetSecretScanningNonProviderPatterns(value *CodeSecurityConfiguration_secret_scanning_non_provider_patterns)() { m.secret_scanning_non_provider_patterns = value @@ -759,6 +787,7 @@ type CodeSecurityConfigurationable interface { GetSecretScanningDelegatedAlertDismissal()(*CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal) GetSecretScanningDelegatedBypass()(*CodeSecurityConfiguration_secret_scanning_delegated_bypass) GetSecretScanningDelegatedBypassOptions()(CodeSecurityConfiguration_secret_scanning_delegated_bypass_optionsable) + GetSecretScanningGenericSecrets()(*CodeSecurityConfiguration_secret_scanning_generic_secrets) GetSecretScanningNonProviderPatterns()(*CodeSecurityConfiguration_secret_scanning_non_provider_patterns) GetSecretScanningPushProtection()(*CodeSecurityConfiguration_secret_scanning_push_protection) GetSecretScanningValidityChecks()(*CodeSecurityConfiguration_secret_scanning_validity_checks) @@ -784,6 +813,7 @@ type CodeSecurityConfigurationable interface { SetSecretScanningDelegatedAlertDismissal(value *CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal)() SetSecretScanningDelegatedBypass(value *CodeSecurityConfiguration_secret_scanning_delegated_bypass)() SetSecretScanningDelegatedBypassOptions(value CodeSecurityConfiguration_secret_scanning_delegated_bypass_optionsable)() + SetSecretScanningGenericSecrets(value *CodeSecurityConfiguration_secret_scanning_generic_secrets)() SetSecretScanningNonProviderPatterns(value *CodeSecurityConfiguration_secret_scanning_non_provider_patterns)() SetSecretScanningPushProtection(value *CodeSecurityConfiguration_secret_scanning_push_protection)() SetSecretScanningValidityChecks(value *CodeSecurityConfiguration_secret_scanning_validity_checks)() diff --git a/pkg/github/models/code_security_configuration_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go b/pkg/github/models/code_security_configuration_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go new file mode 100644 index 00000000..10a7c71b --- /dev/null +++ b/pkg/github/models/code_security_configuration_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go @@ -0,0 +1,37 @@ +package models +// The enablement status of Copilot secret scanning +type CodeSecurityConfiguration_secret_scanning_generic_secrets int + +const ( + ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_GENERIC_SECRETS CodeSecurityConfiguration_secret_scanning_generic_secrets = iota + DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_GENERIC_SECRETS + NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_GENERIC_SECRETS +) + +func (i CodeSecurityConfiguration_secret_scanning_generic_secrets) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_secret_scanning_generic_secrets(v string) (any, error) { + result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_GENERIC_SECRETS + switch v { + case "enabled": + result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_GENERIC_SECRETS + case "disabled": + result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_GENERIC_SECRETS + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_GENERIC_SECRETS + default: + return nil, nil + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_secret_scanning_generic_secrets(values []CodeSecurityConfiguration_secret_scanning_generic_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_secret_scanning_generic_secrets) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go new file mode 100644 index 00000000..4d435e8e --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_escaped_secret_escaped_scanning_escaped_generic_escaped_secrets.go @@ -0,0 +1,37 @@ +package configurations +// The enablement status of Copilot secret scanning +type ConfigurationsPostRequestBody_secret_scanning_generic_secrets int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS ConfigurationsPostRequestBody_secret_scanning_generic_secrets = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS +) + +func (i ConfigurationsPostRequestBody_secret_scanning_generic_secrets) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_secret_scanning_generic_secrets(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + default: + return nil, nil + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_secret_scanning_generic_secrets(values []ConfigurationsPostRequestBody_secret_scanning_generic_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_secret_scanning_generic_secrets) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go b/pkg/github/orgs/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go new file mode 100644 index 00000000..6eb10a53 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/43d06f4d2daa77b8f9d32b0c60db857f14de49e8ae638cc06efc1430e28b53a1.go @@ -0,0 +1,37 @@ +package item +// The enablement status of Copilot secret scanning +type WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS +) + +func (i WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_secret_scanning_generic_secrets(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_GENERIC_SECRETS + default: + return nil, nil + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_secret_scanning_generic_secrets(values []WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets) isMultiValue() bool { + return false +} From 59d15406f0d1dc28ce6735db0a76c98183377920 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 6 Mar 2025 00:10:04 +0000 Subject: [PATCH 25/25] New updates to generated code --- ...1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go | 37 +++++++++++++++++++ ...47c2f6536fec11000269972e9cb56eb006f7bcd.go | 37 +++++++++++++++++++ pkg/github/kiota-lock.json | 2 +- .../dependabot_alert_escaped_dependency.go | 23 ++++++++++++ ...escaped_dependency_escaped_relationship.go | 37 +++++++++++++++++++ ...lert_with_repository_escaped_dependency.go | 23 ++++++++++++ ...escaped_dependency_escaped_relationship.go | 37 +++++++++++++++++++ 7 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 pkg/github/enterprises/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go create mode 100644 pkg/github/enterprises/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go create mode 100644 pkg/github/models/dependabot_alert_escaped_dependency_escaped_relationship.go create mode 100644 pkg/github/models/dependabot_alert_with_repository_escaped_dependency_escaped_relationship.go diff --git a/pkg/github/enterprises/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go b/pkg/github/enterprises/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go new file mode 100644 index 00000000..14145bb7 --- /dev/null +++ b/pkg/github/enterprises/item/codesecurity/configurations/e9150d7818e6b7b9f25b2846d1485c3575d47ca0101f9c921bd7f68f57bf8ad3.go @@ -0,0 +1,37 @@ +package configurations +// The enablement status of secret scanning delegated alert dismissal +type ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal int + +const ( + ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal = iota + DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL +) + +func (i ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal(v string) (any, error) { + result := ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + switch v { + case "enabled": + result = ENABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "disabled": + result = DISABLED_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "not_set": + result = NOT_SET_CONFIGURATIONSPOSTREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + default: + return nil, nil + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal(values []ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal) isMultiValue() bool { + return false +} diff --git a/pkg/github/enterprises/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go b/pkg/github/enterprises/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go new file mode 100644 index 00000000..ffd2b9f1 --- /dev/null +++ b/pkg/github/enterprises/item/codesecurity/configurations/item/c2edb57a5c1fcedbae765d87447c2f6536fec11000269972e9cb56eb006f7bcd.go @@ -0,0 +1,37 @@ +package item +// The enablement status of secret scanning delegated alert dismissal +type WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal int + +const ( + ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal = iota + DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL +) + +func (i WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal) String() string { + return []string{"enabled", "disabled", "not_set"}[i] +} +func ParseWithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal(v string) (any, error) { + result := ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + switch v { + case "enabled": + result = ENABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "disabled": + result = DISABLED_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + case "not_set": + result = NOT_SET_WITHCONFIGURATION_PATCHREQUESTBODY_SECRET_SCANNING_DELEGATED_ALERT_DISMISSAL + default: + return nil, nil + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal(values []WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal) isMultiValue() bool { + return false +} diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index ab85c0e9..30863e37 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "9DDEE73719FF386AA72F574B6D8B95882A0AC8BFD4423DA035CDC5530706F06991FB0A945CFE94BECE29C6694C5D6F32612E91CB825EBA13CAA210F3D23B2E92", + "descriptionHash": "43B003FF1629AB4FB021E0E0CE390B5F2B5278CE2F05D98F3E3EEF8BDAC6A2D79C054D2EEF1F76D2601F7B17FC7645C0F78BBB2429D4B5ADE38E0A5113517798", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/dependabot_alert_escaped_dependency.go b/pkg/github/models/dependabot_alert_escaped_dependency.go index 560bb6f2..2c759168 100644 --- a/pkg/github/models/dependabot_alert_escaped_dependency.go +++ b/pkg/github/models/dependabot_alert_escaped_dependency.go @@ -12,6 +12,8 @@ type DependabotAlert_dependency struct { manifest_path *string // Details for the vulnerable package. packageEscaped DependabotAlertPackageable + // The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. + relationship *DependabotAlert_dependency_relationship // The execution scope of the vulnerable dependency. scope *DependabotAlert_dependency_scope } @@ -56,6 +58,16 @@ func (m *DependabotAlert_dependency) GetFieldDeserializers()(map[string]func(i87 } return nil } + res["relationship"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlert_dependency_relationship) + if err != nil { + return err + } + if val != nil { + m.SetRelationship(val.(*DependabotAlert_dependency_relationship)) + } + return nil + } res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseDependabotAlert_dependency_scope) if err != nil { @@ -78,6 +90,11 @@ func (m *DependabotAlert_dependency) GetManifestPath()(*string) { func (m *DependabotAlert_dependency) GetPackageEscaped()(DependabotAlertPackageable) { return m.packageEscaped } +// GetRelationship gets the relationship property value. The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. +// returns a *DependabotAlert_dependency_relationship when successful +func (m *DependabotAlert_dependency) GetRelationship()(*DependabotAlert_dependency_relationship) { + return m.relationship +} // GetScope gets the scope property value. The execution scope of the vulnerable dependency. // returns a *DependabotAlert_dependency_scope when successful func (m *DependabotAlert_dependency) GetScope()(*DependabotAlert_dependency_scope) { @@ -105,6 +122,10 @@ func (m *DependabotAlert_dependency) SetManifestPath(value *string)() { func (m *DependabotAlert_dependency) SetPackageEscaped(value DependabotAlertPackageable)() { m.packageEscaped = value } +// SetRelationship sets the relationship property value. The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. +func (m *DependabotAlert_dependency) SetRelationship(value *DependabotAlert_dependency_relationship)() { + m.relationship = value +} // SetScope sets the scope property value. The execution scope of the vulnerable dependency. func (m *DependabotAlert_dependency) SetScope(value *DependabotAlert_dependency_scope)() { m.scope = value @@ -114,8 +135,10 @@ type DependabotAlert_dependencyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetManifestPath()(*string) GetPackageEscaped()(DependabotAlertPackageable) + GetRelationship()(*DependabotAlert_dependency_relationship) GetScope()(*DependabotAlert_dependency_scope) SetManifestPath(value *string)() SetPackageEscaped(value DependabotAlertPackageable)() + SetRelationship(value *DependabotAlert_dependency_relationship)() SetScope(value *DependabotAlert_dependency_scope)() } diff --git a/pkg/github/models/dependabot_alert_escaped_dependency_escaped_relationship.go b/pkg/github/models/dependabot_alert_escaped_dependency_escaped_relationship.go new file mode 100644 index 00000000..6ad7cbc8 --- /dev/null +++ b/pkg/github/models/dependabot_alert_escaped_dependency_escaped_relationship.go @@ -0,0 +1,37 @@ +package models +// The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. +type DependabotAlert_dependency_relationship int + +const ( + UNKNOWN_DEPENDABOTALERT_DEPENDENCY_RELATIONSHIP DependabotAlert_dependency_relationship = iota + DIRECT_DEPENDABOTALERT_DEPENDENCY_RELATIONSHIP + TRANSITIVE_DEPENDABOTALERT_DEPENDENCY_RELATIONSHIP +) + +func (i DependabotAlert_dependency_relationship) String() string { + return []string{"unknown", "direct", "transitive"}[i] +} +func ParseDependabotAlert_dependency_relationship(v string) (any, error) { + result := UNKNOWN_DEPENDABOTALERT_DEPENDENCY_RELATIONSHIP + switch v { + case "unknown": + result = UNKNOWN_DEPENDABOTALERT_DEPENDENCY_RELATIONSHIP + case "direct": + result = DIRECT_DEPENDABOTALERT_DEPENDENCY_RELATIONSHIP + case "transitive": + result = TRANSITIVE_DEPENDABOTALERT_DEPENDENCY_RELATIONSHIP + default: + return nil, nil + } + return &result, nil +} +func SerializeDependabotAlert_dependency_relationship(values []DependabotAlert_dependency_relationship) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlert_dependency_relationship) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/dependabot_alert_with_repository_escaped_dependency.go b/pkg/github/models/dependabot_alert_with_repository_escaped_dependency.go index b85c3d9f..8c51763a 100644 --- a/pkg/github/models/dependabot_alert_with_repository_escaped_dependency.go +++ b/pkg/github/models/dependabot_alert_with_repository_escaped_dependency.go @@ -12,6 +12,8 @@ type DependabotAlertWithRepository_dependency struct { manifest_path *string // Details for the vulnerable package. packageEscaped DependabotAlertPackageable + // The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. + relationship *DependabotAlertWithRepository_dependency_relationship // The execution scope of the vulnerable dependency. scope *DependabotAlertWithRepository_dependency_scope } @@ -56,6 +58,16 @@ func (m *DependabotAlertWithRepository_dependency) GetFieldDeserializers()(map[s } return nil } + res["relationship"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDependabotAlertWithRepository_dependency_relationship) + if err != nil { + return err + } + if val != nil { + m.SetRelationship(val.(*DependabotAlertWithRepository_dependency_relationship)) + } + return nil + } res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseDependabotAlertWithRepository_dependency_scope) if err != nil { @@ -78,6 +90,11 @@ func (m *DependabotAlertWithRepository_dependency) GetManifestPath()(*string) { func (m *DependabotAlertWithRepository_dependency) GetPackageEscaped()(DependabotAlertPackageable) { return m.packageEscaped } +// GetRelationship gets the relationship property value. The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. +// returns a *DependabotAlertWithRepository_dependency_relationship when successful +func (m *DependabotAlertWithRepository_dependency) GetRelationship()(*DependabotAlertWithRepository_dependency_relationship) { + return m.relationship +} // GetScope gets the scope property value. The execution scope of the vulnerable dependency. // returns a *DependabotAlertWithRepository_dependency_scope when successful func (m *DependabotAlertWithRepository_dependency) GetScope()(*DependabotAlertWithRepository_dependency_scope) { @@ -105,6 +122,10 @@ func (m *DependabotAlertWithRepository_dependency) SetManifestPath(value *string func (m *DependabotAlertWithRepository_dependency) SetPackageEscaped(value DependabotAlertPackageable)() { m.packageEscaped = value } +// SetRelationship sets the relationship property value. The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. +func (m *DependabotAlertWithRepository_dependency) SetRelationship(value *DependabotAlertWithRepository_dependency_relationship)() { + m.relationship = value +} // SetScope sets the scope property value. The execution scope of the vulnerable dependency. func (m *DependabotAlertWithRepository_dependency) SetScope(value *DependabotAlertWithRepository_dependency_scope)() { m.scope = value @@ -114,8 +135,10 @@ type DependabotAlertWithRepository_dependencyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetManifestPath()(*string) GetPackageEscaped()(DependabotAlertPackageable) + GetRelationship()(*DependabotAlertWithRepository_dependency_relationship) GetScope()(*DependabotAlertWithRepository_dependency_scope) SetManifestPath(value *string)() SetPackageEscaped(value DependabotAlertPackageable)() + SetRelationship(value *DependabotAlertWithRepository_dependency_relationship)() SetScope(value *DependabotAlertWithRepository_dependency_scope)() } diff --git a/pkg/github/models/dependabot_alert_with_repository_escaped_dependency_escaped_relationship.go b/pkg/github/models/dependabot_alert_with_repository_escaped_dependency_escaped_relationship.go new file mode 100644 index 00000000..e301764b --- /dev/null +++ b/pkg/github/models/dependabot_alert_with_repository_escaped_dependency_escaped_relationship.go @@ -0,0 +1,37 @@ +package models +// The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. +type DependabotAlertWithRepository_dependency_relationship int + +const ( + UNKNOWN_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_RELATIONSHIP DependabotAlertWithRepository_dependency_relationship = iota + DIRECT_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_RELATIONSHIP + TRANSITIVE_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_RELATIONSHIP +) + +func (i DependabotAlertWithRepository_dependency_relationship) String() string { + return []string{"unknown", "direct", "transitive"}[i] +} +func ParseDependabotAlertWithRepository_dependency_relationship(v string) (any, error) { + result := UNKNOWN_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_RELATIONSHIP + switch v { + case "unknown": + result = UNKNOWN_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_RELATIONSHIP + case "direct": + result = DIRECT_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_RELATIONSHIP + case "transitive": + result = TRANSITIVE_DEPENDABOTALERTWITHREPOSITORY_DEPENDENCY_RELATIONSHIP + default: + return nil, nil + } + return &result, nil +} +func SerializeDependabotAlertWithRepository_dependency_relationship(values []DependabotAlertWithRepository_dependency_relationship) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i DependabotAlertWithRepository_dependency_relationship) isMultiValue() bool { + return false +}