Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

GHES 3.12: Changes in generated code #135

Open
wants to merge 39 commits into
base: 3.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e39b3ff
New updates to generated code
octokitbot Dec 27, 2024
52fd14d
New updates to generated code
octokitbot Dec 28, 2024
e987977
New updates to generated code
octokitbot Dec 29, 2024
866670c
New updates to generated code
octokitbot Dec 30, 2024
06d45cd
New updates to generated code
octokitbot Dec 31, 2024
b34f324
New updates to generated code
octokitbot Jan 1, 2025
f93f182
New updates to generated code
octokitbot Jan 2, 2025
1d4e21c
New updates to generated code
octokitbot Jan 3, 2025
280044f
New updates to generated code
octokitbot Jan 4, 2025
82e8b7b
New updates to generated code
octokitbot Jan 5, 2025
9f9d83b
New updates to generated code
octokitbot Jan 6, 2025
76a7fe5
New updates to generated code
octokitbot Jan 7, 2025
e4a8fa6
New updates to generated code
octokitbot Jan 8, 2025
1b5a878
New updates to generated code
octokitbot Jan 10, 2025
affb2da
New updates to generated code
octokitbot Jan 12, 2025
0f9e754
New updates to generated code
octokitbot Jan 13, 2025
0f8b22f
New updates to generated code
octokitbot Jan 15, 2025
320406d
New updates to generated code
octokitbot Jan 16, 2025
e0d417d
New updates to generated code
octokitbot Jan 17, 2025
0da8074
New updates to generated code
octokitbot Jan 18, 2025
bd57e55
New updates to generated code
octokitbot Jan 19, 2025
2074adc
New updates to generated code
octokitbot Jan 20, 2025
5a4f4c9
New updates to generated code
octokitbot Jan 21, 2025
0a1c46e
New updates to generated code
octokitbot Jan 22, 2025
87ebd80
New updates to generated code
octokitbot Jan 23, 2025
c81695c
New updates to generated code
octokitbot Jan 24, 2025
9bec981
New updates to generated code
octokitbot Jan 25, 2025
c037feb
New updates to generated code
octokitbot Jan 26, 2025
1f5cb00
New updates to generated code
octokitbot Jan 27, 2025
3e1b268
New updates to generated code
octokitbot Jan 28, 2025
fef1ac5
New updates to generated code
octokitbot Jan 29, 2025
bed6136
New updates to generated code
octokitbot Jan 30, 2025
96f66b0
New updates to generated code
octokitbot Jan 31, 2025
825d75f
New updates to generated code
octokitbot Feb 1, 2025
6740273
New updates to generated code
octokitbot Feb 2, 2025
fab566e
New updates to generated code
octokitbot Feb 3, 2025
f5ac296
New updates to generated code
octokitbot Feb 4, 2025
794b899
New updates to generated code
octokitbot Feb 5, 2025
c5adda7
New updates to generated code
octokitbot Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,236 changes: 2,088 additions & 2,148 deletions pkg/github/.kiota.log

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func NewItemActionsRunnersGenerateJitconfigRequestBuilder(rawUrl string, request
// Post generates a configuration that can be passed to the runner application at startup.OAuth tokens and personal access tokens (classic) need the `manage_runners:enterprise` 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]
//
Expand All @@ -37,6 +38,7 @@ func (m *ItemActionsRunnersGenerateJitconfigRequestBuilder) Post(ctx context.Con
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
"404": ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CreateBasicErrorFromDiscriminatorValue,
"409": ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CreateBasicErrorFromDiscriminatorValue,
"422": ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.CreateValidationErrorSimpleFromDiscriminatorValue,
}
res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemActionsRunnersGenerateJitconfigPostResponseFromDiscriminatorValue, errorMapping)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type ItemDependabotAlertsRequestBuilderGetQueryParameters struct {
Scope *i1a72be8a2e171acbad39b8b772b6f76dcb853adcf2d0dac77f84acd8a56c4c26.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 *i1a72be8a2e171acbad39b8b772b6f76dcb853adcf2d0dac77f84acd8a56c4c26.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"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "F5B3D77CC84E4DDFB879E1B6409AB359B87751C9B4C9C45708A915C8443177B17787E6CD05D3E4A42FE6F675AE970AFCCB2A1F1D15023AE71DA95FD89F485C3C",
"descriptionHash": "E04A5BC331BB15A53F72D8FC0B7C77AE6EA040AA8AEE4C1D43C8CE8A88ADFF211DE4B49F171A00C459875FB86A41C82AE933FED2FCE4600A2C2D1CE4098FAC05",
"descriptionLocation": "../../../../../schemas/ghes-3.12.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
14 changes: 7 additions & 7 deletions pkg/github/models/check_automated_security_fixes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/models/ghes_license_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type GhesLicenseInfo struct {
clusterSupport *bool
// The company under which the license is issued.
company *string
// Whether the Github Connect feature is enabled.
// Whether the GitHub Connect feature is enabled.
croquetSupport *bool
// Whether this license is issued under custom terms.
customTerms *bool
Expand Down Expand Up @@ -82,7 +82,7 @@ func (m *GhesLicenseInfo) GetClusterSupport()(*bool) {
func (m *GhesLicenseInfo) GetCompany()(*string) {
return m.company
}
// GetCroquetSupport gets the croquetSupport property value. Whether the Github Connect feature is enabled.
// GetCroquetSupport gets the croquetSupport property value. Whether the GitHub Connect feature is enabled.
// returns a *bool when successful
func (m *GhesLicenseInfo) GetCroquetSupport()(*bool) {
return m.croquetSupport
Expand Down Expand Up @@ -476,7 +476,7 @@ func (m *GhesLicenseInfo) SetClusterSupport(value *bool)() {
func (m *GhesLicenseInfo) SetCompany(value *string)() {
m.company = value
}
// SetCroquetSupport sets the croquetSupport property value. Whether the Github Connect feature is enabled.
// SetCroquetSupport sets the croquetSupport property value. Whether the GitHub Connect feature is enabled.
func (m *GhesLicenseInfo) SetCroquetSupport(value *bool)() {
m.croquetSupport = value
}
Expand Down
28 changes: 11 additions & 17 deletions pkg/github/models/global_advisory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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)()
Expand Down
105 changes: 94 additions & 11 deletions pkg/github/models/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,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
Expand All @@ -42,6 +42,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{
Expand Down Expand Up @@ -195,12 +278,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
}
Expand Down Expand Up @@ -281,9 +364,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
Expand Down Expand Up @@ -461,8 +544,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
Expand Down Expand Up @@ -498,7 +581,7 @@ type Integrationable interface {
GetInstallationsCount()(*int32)
GetName()(*string)
GetNodeId()(*string)
GetOwner()(NullableSimpleUserable)
GetOwner()(Integration_Integration_ownerable)
GetPem()(*string)
GetPermissions()(Integration_permissionsable)
GetSlug()(*string)
Expand All @@ -514,7 +597,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)()
Expand Down
Loading