From 5846183ae5e18bbafce92c4d43d67b81ccd752b1 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 19 Jul 2024 13:20:31 -0500 Subject: [PATCH] feat: Changes in generated code * New updates to generated code * New updates to generated code --------- Co-authored-by: Octokit Bot Co-authored-by: Keegan Campbell --- pkg/github/kiota-lock.json | 2 +- .../models/code_security_configuration.go | 30 +++++++++ ...code_security_configuration_enforcement.go | 37 ++++++++++ pkg/github/models/organization_full.go | 54 ++++++++++----- ...gurations_post_request_body_enforcement.go | 37 ++++++++++ ...guration_patch_request_body_enforcement.go | 37 ++++++++++ ...nfigurations_detach_delete_request_body.go | 67 +++++++++++++++++++ ...y_configurations_detach_request_builder.go | 67 +++++++++++++++++++ ...security_configurations_request_builder.go | 5 ++ .../orgs/item_with_org_patch_request_body.go | 54 ++++++++++----- .../orgs/with_org_item_request_builder.go | 8 +-- 11 files changed, 357 insertions(+), 41 deletions(-) create mode 100644 pkg/github/models/code_security_configuration_enforcement.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_enforcement.go create mode 100644 pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_enforcement.go create mode 100644 pkg/github/orgs/item_code_security_configurations_detach_delete_request_body.go create mode 100644 pkg/github/orgs/item_code_security_configurations_detach_request_builder.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 1c70886d..ec3315d9 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "28892E7C7251AFE384B0BAF35F819C673A641FDA8EF33344D143E8081DBF2FE16C643E7DE09D2722ADEF7664B15C22F0315ACE2A63E7A80AA54D8F1B6DDA5D78", + "descriptionHash": "25CBDDF87B5D7FAED3AFBA18614FCE9BC696E3AA892C3A9253E5E733130804713C08A3F3D7360A24961AF443C24518812E497A7D6C8EE8FFAC1A003073730BEE", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", diff --git a/pkg/github/models/code_security_configuration.go b/pkg/github/models/code_security_configuration.go index 643134d2..9392aee8 100644 --- a/pkg/github/models/code_security_configuration.go +++ b/pkg/github/models/code_security_configuration.go @@ -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 @@ -96,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)) { @@ -170,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 { @@ -371,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 { @@ -476,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 @@ -526,6 +554,7 @@ type CodeSecurityConfigurationable interface { GetDependabotSecurityUpdates()(*CodeSecurityConfiguration_dependabot_security_updates) GetDependencyGraph()(*CodeSecurityConfiguration_dependency_graph) GetDescription()(*string) + GetEnforcement()(*CodeSecurityConfiguration_enforcement) GetHtmlUrl()(*string) GetId()(*int32) GetName()(*string) @@ -543,6 +572,7 @@ 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)() diff --git a/pkg/github/models/code_security_configuration_enforcement.go b/pkg/github/models/code_security_configuration_enforcement.go new file mode 100644 index 00000000..b74efe6f --- /dev/null +++ b/pkg/github/models/code_security_configuration_enforcement.go @@ -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 +} diff --git a/pkg/github/models/organization_full.go b/pkg/github/models/organization_full.go index 0b936c70..79cf5a4c 100644 --- a/pkg/github/models/organization_full.go +++ b/pkg/github/models/organization_full.go @@ -9,7 +9,8 @@ import ( type OrganizationFull struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // Deprecated: advanced_security_enabled_for_new_repositories *bool // The archived_at property archived_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time @@ -27,11 +28,14 @@ type OrganizationFull struct { created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The default_repository_permission property default_repository_permission *string - // Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred tothis organization.This field is only visible to organization owners or members of a team with the security manager role. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // Deprecated: dependabot_alerts_enabled_for_new_repositories *bool - // Whether dependabot security updates are automatically enabled for new repositories and repositories transferredto this organization.This field is only visible to organization owners or members of a team with the security manager role. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // Deprecated: dependabot_security_updates_enabled_for_new_repositories *bool - // Whether dependency graph is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // Deprecated: dependency_graph_enabled_for_new_repositories *bool // The description property description *string @@ -101,13 +105,15 @@ type OrganizationFull struct { public_repos *int32 // The repos_url property repos_url *string - // Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // Deprecated: secret_scanning_enabled_for_new_repositories *bool // An optional URL string to display to contributors who are blocked from pushing a secret. secret_scanning_push_protection_custom_link *string // Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. secret_scanning_push_protection_custom_link_enabled *bool - // Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. + // Deprecated: secret_scanning_push_protection_enabled_for_new_repositories *bool // The total_private_repos property total_private_repos *int32 @@ -141,7 +147,8 @@ func CreateOrganizationFullFromDiscriminatorValue(parseNode i878a80d2330e89d2689 func (m *OrganizationFull) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: // returns a *bool when successful func (m *OrganizationFull) GetAdvancedSecurityEnabledForNewRepositories()(*bool) { return m.advanced_security_enabled_for_new_repositories @@ -186,17 +193,20 @@ func (m *OrganizationFull) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3 func (m *OrganizationFull) GetDefaultRepositoryPermission()(*string) { return m.default_repository_permission } -// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred tothis organization.This field is only visible to organization owners or members of a team with the security manager role. +// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: // returns a *bool when successful func (m *OrganizationFull) GetDependabotAlertsEnabledForNewRepositories()(*bool) { return m.dependabot_alerts_enabled_for_new_repositories } -// GetDependabotSecurityUpdatesEnabledForNewRepositories gets the dependabot_security_updates_enabled_for_new_repositories property value. Whether dependabot security updates are automatically enabled for new repositories and repositories transferredto this organization.This field is only visible to organization owners or members of a team with the security manager role. +// GetDependabotSecurityUpdatesEnabledForNewRepositories gets the dependabot_security_updates_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: // returns a *bool when successful func (m *OrganizationFull) GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) { return m.dependabot_security_updates_enabled_for_new_repositories } -// GetDependencyGraphEnabledForNewRepositories gets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +// GetDependencyGraphEnabledForNewRepositories gets the dependency_graph_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: // returns a *bool when successful func (m *OrganizationFull) GetDependencyGraphEnabledForNewRepositories()(*bool) { return m.dependency_graph_enabled_for_new_repositories @@ -947,7 +957,8 @@ func (m *OrganizationFull) GetPublicRepos()(*int32) { func (m *OrganizationFull) GetReposUrl()(*string) { return m.repos_url } -// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: // returns a *bool when successful func (m *OrganizationFull) GetSecretScanningEnabledForNewRepositories()(*bool) { return m.secret_scanning_enabled_for_new_repositories @@ -962,7 +973,8 @@ func (m *OrganizationFull) GetSecretScanningPushProtectionCustomLink()(*string) func (m *OrganizationFull) GetSecretScanningPushProtectionCustomLinkEnabled()(*bool) { return m.secret_scanning_push_protection_custom_link_enabled } -// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: // returns a *bool when successful func (m *OrganizationFull) GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) { return m.secret_scanning_push_protection_enabled_for_new_repositories @@ -1358,7 +1370,8 @@ func (m *OrganizationFull) Serialize(writer i878a80d2330e89d26896388a3f487eef27b func (m *OrganizationFull) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: func (m *OrganizationFull) SetAdvancedSecurityEnabledForNewRepositories(value *bool)() { m.advanced_security_enabled_for_new_repositories = value } @@ -1394,15 +1407,18 @@ func (m *OrganizationFull) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6 func (m *OrganizationFull) SetDefaultRepositoryPermission(value *string)() { m.default_repository_permission = value } -// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred tothis organization.This field is only visible to organization owners or members of a team with the security manager role. +// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: func (m *OrganizationFull) SetDependabotAlertsEnabledForNewRepositories(value *bool)() { m.dependabot_alerts_enabled_for_new_repositories = value } -// SetDependabotSecurityUpdatesEnabledForNewRepositories sets the dependabot_security_updates_enabled_for_new_repositories property value. Whether dependabot security updates are automatically enabled for new repositories and repositories transferredto this organization.This field is only visible to organization owners or members of a team with the security manager role. +// SetDependabotSecurityUpdatesEnabledForNewRepositories sets the dependabot_security_updates_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: func (m *OrganizationFull) SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() { m.dependabot_security_updates_enabled_for_new_repositories = value } -// SetDependencyGraphEnabledForNewRepositories sets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +// SetDependencyGraphEnabledForNewRepositories sets the dependency_graph_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: func (m *OrganizationFull) SetDependencyGraphEnabledForNewRepositories(value *bool)() { m.dependency_graph_enabled_for_new_repositories = value } @@ -1542,7 +1558,8 @@ func (m *OrganizationFull) SetPublicRepos(value *int32)() { func (m *OrganizationFull) SetReposUrl(value *string)() { m.repos_url = value } -// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories and repositories transferred to thisorganization.This field is only visible to organization owners or members of a team with the security manager role. +// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: func (m *OrganizationFull) SetSecretScanningEnabledForNewRepositories(value *bool)() { m.secret_scanning_enabled_for_new_repositories = value } @@ -1554,7 +1571,8 @@ func (m *OrganizationFull) SetSecretScanningPushProtectionCustomLink(value *stri func (m *OrganizationFull) SetSecretScanningPushProtectionCustomLinkEnabled(value *bool)() { m.secret_scanning_push_protection_custom_link_enabled = value } -// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories and repositoriestransferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. +// Deprecated: func (m *OrganizationFull) SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() { m.secret_scanning_push_protection_enabled_for_new_repositories = value } diff --git a/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_enforcement.go b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_enforcement.go new file mode 100644 index 00000000..73d1b678 --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/configurations_post_request_body_enforcement.go @@ -0,0 +1,37 @@ +package configurations +import ( + "errors" +) +// The status of enforcement +type ConfigurationsPostRequestBody_enforcement int + +const ( + ENFORCED_CONFIGURATIONSPOSTREQUESTBODY_ENFORCEMENT ConfigurationsPostRequestBody_enforcement = iota + UNENFORCED_CONFIGURATIONSPOSTREQUESTBODY_ENFORCEMENT +) + +func (i ConfigurationsPostRequestBody_enforcement) String() string { + return []string{"enforced", "unenforced"}[i] +} +func ParseConfigurationsPostRequestBody_enforcement(v string) (any, error) { + result := ENFORCED_CONFIGURATIONSPOSTREQUESTBODY_ENFORCEMENT + switch v { + case "enforced": + result = ENFORCED_CONFIGURATIONSPOSTREQUESTBODY_ENFORCEMENT + case "unenforced": + result = UNENFORCED_CONFIGURATIONSPOSTREQUESTBODY_ENFORCEMENT + default: + return 0, errors.New("Unknown ConfigurationsPostRequestBody_enforcement value: " + v) + } + return &result, nil +} +func SerializeConfigurationsPostRequestBody_enforcement(values []ConfigurationsPostRequestBody_enforcement) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConfigurationsPostRequestBody_enforcement) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_enforcement.go b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_enforcement.go new file mode 100644 index 00000000..8240acff --- /dev/null +++ b/pkg/github/orgs/item/codesecurity/configurations/item/with_configuration_patch_request_body_enforcement.go @@ -0,0 +1,37 @@ +package item +import ( + "errors" +) +// The status of enforcement +type WithConfiguration_PatchRequestBody_enforcement int + +const ( + ENFORCED_WITHCONFIGURATION_PATCHREQUESTBODY_ENFORCEMENT WithConfiguration_PatchRequestBody_enforcement = iota + UNENFORCED_WITHCONFIGURATION_PATCHREQUESTBODY_ENFORCEMENT +) + +func (i WithConfiguration_PatchRequestBody_enforcement) String() string { + return []string{"enforced", "unenforced"}[i] +} +func ParseWithConfiguration_PatchRequestBody_enforcement(v string) (any, error) { + result := ENFORCED_WITHCONFIGURATION_PATCHREQUESTBODY_ENFORCEMENT + switch v { + case "enforced": + result = ENFORCED_WITHCONFIGURATION_PATCHREQUESTBODY_ENFORCEMENT + case "unenforced": + result = UNENFORCED_WITHCONFIGURATION_PATCHREQUESTBODY_ENFORCEMENT + default: + return 0, errors.New("Unknown WithConfiguration_PatchRequestBody_enforcement value: " + v) + } + return &result, nil +} +func SerializeWithConfiguration_PatchRequestBody_enforcement(values []WithConfiguration_PatchRequestBody_enforcement) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i WithConfiguration_PatchRequestBody_enforcement) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item_code_security_configurations_detach_delete_request_body.go b/pkg/github/orgs/item_code_security_configurations_detach_delete_request_body.go new file mode 100644 index 00000000..4e8d8296 --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_detach_delete_request_body.go @@ -0,0 +1,67 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemCodeSecurityConfigurationsDetachDeleteRequestBody struct { + // An array of repository IDs to detach from configurations. + selected_repository_ids []int32 +} +// NewItemCodeSecurityConfigurationsDetachDeleteRequestBody instantiates a new ItemCodeSecurityConfigurationsDetachDeleteRequestBody and sets the default values. +func NewItemCodeSecurityConfigurationsDetachDeleteRequestBody()(*ItemCodeSecurityConfigurationsDetachDeleteRequestBody) { + m := &ItemCodeSecurityConfigurationsDetachDeleteRequestBody{ + } + return m +} +// CreateItemCodeSecurityConfigurationsDetachDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemCodeSecurityConfigurationsDetachDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCodeSecurityConfigurationsDetachDeleteRequestBody(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemCodeSecurityConfigurationsDetachDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["selected_repository_ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*int32)) + } + } + m.SetSelectedRepositoryIds(res) + } + return nil + } + return res +} +// GetSelectedRepositoryIds gets the selected_repository_ids property value. An array of repository IDs to detach from configurations. +// returns a []int32 when successful +func (m *ItemCodeSecurityConfigurationsDetachDeleteRequestBody) GetSelectedRepositoryIds()([]int32) { + return m.selected_repository_ids +} +// Serialize serializes information the current object +func (m *ItemCodeSecurityConfigurationsDetachDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetSelectedRepositoryIds() != nil { + err := writer.WriteCollectionOfInt32Values("selected_repository_ids", m.GetSelectedRepositoryIds()) + if err != nil { + return err + } + } + return nil +} +// SetSelectedRepositoryIds sets the selected_repository_ids property value. An array of repository IDs to detach from configurations. +func (m *ItemCodeSecurityConfigurationsDetachDeleteRequestBody) SetSelectedRepositoryIds(value []int32)() { + m.selected_repository_ids = value +} +type ItemCodeSecurityConfigurationsDetachDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelectedRepositoryIds()([]int32) + SetSelectedRepositoryIds(value []int32)() +} diff --git a/pkg/github/orgs/item_code_security_configurations_detach_request_builder.go b/pkg/github/orgs/item_code_security_configurations_detach_request_builder.go new file mode 100644 index 00000000..6165b63b --- /dev/null +++ b/pkg/github/orgs/item_code_security_configurations_detach_request_builder.go @@ -0,0 +1,67 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemCodeSecurityConfigurationsDetachRequestBuilder builds and executes requests for operations under \orgs\{org}\code-security\configurations\detach +type ItemCodeSecurityConfigurationsDetachRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemCodeSecurityConfigurationsDetachRequestBuilderInternal instantiates a new ItemCodeSecurityConfigurationsDetachRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsDetachRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsDetachRequestBuilder) { + m := &ItemCodeSecurityConfigurationsDetachRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/detach", pathParameters), + } + return m +} +// NewItemCodeSecurityConfigurationsDetachRequestBuilder instantiates a new ItemCodeSecurityConfigurationsDetachRequestBuilder and sets the default values. +func NewItemCodeSecurityConfigurationsDetachRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCodeSecurityConfigurationsDetachRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCodeSecurityConfigurationsDetachRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete detach code security configuration(s) from a set of repositories.Repositories will retain their settings but will no longer be associated with the configuration.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 409 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/code-security/configurations#detach-configurations-from-repositories +func (m *ItemCodeSecurityConfigurationsDetachRequestBuilder) Delete(ctx context.Context, body ItemCodeSecurityConfigurationsDetachDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "409": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToDeleteRequestInformation detach code security configuration(s) from a set of repositories.Repositories will retain their settings but will no longer be associated with the configuration.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. +// returns a *RequestInformation when successful +func (m *ItemCodeSecurityConfigurationsDetachRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCodeSecurityConfigurationsDetachDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemCodeSecurityConfigurationsDetachRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsDetachRequestBuilder) WithUrl(rawUrl string)(*ItemCodeSecurityConfigurationsDetachRequestBuilder) { + return NewItemCodeSecurityConfigurationsDetachRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_code_security_configurations_request_builder.go b/pkg/github/orgs/item_code_security_configurations_request_builder.go index c29cbb00..200cdac6 100644 --- a/pkg/github/orgs/item_code_security_configurations_request_builder.go +++ b/pkg/github/orgs/item_code_security_configurations_request_builder.go @@ -51,6 +51,11 @@ func NewItemCodeSecurityConfigurationsRequestBuilder(rawUrl string, requestAdapt func (m *ItemCodeSecurityConfigurationsRequestBuilder) Defaults()(*ItemCodeSecurityConfigurationsDefaultsRequestBuilder) { return NewItemCodeSecurityConfigurationsDefaultsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Detach the detach property +// returns a *ItemCodeSecurityConfigurationsDetachRequestBuilder when successful +func (m *ItemCodeSecurityConfigurationsRequestBuilder) Detach()(*ItemCodeSecurityConfigurationsDetachRequestBuilder) { + return NewItemCodeSecurityConfigurationsDetachRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get lists all code security configurations available in an organization.The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. // returns a []CodeSecurityConfigurationable when successful // returns a BasicError error when the service returns a 403 status code diff --git a/pkg/github/orgs/item_with_org_patch_request_body.go b/pkg/github/orgs/item_with_org_patch_request_body.go index fdc8fee2..abbcdccd 100644 --- a/pkg/github/orgs/item_with_org_patch_request_body.go +++ b/pkg/github/orgs/item_with_org_patch_request_body.go @@ -7,7 +7,8 @@ import ( type ItemWithOrgPatchRequestBody struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // Whether GitHub Advanced Security is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // Deprecated: advanced_security_enabled_for_new_repositories *bool // Billing email address. This address is not publicized. billing_email *string @@ -15,11 +16,14 @@ type ItemWithOrgPatchRequestBody struct { blog *string // The company name. company *string - // Whether Dependabot alerts is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // Deprecated: dependabot_alerts_enabled_for_new_repositories *bool - // Whether Dependabot security updates is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // Deprecated: dependabot_security_updates_enabled_for_new_repositories *bool - // Whether dependency graph is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // Deprecated: dependency_graph_enabled_for_new_repositories *bool // The description of the company. The maximum size is 160 characters. description *string @@ -49,13 +53,15 @@ type ItemWithOrgPatchRequestBody struct { members_can_fork_private_repositories *bool // The shorthand name of the company. name *string - // Whether secret scanning is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // Deprecated: secret_scanning_enabled_for_new_repositories *bool // If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. secret_scanning_push_protection_custom_link *string // Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. secret_scanning_push_protection_custom_link_enabled *bool - // Whether secret scanning push protection is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + // Deprecated: secret_scanning_push_protection_enabled_for_new_repositories *bool // The Twitter username of the company. twitter_username *string @@ -79,7 +85,8 @@ func CreateItemWithOrgPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2 func (m *ItemWithOrgPatchRequestBody) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// GetAdvancedSecurityEnabledForNewRepositories gets the advanced_security_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: // returns a *bool when successful func (m *ItemWithOrgPatchRequestBody) GetAdvancedSecurityEnabledForNewRepositories()(*bool) { return m.advanced_security_enabled_for_new_repositories @@ -99,17 +106,20 @@ func (m *ItemWithOrgPatchRequestBody) GetBlog()(*string) { func (m *ItemWithOrgPatchRequestBody) GetCompany()(*string) { return m.company } -// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// GetDependabotAlertsEnabledForNewRepositories gets the dependabot_alerts_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: // returns a *bool when successful func (m *ItemWithOrgPatchRequestBody) GetDependabotAlertsEnabledForNewRepositories()(*bool) { return m.dependabot_alerts_enabled_for_new_repositories } -// GetDependabotSecurityUpdatesEnabledForNewRepositories gets the dependabot_security_updates_enabled_for_new_repositories property value. Whether Dependabot security updates is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// GetDependabotSecurityUpdatesEnabledForNewRepositories gets the dependabot_security_updates_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: // returns a *bool when successful func (m *ItemWithOrgPatchRequestBody) GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) { return m.dependabot_security_updates_enabled_for_new_repositories } -// GetDependencyGraphEnabledForNewRepositories gets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// GetDependencyGraphEnabledForNewRepositories gets the dependency_graph_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: // returns a *bool when successful func (m *ItemWithOrgPatchRequestBody) GetDependencyGraphEnabledForNewRepositories()(*bool) { return m.dependency_graph_enabled_for_new_repositories @@ -460,7 +470,8 @@ func (m *ItemWithOrgPatchRequestBody) GetMembersCanForkPrivateRepositories()(*bo func (m *ItemWithOrgPatchRequestBody) GetName()(*string) { return m.name } -// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// GetSecretScanningEnabledForNewRepositories gets the secret_scanning_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: // returns a *bool when successful func (m *ItemWithOrgPatchRequestBody) GetSecretScanningEnabledForNewRepositories()(*bool) { return m.secret_scanning_enabled_for_new_repositories @@ -475,7 +486,8 @@ func (m *ItemWithOrgPatchRequestBody) GetSecretScanningPushProtectionCustomLink( func (m *ItemWithOrgPatchRequestBody) GetSecretScanningPushProtectionCustomLinkEnabled()(*bool) { return m.secret_scanning_push_protection_custom_link_enabled } -// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// GetSecretScanningPushProtectionEnabledForNewRepositories gets the secret_scanning_push_protection_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: // returns a *bool when successful func (m *ItemWithOrgPatchRequestBody) GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool) { return m.secret_scanning_push_protection_enabled_for_new_repositories @@ -666,7 +678,8 @@ func (m *ItemWithOrgPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a func (m *ItemWithOrgPatchRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. Whether GitHub Advanced Security is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// SetAdvancedSecurityEnabledForNewRepositories sets the advanced_security_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: func (m *ItemWithOrgPatchRequestBody) SetAdvancedSecurityEnabledForNewRepositories(value *bool)() { m.advanced_security_enabled_for_new_repositories = value } @@ -682,15 +695,18 @@ func (m *ItemWithOrgPatchRequestBody) SetBlog(value *string)() { func (m *ItemWithOrgPatchRequestBody) SetCompany(value *string)() { m.company = value } -// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. Whether Dependabot alerts is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// SetDependabotAlertsEnabledForNewRepositories sets the dependabot_alerts_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: func (m *ItemWithOrgPatchRequestBody) SetDependabotAlertsEnabledForNewRepositories(value *bool)() { m.dependabot_alerts_enabled_for_new_repositories = value } -// SetDependabotSecurityUpdatesEnabledForNewRepositories sets the dependabot_security_updates_enabled_for_new_repositories property value. Whether Dependabot security updates is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// SetDependabotSecurityUpdatesEnabledForNewRepositories sets the dependabot_security_updates_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: func (m *ItemWithOrgPatchRequestBody) SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() { m.dependabot_security_updates_enabled_for_new_repositories = value } -// SetDependencyGraphEnabledForNewRepositories sets the dependency_graph_enabled_for_new_repositories property value. Whether dependency graph is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// SetDependencyGraphEnabledForNewRepositories sets the dependency_graph_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: func (m *ItemWithOrgPatchRequestBody) SetDependencyGraphEnabledForNewRepositories(value *bool)() { m.dependency_graph_enabled_for_new_repositories = value } @@ -750,7 +766,8 @@ func (m *ItemWithOrgPatchRequestBody) SetMembersCanForkPrivateRepositories(value func (m *ItemWithOrgPatchRequestBody) SetName(value *string)() { m.name = value } -// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. Whether secret scanning is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// SetSecretScanningEnabledForNewRepositories sets the secret_scanning_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: func (m *ItemWithOrgPatchRequestBody) SetSecretScanningEnabledForNewRepositories(value *bool)() { m.secret_scanning_enabled_for_new_repositories = value } @@ -762,7 +779,8 @@ func (m *ItemWithOrgPatchRequestBody) SetSecretScanningPushProtectionCustomLink( func (m *ItemWithOrgPatchRequestBody) SetSecretScanningPushProtectionCustomLinkEnabled(value *bool)() { m.secret_scanning_push_protection_custom_link_enabled = value } -// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. Whether secret scanning push protection is automatically enabled for new repositories.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// SetSecretScanningPushProtectionEnabledForNewRepositories sets the secret_scanning_push_protection_enabled_for_new_repositories property value. **Deprecated.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. +// Deprecated: func (m *ItemWithOrgPatchRequestBody) SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)() { m.secret_scanning_push_protection_enabled_for_new_repositories = value } diff --git a/pkg/github/orgs/with_org_item_request_builder.go b/pkg/github/orgs/with_org_item_request_builder.go index 85556863..d5f9e689 100644 --- a/pkg/github/orgs/with_org_item_request_builder.go +++ b/pkg/github/orgs/with_org_item_request_builder.go @@ -115,7 +115,7 @@ func (m *WithOrgItemRequestBuilder) Events()(*ItemEventsRequestBuilder) { func (m *WithOrgItemRequestBuilder) Failed_invitations()(*ItemFailed_invitationsRequestBuilder) { return NewItemFailed_invitationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. +// Get gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. // returns a OrganizationFullable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -203,7 +203,7 @@ func (m *WithOrgItemRequestBuilder) Outside_collaborators()(*ItemOutside_collabo func (m *WithOrgItemRequestBuilder) Packages()(*ItemPackagesRequestBuilder) { return NewItemPackagesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).Updates the organization's profile and member privileges.With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// Patch **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).**Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/).Updates the organization's profile and member privileges.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. // returns a OrganizationFullable when successful // returns a BasicError error when the service returns a 409 status code // [API method documentation] @@ -294,7 +294,7 @@ func (m *WithOrgItemRequestBuilder) ToDeleteRequestInformation(ctx context.Conte requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. +// ToGetRequestInformation gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).To see the full details about an organization, the authenticated user must be an organization owner.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. // returns a *RequestInformation when successful func (m *WithOrgItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -302,7 +302,7 @@ func (m *WithOrgItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).Updates the organization's profile and member privileges.With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration:- advanced_security_enabled_for_new_repositories- dependabot_alerts_enabled_for_new_repositories- dependabot_security_updates_enabled_for_new_repositories- dependency_graph_enabled_for_new_repositories- secret_scanning_enabled_for_new_repositories- secret_scanning_push_protection_enabled_for_new_repositoriesFor more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)."The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. +// ToPatchRequestInformation **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).**Parameter Deprecation Notice:** Code security product enablement for new repositories through the organization API is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/).Updates the organization's profile and member privileges.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. // returns a *RequestInformation when successful func (m *WithOrgItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithOrgPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)