Skip to content

Commit

Permalink
feat: Changes in generated code
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
octokitbot and Octokit Bot authored Jul 16, 2024
1 parent 3188c88 commit a196ac2
Show file tree
Hide file tree
Showing 21 changed files with 3,314 additions and 2,309 deletions.
4,795 changes: 2,536 additions & 2,259 deletions pkg/github/.kiota.log

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
type ItemSettingsBillingUsageRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
// ItemSettingsBillingUsageRequestBuilderGetQueryParameters gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.
// ItemSettingsBillingUsageRequestBuilderGetQueryParameters gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)."
type ItemSettingsBillingUsageRequestBuilderGetQueryParameters struct {
// The ID corresponding to a cost center.
Cost_center_id *string `uriparametername:"cost_center_id"`
Expand All @@ -36,7 +36,7 @@ func NewItemSettingsBillingUsageRequestBuilder(rawUrl string, requestAdapter i2a
urlParams["request-raw-url"] = rawUrl
return NewItemSettingsBillingUsageRequestBuilderInternal(urlParams, requestAdapter)
}
// Get gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.
// Get gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)."
// returns a BillingUsageReportable when successful
// returns a BasicError error when the service returns a 400 status code
// returns a BasicError error when the service returns a 403 status code
Expand Down Expand Up @@ -65,7 +65,7 @@ func (m *ItemSettingsBillingUsageRequestBuilder) Get(ctx context.Context, reques
}
return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.BillingUsageReportable), nil
}
// ToGetRequestInformation gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.
// ToGetRequestInformation gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)."
// returns a *RequestInformation when successful
func (m *ItemSettingsBillingUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
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": "3207A1EF4EB3F1DD995986A1E442051CE8E1D6E5D4B1669A462D4A71B82DF4EC6ADE644A2C9DE0F91A05F20A870800D471C40564691AE2C7AFAE7FFEEB00A9FE",
"descriptionHash": "9CAA11544AA2E247D3B19DFCEE8EC7EE5752A11068C0077A440740030F88D96DC8EB0A3EBB206AB7DE1D29A448A7E57F8A08B19983437C1FB488C2FBDCB46629",
"descriptionLocation": "../../../../../schemas/ghec.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
Expand Down
60 changes: 60 additions & 0 deletions pkg/github/models/code_security_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ type CodeSecurityConfiguration struct {
dependency_graph *CodeSecurityConfiguration_dependency_graph
// A description of the code security configuration
description *string
// The enforcement status for a security configuration
enforcement *CodeSecurityConfiguration_enforcement
// The URL of the configuration
html_url *string
// The ID of the code security configuration
Expand All @@ -35,6 +37,8 @@ type CodeSecurityConfiguration struct {
secret_scanning *CodeSecurityConfiguration_secret_scanning
// The enablement status of secret scanning push protection
secret_scanning_push_protection *CodeSecurityConfiguration_secret_scanning_push_protection
// The enablement status of secret scanning validity checks
secret_scanning_validity_checks *CodeSecurityConfiguration_secret_scanning_validity_checks
// The type of the code security configuration.
target_type *CodeSecurityConfiguration_target_type
// The updated_at property
Expand Down Expand Up @@ -94,6 +98,11 @@ func (m *CodeSecurityConfiguration) GetDependencyGraph()(*CodeSecurityConfigurat
func (m *CodeSecurityConfiguration) GetDescription()(*string) {
return m.description
}
// GetEnforcement gets the enforcement property value. The enforcement status for a security configuration
// returns a *CodeSecurityConfiguration_enforcement when successful
func (m *CodeSecurityConfiguration) GetEnforcement()(*CodeSecurityConfiguration_enforcement) {
return m.enforcement
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *CodeSecurityConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
Expand Down Expand Up @@ -168,6 +177,16 @@ func (m *CodeSecurityConfiguration) GetFieldDeserializers()(map[string]func(i878
}
return nil
}
res["enforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_enforcement)
if err != nil {
return err
}
if val != nil {
m.SetEnforcement(val.(*CodeSecurityConfiguration_enforcement))
}
return nil
}
res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -228,6 +247,16 @@ func (m *CodeSecurityConfiguration) GetFieldDeserializers()(map[string]func(i878
}
return nil
}
res["secret_scanning_validity_checks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_secret_scanning_validity_checks)
if err != nil {
return err
}
if val != nil {
m.SetSecretScanningValidityChecks(val.(*CodeSecurityConfiguration_secret_scanning_validity_checks))
}
return nil
}
res["target_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_target_type)
if err != nil {
Expand Down Expand Up @@ -290,6 +319,11 @@ func (m *CodeSecurityConfiguration) GetSecretScanning()(*CodeSecurityConfigurati
func (m *CodeSecurityConfiguration) GetSecretScanningPushProtection()(*CodeSecurityConfiguration_secret_scanning_push_protection) {
return m.secret_scanning_push_protection
}
// GetSecretScanningValidityChecks gets the secret_scanning_validity_checks property value. The enablement status of secret scanning validity checks
// returns a *CodeSecurityConfiguration_secret_scanning_validity_checks when successful
func (m *CodeSecurityConfiguration) GetSecretScanningValidityChecks()(*CodeSecurityConfiguration_secret_scanning_validity_checks) {
return m.secret_scanning_validity_checks
}
// GetTargetType gets the target_type property value. The type of the code security configuration.
// returns a *CodeSecurityConfiguration_target_type when successful
func (m *CodeSecurityConfiguration) GetTargetType()(*CodeSecurityConfiguration_target_type) {
Expand Down Expand Up @@ -354,6 +388,13 @@ func (m *CodeSecurityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f
return err
}
}
if m.GetEnforcement() != nil {
cast := (*m.GetEnforcement()).String()
err := writer.WriteStringValue("enforcement", &cast)
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("html_url", m.GetHtmlUrl())
if err != nil {
Expand Down Expand Up @@ -393,6 +434,13 @@ func (m *CodeSecurityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f
return err
}
}
if m.GetSecretScanningValidityChecks() != nil {
cast := (*m.GetSecretScanningValidityChecks()).String()
err := writer.WriteStringValue("secret_scanning_validity_checks", &cast)
if err != nil {
return err
}
}
if m.GetTargetType() != nil {
cast := (*m.GetTargetType()).String()
err := writer.WriteStringValue("target_type", &cast)
Expand Down Expand Up @@ -452,6 +500,10 @@ func (m *CodeSecurityConfiguration) SetDependencyGraph(value *CodeSecurityConfig
func (m *CodeSecurityConfiguration) SetDescription(value *string)() {
m.description = value
}
// SetEnforcement sets the enforcement property value. The enforcement status for a security configuration
func (m *CodeSecurityConfiguration) SetEnforcement(value *CodeSecurityConfiguration_enforcement)() {
m.enforcement = value
}
// SetHtmlUrl sets the html_url property value. The URL of the configuration
func (m *CodeSecurityConfiguration) SetHtmlUrl(value *string)() {
m.html_url = value
Expand All @@ -476,6 +528,10 @@ func (m *CodeSecurityConfiguration) SetSecretScanning(value *CodeSecurityConfigu
func (m *CodeSecurityConfiguration) SetSecretScanningPushProtection(value *CodeSecurityConfiguration_secret_scanning_push_protection)() {
m.secret_scanning_push_protection = value
}
// SetSecretScanningValidityChecks sets the secret_scanning_validity_checks property value. The enablement status of secret scanning validity checks
func (m *CodeSecurityConfiguration) SetSecretScanningValidityChecks(value *CodeSecurityConfiguration_secret_scanning_validity_checks)() {
m.secret_scanning_validity_checks = value
}
// SetTargetType sets the target_type property value. The type of the code security configuration.
func (m *CodeSecurityConfiguration) SetTargetType(value *CodeSecurityConfiguration_target_type)() {
m.target_type = value
Expand All @@ -498,12 +554,14 @@ type CodeSecurityConfigurationable interface {
GetDependabotSecurityUpdates()(*CodeSecurityConfiguration_dependabot_security_updates)
GetDependencyGraph()(*CodeSecurityConfiguration_dependency_graph)
GetDescription()(*string)
GetEnforcement()(*CodeSecurityConfiguration_enforcement)
GetHtmlUrl()(*string)
GetId()(*int32)
GetName()(*string)
GetPrivateVulnerabilityReporting()(*CodeSecurityConfiguration_private_vulnerability_reporting)
GetSecretScanning()(*CodeSecurityConfiguration_secret_scanning)
GetSecretScanningPushProtection()(*CodeSecurityConfiguration_secret_scanning_push_protection)
GetSecretScanningValidityChecks()(*CodeSecurityConfiguration_secret_scanning_validity_checks)
GetTargetType()(*CodeSecurityConfiguration_target_type)
GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetUrl()(*string)
Expand All @@ -514,12 +572,14 @@ type CodeSecurityConfigurationable interface {
SetDependabotSecurityUpdates(value *CodeSecurityConfiguration_dependabot_security_updates)()
SetDependencyGraph(value *CodeSecurityConfiguration_dependency_graph)()
SetDescription(value *string)()
SetEnforcement(value *CodeSecurityConfiguration_enforcement)()
SetHtmlUrl(value *string)()
SetId(value *int32)()
SetName(value *string)()
SetPrivateVulnerabilityReporting(value *CodeSecurityConfiguration_private_vulnerability_reporting)()
SetSecretScanning(value *CodeSecurityConfiguration_secret_scanning)()
SetSecretScanningPushProtection(value *CodeSecurityConfiguration_secret_scanning_push_protection)()
SetSecretScanningValidityChecks(value *CodeSecurityConfiguration_secret_scanning_validity_checks)()
SetTargetType(value *CodeSecurityConfiguration_target_type)()
SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetUrl(value *string)()
Expand Down
37 changes: 37 additions & 0 deletions pkg/github/models/code_security_configuration_enforcement.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package models
import (
"errors"
)
// The enforcement status for a security configuration
type CodeSecurityConfiguration_enforcement int

const (
ENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT CodeSecurityConfiguration_enforcement = iota
UNENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT
)

func (i CodeSecurityConfiguration_enforcement) String() string {
return []string{"enforced", "unenforced"}[i]
}
func ParseCodeSecurityConfiguration_enforcement(v string) (any, error) {
result := ENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT
switch v {
case "enforced":
result = ENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT
case "unenforced":
result = UNENFORCED_CODESECURITYCONFIGURATION_ENFORCEMENT
default:
return 0, errors.New("Unknown CodeSecurityConfiguration_enforcement value: " + v)
}
return &result, nil
}
func SerializeCodeSecurityConfiguration_enforcement(values []CodeSecurityConfiguration_enforcement) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i CodeSecurityConfiguration_enforcement) isMultiValue() bool {
return false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package models
import (
"errors"
)
// The enablement status of secret scanning validity checks
type CodeSecurityConfiguration_secret_scanning_validity_checks int

const (
ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS CodeSecurityConfiguration_secret_scanning_validity_checks = iota
DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS
NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS
)

func (i CodeSecurityConfiguration_secret_scanning_validity_checks) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseCodeSecurityConfiguration_secret_scanning_validity_checks(v string) (any, error) {
result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS
switch v {
case "enabled":
result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS
case "disabled":
result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS
case "not_set":
result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_VALIDITY_CHECKS
default:
return 0, errors.New("Unknown CodeSecurityConfiguration_secret_scanning_validity_checks value: " + v)
}
return &result, nil
}
func SerializeCodeSecurityConfiguration_secret_scanning_validity_checks(values []CodeSecurityConfiguration_secret_scanning_validity_checks) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i CodeSecurityConfiguration_secret_scanning_validity_checks) isMultiValue() bool {
return false
}
Loading

0 comments on commit a196ac2

Please sign in to comment.