Skip to content

Commit

Permalink
New updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot committed Jan 7, 2025
1 parent 5ff8fd3 commit 36de8ef
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 3 deletions.
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": "1E3B4B453642A170C2B017A5E078B2DEC6C94D68C54F912F6AD9A6E258569AFE80D8930DD05455D2F905ABF8E68E77C9C1D38EB4D1ECEF521FADB0549B8B483A",
"descriptionHash": "B52F8D200346F72027E19020AC6FD43674E66C39C2A169B0BBAC6CDDE9C96F208E75CA58910C8314F0DA42A1BDBFFEEB7C9B7654C4C25CAD2AFE1B2F110E7828",
"descriptionLocation": "../../../../../schemas/api.github.com.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
29 changes: 29 additions & 0 deletions pkg/github/models/base_gist.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -591,6 +618,7 @@ type BaseGistable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetComments()(*int32)
GetCommentsEnabled()(*bool)
GetCommentsUrl()(*string)
GetCommitsUrl()(*string)
GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
Expand All @@ -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)()
Expand Down
29 changes: 29 additions & 0 deletions pkg/github/models/gist_simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -647,6 +674,7 @@ type GistSimpleable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetComments()(*int32)
GetCommentsEnabled()(*bool)
GetCommentsUrl()(*string)
GetCommitsUrl()(*string)
GetCreatedAt()(*string)
Expand All @@ -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)()
Expand Down
29 changes: 29 additions & 0 deletions pkg/github/models/gist_simple_escaped_fork_escaped_of.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -591,6 +618,7 @@ type GistSimple_fork_ofable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetComments()(*int32)
GetCommentsEnabled()(*bool)
GetCommentsUrl()(*string)
GetCommitsUrl()(*string)
GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
Expand All @@ -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)()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
Expand Down

0 comments on commit 36de8ef

Please sign in to comment.