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 Sep 18, 2024
1 parent dc993f6 commit df3ca4f
Show file tree
Hide file tree
Showing 31 changed files with 2,878 additions and 2,378 deletions.
4,687 changes: 2,343 additions & 2,344 deletions pkg/github/.kiota.log

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type ItemCode_security_and_analysisPatchRequestBody struct {
dependabot_alerts_enabled_for_new_repositories *bool
// Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/about-secret-scanning)."
secret_scanning_enabled_for_new_repositories *bool
// Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.
secret_scanning_non_provider_patterns_enabled_for_new_repositories *bool
// The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`.
secret_scanning_push_protection_custom_link *string
// Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
Expand Down Expand Up @@ -96,6 +98,16 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) GetFieldDeserializers()
}
return nil
}
res["secret_scanning_non_provider_patterns_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetSecretScanningNonProviderPatternsEnabledForNewRepositories(val)
}
return nil
}
res["secret_scanning_push_protection_custom_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -123,6 +135,11 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) GetFieldDeserializers()
func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningEnabledForNewRepositories()(*bool) {
return m.secret_scanning_enabled_for_new_repositories
}
// GetSecretScanningNonProviderPatternsEnabledForNewRepositories gets the secret_scanning_non_provider_patterns_enabled_for_new_repositories property value. Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.
// returns a *bool when successful
func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningNonProviderPatternsEnabledForNewRepositories()(*bool) {
return m.secret_scanning_non_provider_patterns_enabled_for_new_repositories
}
// GetSecretScanningPushProtectionCustomLink gets the secret_scanning_push_protection_custom_link property value. The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`.
// returns a *string when successful
func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningPushProtectionCustomLink()(*string) {
Expand Down Expand Up @@ -159,6 +176,12 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) Serialize(writer i878a8
return err
}
}
{
err := writer.WriteBoolValue("secret_scanning_non_provider_patterns_enabled_for_new_repositories", m.GetSecretScanningNonProviderPatternsEnabledForNewRepositories())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("secret_scanning_push_protection_custom_link", m.GetSecretScanningPushProtectionCustomLink())
if err != nil {
Expand Down Expand Up @@ -199,6 +222,10 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) SetDependabotAlertsEnab
func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningEnabledForNewRepositories(value *bool)() {
m.secret_scanning_enabled_for_new_repositories = value
}
// SetSecretScanningNonProviderPatternsEnabledForNewRepositories sets the secret_scanning_non_provider_patterns_enabled_for_new_repositories property value. Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.
func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningNonProviderPatternsEnabledForNewRepositories(value *bool)() {
m.secret_scanning_non_provider_patterns_enabled_for_new_repositories = value
}
// SetSecretScanningPushProtectionCustomLink sets the secret_scanning_push_protection_custom_link property value. The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`.
func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningPushProtectionCustomLink(value *string)() {
m.secret_scanning_push_protection_custom_link = value
Expand All @@ -214,12 +241,14 @@ type ItemCode_security_and_analysisPatchRequestBodyable interface {
GetAdvancedSecurityEnabledNewUserNamespaceRepos()(*bool)
GetDependabotAlertsEnabledForNewRepositories()(*bool)
GetSecretScanningEnabledForNewRepositories()(*bool)
GetSecretScanningNonProviderPatternsEnabledForNewRepositories()(*bool)
GetSecretScanningPushProtectionCustomLink()(*string)
GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool)
SetAdvancedSecurityEnabledForNewRepositories(value *bool)()
SetAdvancedSecurityEnabledNewUserNamespaceRepos(value *bool)()
SetDependabotAlertsEnabledForNewRepositories(value *bool)()
SetSecretScanningEnabledForNewRepositories(value *bool)()
SetSecretScanningNonProviderPatternsEnabledForNewRepositories(value *bool)()
SetSecretScanningPushProtectionCustomLink(value *string)()
SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)()
}
4 changes: 2 additions & 2 deletions pkg/github/gists/item_comments_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ type ItemCommentsRequestBuilderGetQueryParameters struct {
}
// ByComment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.gists.item.comments.item collection
// returns a *ItemCommentsWithComment_ItemRequestBuilder when successful
func (m *ItemCommentsRequestBuilder) ByComment_id(comment_id int32)(*ItemCommentsWithComment_ItemRequestBuilder) {
func (m *ItemCommentsRequestBuilder) ByComment_id(comment_id int64)(*ItemCommentsWithComment_ItemRequestBuilder) {
urlTplParams := make(map[string]string)
for idx, item := range m.BaseRequestBuilder.PathParameters {
urlTplParams[idx] = item
}
urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_id), 10)
urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(comment_id, 10)
return NewItemCommentsWithComment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter)
}
// NewItemCommentsRequestBuilderInternal instantiates a new ItemCommentsRequestBuilder and sets the default values.
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": "1E5659346280ACC42E7347F455C9745430816E286741F28D697F69DE54F067512934F65A5A168EC3795E3E8B35D1635D3AF923C0E7542B1ECBD2026FB8B3B61A",
"descriptionHash": "EB274BA152C71E9EB451D0559F622D8F43A7E5E7ED0B38EC3F40EC16B3141647FB458E4617E9157AFF3BB90A04F1BD5F22D30ABF90D83AE96576D5D6A1A00178",
"descriptionLocation": "../../../../../schemas/ghec.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.18.0",
Expand Down
35 changes: 35 additions & 0 deletions pkg/github/models/api_overview.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ type ApiOverview struct {
additionalData map[string]any
// The api property
api []string
// The codespaces property
codespaces []string
// The copilot property
copilot []string
// The dependabot property
Expand Down Expand Up @@ -73,6 +75,11 @@ func (m *ApiOverview) GetAdditionalData()(map[string]any) {
func (m *ApiOverview) GetApi()([]string) {
return m.api
}
// GetCodespaces gets the codespaces property value. The codespaces property
// returns a []string when successful
func (m *ApiOverview) GetCodespaces()([]string) {
return m.codespaces
}
// GetCopilot gets the copilot property value. The copilot property
// returns a []string when successful
func (m *ApiOverview) GetCopilot()([]string) {
Expand Down Expand Up @@ -140,6 +147,22 @@ func (m *ApiOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26
}
return nil
}
res["codespaces"] = 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.SetCodespaces(res)
}
return nil
}
res["copilot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
Expand Down Expand Up @@ -402,6 +425,12 @@ func (m *ApiOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6
return err
}
}
if m.GetCodespaces() != nil {
err := writer.WriteCollectionOfStringValues("codespaces", m.GetCodespaces())
if err != nil {
return err
}
}
if m.GetCopilot() != nil {
err := writer.WriteCollectionOfStringValues("copilot", m.GetCopilot())
if err != nil {
Expand Down Expand Up @@ -504,6 +533,10 @@ func (m *ApiOverview) SetAdditionalData(value map[string]any)() {
func (m *ApiOverview) SetApi(value []string)() {
m.api = value
}
// SetCodespaces sets the codespaces property value. The codespaces property
func (m *ApiOverview) SetCodespaces(value []string)() {
m.codespaces = value
}
// SetCopilot sets the copilot property value. The copilot property
func (m *ApiOverview) SetCopilot(value []string)() {
m.copilot = value
Expand Down Expand Up @@ -562,6 +595,7 @@ type ApiOverviewable interface {
GetActions()([]string)
GetActionsMacos()([]string)
GetApi()([]string)
GetCodespaces()([]string)
GetCopilot()([]string)
GetDependabot()([]string)
GetDomains()(ApiOverview_domainsable)
Expand All @@ -578,6 +612,7 @@ type ApiOverviewable interface {
SetActions(value []string)()
SetActionsMacos(value []string)()
SetApi(value []string)()
SetCodespaces(value []string)()
SetCopilot(value []string)()
SetDependabot(value []string)()
SetDomains(value ApiOverview_domainsable)()
Expand Down
109 changes: 109 additions & 0 deletions pkg/github/models/cvss_severities.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
package models

import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)

type CvssSeverities 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 cvss_v3 property
cvss_v3 CvssSeverities_cvss_v3able
// The cvss_v4 property
cvss_v4 CvssSeverities_cvss_v4able
}
// NewCvssSeverities instantiates a new CvssSeverities and sets the default values.
func NewCvssSeverities()(*CvssSeverities) {
m := &CvssSeverities{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateCvssSeveritiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateCvssSeveritiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewCvssSeverities(), 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 *CvssSeverities) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetCvssV3 gets the cvss_v3 property value. The cvss_v3 property
// returns a CvssSeverities_cvss_v3able when successful
func (m *CvssSeverities) GetCvssV3()(CvssSeverities_cvss_v3able) {
return m.cvss_v3
}
// GetCvssV4 gets the cvss_v4 property value. The cvss_v4 property
// returns a CvssSeverities_cvss_v4able when successful
func (m *CvssSeverities) GetCvssV4()(CvssSeverities_cvss_v4able) {
return m.cvss_v4
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *CvssSeverities) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["cvss_v3"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateCvssSeverities_cvss_v3FromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCvssV3(val.(CvssSeverities_cvss_v3able))
}
return nil
}
res["cvss_v4"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateCvssSeverities_cvss_v4FromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCvssV4(val.(CvssSeverities_cvss_v4able))
}
return nil
}
return res
}
// Serialize serializes information the current object
func (m *CvssSeverities) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteObjectValue("cvss_v3", m.GetCvssV3())
if err != nil {
return err
}
}
{
err := writer.WriteObjectValue("cvss_v4", m.GetCvssV4())
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 *CvssSeverities) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetCvssV3 sets the cvss_v3 property value. The cvss_v3 property
func (m *CvssSeverities) SetCvssV3(value CvssSeverities_cvss_v3able)() {
m.cvss_v3 = value
}
// SetCvssV4 sets the cvss_v4 property value. The cvss_v4 property
func (m *CvssSeverities) SetCvssV4(value CvssSeverities_cvss_v4able)() {
m.cvss_v4 = value
}
type CvssSeveritiesable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetCvssV3()(CvssSeverities_cvss_v3able)
GetCvssV4()(CvssSeverities_cvss_v4able)
SetCvssV3(value CvssSeverities_cvss_v3able)()
SetCvssV4(value CvssSeverities_cvss_v4able)()
}
Loading

0 comments on commit df3ca4f

Please sign in to comment.