Skip to content

Commit

Permalink
feat: first batch of integer overflow fixes, artifact attestations, d…
Browse files Browse the repository at this point in the history
…ocs changes (#81)

* New updates to generated code

* New updates to generated code

* New updates to generated code

* New updates to generated code

---------

Co-authored-by: Octokit Bot <octokitbot@martynus.net>
  • Loading branch information
octokitbot and Octokit Bot committed Jun 28, 2024
1 parent 7210feb commit f32922b
Show file tree
Hide file tree
Showing 54 changed files with 3,399 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ItemCopilotBillingSeatsGetResponse struct {
additionalData map[string]any
// The seats property
seats []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable
// Total number of Copilot seats for the organization currently being billed.
// The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once.
total_seats *int32
}
// NewItemCopilotBillingSeatsGetResponse instantiates a new ItemCopilotBillingSeatsGetResponse and sets the default values.
Expand Down Expand Up @@ -67,7 +67,7 @@ func (m *ItemCopilotBillingSeatsGetResponse) GetFieldDeserializers()(map[string]
func (m *ItemCopilotBillingSeatsGetResponse) GetSeats()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable) {
return m.seats
}
// GetTotalSeats gets the total_seats property value. Total number of Copilot seats for the organization currently being billed.
// GetTotalSeats gets the total_seats property value. The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once.
// returns a *int32 when successful
func (m *ItemCopilotBillingSeatsGetResponse) GetTotalSeats()(*int32) {
return m.total_seats
Expand Down Expand Up @@ -108,7 +108,7 @@ func (m *ItemCopilotBillingSeatsGetResponse) SetAdditionalData(value map[string]
func (m *ItemCopilotBillingSeatsGetResponse) SetSeats(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable)() {
m.seats = value
}
// SetTotalSeats sets the total_seats property value. Total number of Copilot seats for the organization currently being billed.
// SetTotalSeats sets the total_seats property value. The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once.
func (m *ItemCopilotBillingSeatsGetResponse) SetTotalSeats(value *int32)() {
m.total_seats = value
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
type ItemCopilotBillingSeatsRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.
// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.
type ItemCopilotBillingSeatsRequestBuilderGetQueryParameters 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"`
Expand All @@ -30,7 +30,7 @@ func NewItemCopilotBillingSeatsRequestBuilder(rawUrl string, requestAdapter i2ae
urlParams["request-raw-url"] = rawUrl
return NewItemCopilotBillingSeatsRequestBuilderInternal(urlParams, requestAdapter)
}
// Get **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.
// Get **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.
// returns a ItemCopilotBillingSeatsGetResponseable 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
Expand Down Expand Up @@ -59,7 +59,7 @@ func (m *ItemCopilotBillingSeatsRequestBuilder) Get(ctx context.Context, request
}
return res.(ItemCopilotBillingSeatsGetResponseable), nil
}
// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.
// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.
// returns a *RequestInformation when successful
func (m *ItemCopilotBillingSeatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
Expand Down
4 changes: 2 additions & 2 deletions pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"descriptionHash": "524B7995C3F724FBD5311CE721AFE148291ACD56B5B0A77B7A38BD87C4ABB7861406A0A812CBC457F589E9F17D1493533C0EDCA1A7CC6A587DADAB2A2E2BF9DE",
"descriptionLocation": "../../../../schemas/downloaded.json",
"descriptionHash": "E4E2AABED4BD59401902818C72E41CA2F0687B3623E90C31913C14D9C4EF622958C3E7803B45FFDD22856FE8BE14B2FB3FB3AAF72B4F479A9809E2EEF45DD55C",
"descriptionLocation": "../../../../../schemas/api.github.com.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
"clientClassName": "ApiClient",
Expand Down
16 changes: 8 additions & 8 deletions pkg/github/models/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Authorization struct {
// The hashed_token property
hashed_token *string
// The id property
id *int32
id *int64
// The installation property
installation NullableScopedInstallationable
// The note property
Expand Down Expand Up @@ -127,7 +127,7 @@ func (m *Authorization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d
return nil
}
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
val, err := n.GetInt64Value()
if err != nil {
return err
}
Expand Down Expand Up @@ -245,8 +245,8 @@ func (m *Authorization) GetHashedToken()(*string) {
return m.hashed_token
}
// GetId gets the id property value. The id property
// returns a *int32 when successful
func (m *Authorization) GetId()(*int32) {
// returns a *int64 when successful
func (m *Authorization) GetId()(*int64) {
return m.id
}
// GetInstallation gets the installation property value. The installation property
Expand Down Expand Up @@ -327,7 +327,7 @@ func (m *Authorization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0
}
}
{
err := writer.WriteInt32Value("id", m.GetId())
err := writer.WriteInt64Value("id", m.GetId())
if err != nil {
return err
}
Expand Down Expand Up @@ -419,7 +419,7 @@ func (m *Authorization) SetHashedToken(value *string)() {
m.hashed_token = value
}
// SetId sets the id property value. The id property
func (m *Authorization) SetId(value *int32)() {
func (m *Authorization) SetId(value *int64)() {
m.id = value
}
// SetInstallation sets the installation property value. The installation property
Expand Down Expand Up @@ -466,7 +466,7 @@ type Authorizationable interface {
GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetFingerprint()(*string)
GetHashedToken()(*string)
GetId()(*int32)
GetId()(*int64)
GetInstallation()(NullableScopedInstallationable)
GetNote()(*string)
GetNoteUrl()(*string)
Expand All @@ -481,7 +481,7 @@ type Authorizationable interface {
SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetFingerprint(value *string)()
SetHashedToken(value *string)()
SetId(value *int32)()
SetId(value *int64)()
SetInstallation(value NullableScopedInstallationable)()
SetNote(value *string)()
SetNoteUrl(value *string)()
Expand Down
29 changes: 29 additions & 0 deletions pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
type DependencyGraphSpdxSbom_sbom_packages 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 copyright holders of the package, and any dates present with those notices, if available.
copyrightText *string
// The location where the package can be downloaded,or NOASSERTION if this has not been determined.
downloadLocation *string
// The externalRefs property
Expand Down Expand Up @@ -43,6 +45,11 @@ func CreateDependencyGraphSpdxSbom_sbom_packagesFromDiscriminatorValue(parseNode
func (m *DependencyGraphSpdxSbom_sbom_packages) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetCopyrightText gets the copyrightText property value. The copyright holders of the package, and any dates present with those notices, if available.
// returns a *string when successful
func (m *DependencyGraphSpdxSbom_sbom_packages) GetCopyrightText()(*string) {
return m.copyrightText
}
// GetDownloadLocation gets the downloadLocation property value. The location where the package can be downloaded,or NOASSERTION if this has not been determined.
// returns a *string when successful
func (m *DependencyGraphSpdxSbom_sbom_packages) GetDownloadLocation()(*string) {
Expand All @@ -57,6 +64,16 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) GetExternalRefs()([]DependencyGr
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *DependencyGraphSpdxSbom_sbom_packages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["copyrightText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetCopyrightText(val)
}
return nil
}
res["downloadLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -192,6 +209,12 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) GetVersionInfo()(*string) {
}
// Serialize serializes information the current object
func (m *DependencyGraphSpdxSbom_sbom_packages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteStringValue("copyrightText", m.GetCopyrightText())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("downloadLocation", m.GetDownloadLocation())
if err != nil {
Expand Down Expand Up @@ -264,6 +287,10 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) Serialize(writer i878a80d2330e89
func (m *DependencyGraphSpdxSbom_sbom_packages) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetCopyrightText sets the copyrightText property value. The copyright holders of the package, and any dates present with those notices, if available.
func (m *DependencyGraphSpdxSbom_sbom_packages) SetCopyrightText(value *string)() {
m.copyrightText = value
}
// SetDownloadLocation sets the downloadLocation property value. The location where the package can be downloaded,or NOASSERTION if this has not been determined.
func (m *DependencyGraphSpdxSbom_sbom_packages) SetDownloadLocation(value *string)() {
m.downloadLocation = value
Expand Down Expand Up @@ -303,6 +330,7 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) SetVersionInfo(value *string)()
type DependencyGraphSpdxSbom_sbom_packagesable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetCopyrightText()(*string)
GetDownloadLocation()(*string)
GetExternalRefs()([]DependencyGraphSpdxSbom_sbom_packages_externalRefsable)
GetFilesAnalyzed()(*bool)
Expand All @@ -312,6 +340,7 @@ type DependencyGraphSpdxSbom_sbom_packagesable interface {
GetSPDXID()(*string)
GetSupplier()(*string)
GetVersionInfo()(*string)
SetCopyrightText(value *string)()
SetDownloadLocation(value *string)()
SetExternalRefs(value []DependencyGraphSpdxSbom_sbom_packages_externalRefsable)()
SetFilesAnalyzed(value *bool)()
Expand Down
16 changes: 8 additions & 8 deletions pkg/github/models/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Deployment struct {
// Name for the target deployment environment.
environment *string
// Unique identifier of the deployment
id *int32
id *int64
// The node_id property
node_id *string
// The original_environment property
Expand Down Expand Up @@ -128,7 +128,7 @@ func (m *Deployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268
return nil
}
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
val, err := n.GetInt64Value()
if err != nil {
return err
}
Expand Down Expand Up @@ -270,8 +270,8 @@ func (m *Deployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268
return res
}
// GetId gets the id property value. Unique identifier of the deployment
// returns a *int32 when successful
func (m *Deployment) GetId()(*int32) {
// returns a *int64 when successful
func (m *Deployment) GetId()(*int64) {
return m.id
}
// GetNodeId gets the node_id property value. The node_id property
Expand Down Expand Up @@ -366,7 +366,7 @@ func (m *Deployment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c
}
}
{
err := writer.WriteInt32Value("id", m.GetId())
err := writer.WriteInt64Value("id", m.GetId())
if err != nil {
return err
}
Expand Down Expand Up @@ -478,7 +478,7 @@ func (m *Deployment) SetEnvironment(value *string)() {
m.environment = value
}
// SetId sets the id property value. Unique identifier of the deployment
func (m *Deployment) SetId(value *int32)() {
func (m *Deployment) SetId(value *int64)() {
m.id = value
}
// SetNodeId sets the node_id property value. The node_id property
Expand Down Expand Up @@ -540,7 +540,7 @@ type Deploymentable interface {
GetCreator()(NullableSimpleUserable)
GetDescription()(*string)
GetEnvironment()(*string)
GetId()(*int32)
GetId()(*int64)
GetNodeId()(*string)
GetOriginalEnvironment()(*string)
GetPayload()(*string)
Expand All @@ -558,7 +558,7 @@ type Deploymentable interface {
SetCreator(value NullableSimpleUserable)()
SetDescription(value *string)()
SetEnvironment(value *string)()
SetId(value *int32)()
SetId(value *int64)()
SetNodeId(value *string)()
SetOriginalEnvironment(value *string)()
SetPayload(value *string)()
Expand Down
16 changes: 8 additions & 8 deletions pkg/github/models/deployment_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type DeploymentStatus struct {
// The URL for accessing your environment.
environment_url *string
// The id property
id *int32
id *int64
// The URL to associate with this status.
log_url *string
// The node_id property
Expand Down Expand Up @@ -152,7 +152,7 @@ func (m *DeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e
return nil
}
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
val, err := n.GetInt64Value()
if err != nil {
return err
}
Expand Down Expand Up @@ -244,8 +244,8 @@ func (m *DeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e
return res
}
// GetId gets the id property value. The id property
// returns a *int32 when successful
func (m *DeploymentStatus) GetId()(*int32) {
// returns a *int64 when successful
func (m *DeploymentStatus) GetId()(*int64) {
return m.id
}
// GetLogUrl gets the log_url property value. The URL to associate with this status.
Expand Down Expand Up @@ -327,7 +327,7 @@ func (m *DeploymentStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b
}
}
{
err := writer.WriteInt32Value("id", m.GetId())
err := writer.WriteInt64Value("id", m.GetId())
if err != nil {
return err
}
Expand Down Expand Up @@ -418,7 +418,7 @@ func (m *DeploymentStatus) SetEnvironmentUrl(value *string)() {
m.environment_url = value
}
// SetId sets the id property value. The id property
func (m *DeploymentStatus) SetId(value *int32)() {
func (m *DeploymentStatus) SetId(value *int64)() {
m.id = value
}
// SetLogUrl sets the log_url property value. The URL to associate with this status.
Expand Down Expand Up @@ -462,7 +462,7 @@ type DeploymentStatusable interface {
GetDescription()(*string)
GetEnvironment()(*string)
GetEnvironmentUrl()(*string)
GetId()(*int32)
GetId()(*int64)
GetLogUrl()(*string)
GetNodeId()(*string)
GetPerformedViaGithubApp()(NullableIntegrationable)
Expand All @@ -477,7 +477,7 @@ type DeploymentStatusable interface {
SetDescription(value *string)()
SetEnvironment(value *string)()
SetEnvironmentUrl(value *string)()
SetId(value *int32)()
SetId(value *int64)()
SetLogUrl(value *string)()
SetNodeId(value *string)()
SetPerformedViaGithubApp(value NullableIntegrationable)()
Expand Down
Loading

0 comments on commit f32922b

Please sign in to comment.