Skip to content

Commit

Permalink
New updates to generated code (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Aug 30, 2024
1 parent 9d26873 commit 6cbea5c
Show file tree
Hide file tree
Showing 576 changed files with 1,507 additions and 2,859 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.21.5

require (
github.com/kfcampbell/ghinstallation v0.0.6
github.com/microsoft/kiota-abstractions-go v1.6.0
github.com/microsoft/kiota-http-go v1.3.3
github.com/microsoft/kiota-abstractions-go v1.6.1
github.com/microsoft/kiota-http-go v1.4.3
github.com/microsoft/kiota-serialization-form-go v1.0.0
github.com/microsoft/kiota-serialization-json-go v1.0.7
github.com/microsoft/kiota-serialization-multipart-go v1.0.0
Expand All @@ -20,7 +20,7 @@ require (
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.55 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.57 // indirect
github.com/stretchr/testify v1.9.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/microsoft/kiota-abstractions-go v1.6.0 h1:qbGBNMU0/o5myKbikCBXJFohVCFrrpx2cO15Rta2WyA=
github.com/microsoft/kiota-abstractions-go v1.6.0/go.mod h1:7YH20ZbRWXGfHSSvdHkdztzgCB9mRdtFx13+hrYIEpo=
github.com/microsoft/kiota-http-go v1.3.3 h1:FKjK5BLFONu5eIBxtrkirkixFQmcPwitZ8iwZHKbESo=
github.com/microsoft/kiota-http-go v1.3.3/go.mod h1:IWw/PwtBs/GYz+Pa75gPW7MFNFv0aKPFsLw5WqzL1SE=
github.com/microsoft/kiota-abstractions-go v1.6.1 h1:NXK50S3BwJn9Wj6bO0YFuAig7y2WVgdQ/ie1ktMl2J4=
github.com/microsoft/kiota-abstractions-go v1.6.1/go.mod h1:FI1I2OHg0E7bK5t8DPnw+9C/CHVyLP6XeqDBT+95pTE=
github.com/microsoft/kiota-http-go v1.4.3 h1:BVviWZSZCm2nr9qySbhSXa8jlrLvCcC2/uV4p45Ow0I=
github.com/microsoft/kiota-http-go v1.4.3/go.mod h1:Kup5nMDD3a9sjdgRKHCqZWqtrv3FbprjcPaGjLR6FzM=
github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI=
github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA=
github.com/microsoft/kiota-serialization-json-go v1.0.7 h1:yMbckSTPrjZdM4EMXgzLZSA3CtDaUBI350u0VoYRz7Y=
Expand All @@ -33,8 +33,8 @@ github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0
github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/std-uritemplate/std-uritemplate/go v0.0.55 h1:muSH037g97K7U2f94G9LUuE8tZlJsoSSrPsO9V281WY=
github.com/std-uritemplate/std-uritemplate/go v0.0.55/go.mod h1:rG/bqh/ThY4xE5de7Rap3vaDkYUT76B0GPJ0loYeTTc=
github.com/std-uritemplate/std-uritemplate/go v0.0.57 h1:GHGjptrsmazP4IVDlUprssiEf9ESVkbjx15xQXXzvq4=
github.com/std-uritemplate/std-uritemplate/go v0.0.57/go.mod h1:rG/bqh/ThY4xE5de7Rap3vaDkYUT76B0GPJ0loYeTTc=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
Expand Down
6 changes: 5 additions & 1 deletion pkg/github/advisories/advisories_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ type AdvisoriesRequestBuilderGetQueryParameters struct {
Direction *GetDirectionQueryParameterType `uriparametername:"direction"`
// If specified, only advisories for these ecosystems will be returned.
Ecosystem *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecurityAdvisoryEcosystems `uriparametername:"ecosystem"`
// If specified, only return advisories that have an EPSS percentage score that matches the provided value.The EPSS percentage represents the likelihood of a CVE being exploited.
Epss_percentage *string `uriparametername:"epss_percentage"`
// If specified, only return advisories that have an EPSS percentile score that matches the provided value.The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.
Epss_percentile *string `uriparametername:"epss_percentile"`
// If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.
Ghsa_id *string `uriparametername:"ghsa_id"`
// Whether to only return advisories that have been withdrawn.
Expand Down Expand Up @@ -60,7 +64,7 @@ func (m *AdvisoriesRequestBuilder) ByGhsa_id(ghsa_id string)(*WithGhsa_ItemReque
// NewAdvisoriesRequestBuilderInternal instantiates a new AdvisoriesRequestBuilder and sets the default values.
func NewAdvisoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AdvisoriesRequestBuilder) {
m := &AdvisoriesRequestBuilder{
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", pathParameters),
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,epss_percentage*,epss_percentile*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", pathParameters),
}
return m
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/advisories/get_direction_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package advisories
import (
"errors"
)
type GetDirectionQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) {
case "desc":
result = DESC_GETDIRECTIONQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/advisories/get_severity_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package advisories
import (
"errors"
)
type GetSeverityQueryParameterType int

const (
Expand Down Expand Up @@ -29,7 +26,7 @@ func ParseGetSeverityQueryParameterType(v string) (any, error) {
case "critical":
result = CRITICAL_GETSEVERITYQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetSeverityQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/advisories/get_sort_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package advisories
import (
"errors"
)
type GetSortQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) {
case "published":
result = PUBLISHED_GETSORTQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetSortQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/advisories/get_type_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package advisories
import (
"errors"
)
type GetTypeQueryParameterType int

const (
Expand All @@ -23,7 +20,7 @@ func ParseGetTypeQueryParameterType(v string) (any, error) {
case "unreviewed":
result = UNREVIEWED_GETTYPEQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetTypeQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@ import (
i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models"
)

type ItemConversionsPostResponse struct {
type ItemConversionsIntegration struct {
i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integration
}
// NewItemConversionsPostResponse instantiates a new ItemConversionsPostResponse and sets the default values.
func NewItemConversionsPostResponse()(*ItemConversionsPostResponse) {
m := &ItemConversionsPostResponse{
// NewItemConversionsIntegration instantiates a new ItemConversionsIntegration and sets the default values.
func NewItemConversionsIntegration()(*ItemConversionsIntegration) {
m := &ItemConversionsIntegration{
Integration: *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NewIntegration(),
}
return m
}
// CreateItemConversionsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// CreateItemConversionsIntegrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateItemConversionsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemConversionsPostResponse(), nil
func CreateItemConversionsIntegrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemConversionsIntegration(), nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *ItemConversionsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
func (m *ItemConversionsIntegration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Integration.GetFieldDeserializers()
return res
}
// Serialize serializes information the current object
func (m *ItemConversionsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
func (m *ItemConversionsIntegration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Integration.Serialize(writer)
if err != nil {
return err
}
return nil
}
type ItemConversionsPostResponseable interface {
type ItemConversionsIntegrationable interface {
i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integrationable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
}
8 changes: 4 additions & 4 deletions pkg/github/appmanifests/item_conversions_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ func NewItemConversionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da
return NewItemConversionsRequestBuilderInternal(urlParams, requestAdapter)
}
// Post use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.
// returns a ItemConversionsPostResponseable when successful
// returns a ItemConversionsIntegrationable when successful
// returns a BasicError error when the service returns a 404 status code
// returns a ValidationErrorSimple error when the service returns a 422 status code
// [API method documentation]
//
// [API method documentation]: https://docs.github.com/rest/apps/apps#create-a-github-app-from-a-manifest
func (m *ItemConversionsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemConversionsPostResponseable, error) {
func (m *ItemConversionsRequestBuilder) Post(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemConversionsIntegrationable, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration);
if err != nil {
return nil, err
Expand All @@ -39,14 +39,14 @@ func (m *ItemConversionsRequestBuilder) Post(ctx context.Context, requestConfigu
"404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue,
"422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorSimpleFromDiscriminatorValue,
}
res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemConversionsPostResponseFromDiscriminatorValue, errorMapping)
res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemConversionsIntegrationFromDiscriminatorValue, errorMapping)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
}
return res.(ItemConversionsPostResponseable), nil
return res.(ItemConversionsIntegrationable), nil
}
// ToPostRequestInformation use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.
// returns a *RequestInformation when successful
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package alerts
import (
"errors"
)
type GetDirectionQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) {
case "desc":
result = DESC_GETDIRECTIONQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package alerts
import (
"errors"
)
type GetScopeQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetScopeQueryParameterType(v string) (any, error) {
case "runtime":
result = RUNTIME_GETSCOPEQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetScopeQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package alerts
import (
"errors"
)
type GetSortQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) {
case "updated":
result = UPDATED_GETSORTQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetSortQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package alerts
import (
"errors"
)
type GetDirectionQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) {
case "desc":
result = DESC_GETDIRECTIONQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package alerts
import (
"errors"
)
type GetSortQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) {
case "updated":
result = UPDATED_GETSORTQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetSortQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package alerts
import (
"errors"
)
type GetStateQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) {
case "resolved":
result = RESOLVED_GETSTATEQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetStateQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/issues/get_direction_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package issues
import (
"errors"
)
type GetDirectionQueryParameterType int

const (
Expand All @@ -20,7 +17,7 @@ func ParseGetDirectionQueryParameterType(v string) (any, error) {
case "desc":
result = DESC_GETDIRECTIONQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetDirectionQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/issues/get_filter_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package issues
import (
"errors"
)
type GetFilterQueryParameterType int

const (
Expand Down Expand Up @@ -32,7 +29,7 @@ func ParseGetFilterQueryParameterType(v string) (any, error) {
case "all":
result = ALL_GETFILTERQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetFilterQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/issues/get_sort_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package issues
import (
"errors"
)
type GetSortQueryParameterType int

const (
Expand All @@ -23,7 +20,7 @@ func ParseGetSortQueryParameterType(v string) (any, error) {
case "comments":
result = COMMENTS_GETSORTQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetSortQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
5 changes: 1 addition & 4 deletions pkg/github/issues/get_state_query_parameter_type.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package issues
import (
"errors"
)
type GetStateQueryParameterType int

const (
Expand All @@ -23,7 +20,7 @@ func ParseGetStateQueryParameterType(v string) (any, error) {
case "all":
result = ALL_GETSTATEQUERYPARAMETERTYPE
default:
return 0, errors.New("Unknown GetStateQueryParameterType value: " + v)
return nil, nil
}
return &result, nil
}
Expand Down
Loading

0 comments on commit 6cbea5c

Please sign in to comment.