diff --git a/github/octokit/kiota-lock.json b/github/octokit/kiota-lock.json index 02372af7..797d3cf5 100644 --- a/github/octokit/kiota-lock.json +++ b/github/octokit/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "E685E9EDE7DA3604D00809BFEB3E1F25E7647029BCA527A50F7E21438E7AC1B2CF702369E7112041512476291B7B5389DC2F0F975A507ECDB0BC3C43DFDDFA8A", + "descriptionHash": "29017D664EE04E643751B17C52A1C5F046ABEDC94E4381BA0842CD27900EED33AB6951C411F9E0A9BDF48632A3A483155884C7AF337B6A823CC1BA10304DD7A5", "descriptionLocation": "../../../source-generator/schemas/downloaded.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.8.2", diff --git a/github/octokit/models/api_overview_domains.go b/github/octokit/models/api_overview_domains.go index 918c6d8e..747c2f34 100644 --- a/github/octokit/models/api_overview_domains.go +++ b/github/octokit/models/api_overview_domains.go @@ -6,6 +6,8 @@ import ( // ApiOverview_domains type ApiOverview_domains struct { + // The actions property + actions []string // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any // The codespaces property @@ -28,6 +30,10 @@ func NewApiOverview_domains()(*ApiOverview_domains) { func CreateApiOverview_domainsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewApiOverview_domains(), nil } +// GetActions gets the actions property value. The actions property +func (m *ApiOverview_domains) GetActions()([]string) { + return m.actions +} // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. func (m *ApiOverview_domains) GetAdditionalData()(map[string]any) { return m.additionalData @@ -43,6 +49,22 @@ func (m *ApiOverview_domains) GetCopilot()([]string) { // GetFieldDeserializers the deserialization information for the current model func (m *ApiOverview_domains) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetActions(res) + } + return nil + } res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") if err != nil { @@ -119,6 +141,12 @@ func (m *ApiOverview_domains) GetWebsite()([]string) { } // Serialize serializes information the current object func (m *ApiOverview_domains) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActions() != nil { + err := writer.WriteCollectionOfStringValues("actions", m.GetActions()) + if err != nil { + return err + } + } if m.GetCodespaces() != nil { err := writer.WriteCollectionOfStringValues("codespaces", m.GetCodespaces()) if err != nil { @@ -151,6 +179,10 @@ func (m *ApiOverview_domains) Serialize(writer i878a80d2330e89d26896388a3f487eef } return nil } +// SetActions sets the actions property value. The actions property +func (m *ApiOverview_domains) SetActions(value []string)() { + m.actions = value +} // SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. func (m *ApiOverview_domains) SetAdditionalData(value map[string]any)() { m.additionalData = value @@ -175,10 +207,12 @@ func (m *ApiOverview_domains) SetWebsite(value []string)() { type ApiOverview_domainsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]string) GetCodespaces()([]string) GetCopilot()([]string) GetPackages()([]string) GetWebsite()([]string) + SetActions(value []string)() SetCodespaces(value []string)() SetCopilot(value []string)() SetPackages(value []string)() diff --git a/github/octokit/models/app_permissions.go b/github/octokit/models/app_permissions.go index 995859c0..3ac3a591 100644 --- a/github/octokit/models/app_permissions.go +++ b/github/octokit/models/app_permissions.go @@ -30,9 +30,13 @@ type AppPermissions struct { organization_administration *AppPermissions_organization_administration // The level of permission to grant the access token to view and manage announcement banners for an organization. organization_announcement_banners *AppPermissions_organization_announcement_banners + // The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. + organization_copilot_seat_management *AppPermissions_organization_copilot_seat_management + // The level of permission to grant the access token for custom organization roles management. + organization_custom_org_roles *AppPermissions_organization_custom_org_roles // The level of permission to grant the access token for custom property management. organization_custom_properties *AppPermissions_organization_custom_properties - // The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. + // The level of permission to grant the access token for custom repository roles management. organization_custom_roles *AppPermissions_organization_custom_roles // The level of permission to grant the access token to manage the post-receive hooks for an organization. organization_hooks *AppPermissions_organization_hooks @@ -58,6 +62,8 @@ type AppPermissions struct { pages *AppPermissions_pages // The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. pull_requests *AppPermissions_pull_requests + // The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. + repository_custom_properties *AppPermissions_repository_custom_properties // The level of permission to grant the access token to manage the post-receive hooks for a repository. repository_hooks *AppPermissions_repository_hooks // The level of permission to grant the access token to manage repository projects, columns, and cards. @@ -231,6 +237,26 @@ func (m *AppPermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["organization_copilot_seat_management"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_copilot_seat_management) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationCopilotSeatManagement(val.(*AppPermissions_organization_copilot_seat_management)) + } + return nil + } + res["organization_custom_org_roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_organization_custom_org_roles) + if err != nil { + return err + } + if val != nil { + m.SetOrganizationCustomOrgRoles(val.(*AppPermissions_organization_custom_org_roles)) + } + return nil + } res["organization_custom_properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseAppPermissions_organization_custom_properties) if err != nil { @@ -371,6 +397,16 @@ func (m *AppPermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["repository_custom_properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppPermissions_repository_custom_properties) + if err != nil { + return err + } + if val != nil { + m.SetRepositoryCustomProperties(val.(*AppPermissions_repository_custom_properties)) + } + return nil + } res["repository_hooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseAppPermissions_repository_hooks) if err != nil { @@ -493,11 +529,19 @@ func (m *AppPermissions) GetOrganizationAdministration()(*AppPermissions_organiz func (m *AppPermissions) GetOrganizationAnnouncementBanners()(*AppPermissions_organization_announcement_banners) { return m.organization_announcement_banners } +// GetOrganizationCopilotSeatManagement gets the organization_copilot_seat_management property value. The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. +func (m *AppPermissions) GetOrganizationCopilotSeatManagement()(*AppPermissions_organization_copilot_seat_management) { + return m.organization_copilot_seat_management +} +// GetOrganizationCustomOrgRoles gets the organization_custom_org_roles property value. The level of permission to grant the access token for custom organization roles management. +func (m *AppPermissions) GetOrganizationCustomOrgRoles()(*AppPermissions_organization_custom_org_roles) { + return m.organization_custom_org_roles +} // GetOrganizationCustomProperties gets the organization_custom_properties property value. The level of permission to grant the access token for custom property management. func (m *AppPermissions) GetOrganizationCustomProperties()(*AppPermissions_organization_custom_properties) { return m.organization_custom_properties } -// GetOrganizationCustomRoles gets the organization_custom_roles property value. The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. +// GetOrganizationCustomRoles gets the organization_custom_roles property value. The level of permission to grant the access token for custom repository roles management. func (m *AppPermissions) GetOrganizationCustomRoles()(*AppPermissions_organization_custom_roles) { return m.organization_custom_roles } @@ -549,6 +593,10 @@ func (m *AppPermissions) GetPages()(*AppPermissions_pages) { func (m *AppPermissions) GetPullRequests()(*AppPermissions_pull_requests) { return m.pull_requests } +// GetRepositoryCustomProperties gets the repository_custom_properties property value. The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. +func (m *AppPermissions) GetRepositoryCustomProperties()(*AppPermissions_repository_custom_properties) { + return m.repository_custom_properties +} // GetRepositoryHooks gets the repository_hooks property value. The level of permission to grant the access token to manage the post-receive hooks for a repository. func (m *AppPermissions) GetRepositoryHooks()(*AppPermissions_repository_hooks) { return m.repository_hooks @@ -668,6 +716,20 @@ func (m *AppPermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + if m.GetOrganizationCopilotSeatManagement() != nil { + cast := (*m.GetOrganizationCopilotSeatManagement()).String() + err := writer.WriteStringValue("organization_copilot_seat_management", &cast) + if err != nil { + return err + } + } + if m.GetOrganizationCustomOrgRoles() != nil { + cast := (*m.GetOrganizationCustomOrgRoles()).String() + err := writer.WriteStringValue("organization_custom_org_roles", &cast) + if err != nil { + return err + } + } if m.GetOrganizationCustomProperties() != nil { cast := (*m.GetOrganizationCustomProperties()).String() err := writer.WriteStringValue("organization_custom_properties", &cast) @@ -766,6 +828,13 @@ func (m *AppPermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + if m.GetRepositoryCustomProperties() != nil { + cast := (*m.GetRepositoryCustomProperties()).String() + err := writer.WriteStringValue("repository_custom_properties", &cast) + if err != nil { + return err + } + } if m.GetRepositoryHooks() != nil { cast := (*m.GetRepositoryHooks()).String() err := writer.WriteStringValue("repository_hooks", &cast) @@ -892,11 +961,19 @@ func (m *AppPermissions) SetOrganizationAdministration(value *AppPermissions_org func (m *AppPermissions) SetOrganizationAnnouncementBanners(value *AppPermissions_organization_announcement_banners)() { m.organization_announcement_banners = value } +// SetOrganizationCopilotSeatManagement sets the organization_copilot_seat_management property value. The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. +func (m *AppPermissions) SetOrganizationCopilotSeatManagement(value *AppPermissions_organization_copilot_seat_management)() { + m.organization_copilot_seat_management = value +} +// SetOrganizationCustomOrgRoles sets the organization_custom_org_roles property value. The level of permission to grant the access token for custom organization roles management. +func (m *AppPermissions) SetOrganizationCustomOrgRoles(value *AppPermissions_organization_custom_org_roles)() { + m.organization_custom_org_roles = value +} // SetOrganizationCustomProperties sets the organization_custom_properties property value. The level of permission to grant the access token for custom property management. func (m *AppPermissions) SetOrganizationCustomProperties(value *AppPermissions_organization_custom_properties)() { m.organization_custom_properties = value } -// SetOrganizationCustomRoles sets the organization_custom_roles property value. The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. +// SetOrganizationCustomRoles sets the organization_custom_roles property value. The level of permission to grant the access token for custom repository roles management. func (m *AppPermissions) SetOrganizationCustomRoles(value *AppPermissions_organization_custom_roles)() { m.organization_custom_roles = value } @@ -948,6 +1025,10 @@ func (m *AppPermissions) SetPages(value *AppPermissions_pages)() { func (m *AppPermissions) SetPullRequests(value *AppPermissions_pull_requests)() { m.pull_requests = value } +// SetRepositoryCustomProperties sets the repository_custom_properties property value. The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. +func (m *AppPermissions) SetRepositoryCustomProperties(value *AppPermissions_repository_custom_properties)() { + m.repository_custom_properties = value +} // SetRepositoryHooks sets the repository_hooks property value. The level of permission to grant the access token to manage the post-receive hooks for a repository. func (m *AppPermissions) SetRepositoryHooks(value *AppPermissions_repository_hooks)() { m.repository_hooks = value @@ -1003,6 +1084,8 @@ type AppPermissionsable interface { GetMetadata()(*AppPermissions_metadata) GetOrganizationAdministration()(*AppPermissions_organization_administration) GetOrganizationAnnouncementBanners()(*AppPermissions_organization_announcement_banners) + GetOrganizationCopilotSeatManagement()(*AppPermissions_organization_copilot_seat_management) + GetOrganizationCustomOrgRoles()(*AppPermissions_organization_custom_org_roles) GetOrganizationCustomProperties()(*AppPermissions_organization_custom_properties) GetOrganizationCustomRoles()(*AppPermissions_organization_custom_roles) GetOrganizationHooks()(*AppPermissions_organization_hooks) @@ -1017,6 +1100,7 @@ type AppPermissionsable interface { GetPackages()(*AppPermissions_packages) GetPages()(*AppPermissions_pages) GetPullRequests()(*AppPermissions_pull_requests) + GetRepositoryCustomProperties()(*AppPermissions_repository_custom_properties) GetRepositoryHooks()(*AppPermissions_repository_hooks) GetRepositoryProjects()(*AppPermissions_repository_projects) GetSecrets()(*AppPermissions_secrets) @@ -1038,6 +1122,8 @@ type AppPermissionsable interface { SetMetadata(value *AppPermissions_metadata)() SetOrganizationAdministration(value *AppPermissions_organization_administration)() SetOrganizationAnnouncementBanners(value *AppPermissions_organization_announcement_banners)() + SetOrganizationCopilotSeatManagement(value *AppPermissions_organization_copilot_seat_management)() + SetOrganizationCustomOrgRoles(value *AppPermissions_organization_custom_org_roles)() SetOrganizationCustomProperties(value *AppPermissions_organization_custom_properties)() SetOrganizationCustomRoles(value *AppPermissions_organization_custom_roles)() SetOrganizationHooks(value *AppPermissions_organization_hooks)() @@ -1052,6 +1138,7 @@ type AppPermissionsable interface { SetPackages(value *AppPermissions_packages)() SetPages(value *AppPermissions_pages)() SetPullRequests(value *AppPermissions_pull_requests)() + SetRepositoryCustomProperties(value *AppPermissions_repository_custom_properties)() SetRepositoryHooks(value *AppPermissions_repository_hooks)() SetRepositoryProjects(value *AppPermissions_repository_projects)() SetSecrets(value *AppPermissions_secrets)() diff --git a/github/octokit/models/app_permissions_organization_copilot_seat_management.go b/github/octokit/models/app_permissions_organization_copilot_seat_management.go new file mode 100644 index 00000000..acc122be --- /dev/null +++ b/github/octokit/models/app_permissions_organization_copilot_seat_management.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. +type AppPermissions_organization_copilot_seat_management int + +const ( + WRITE_APPPERMISSIONS_ORGANIZATION_COPILOT_SEAT_MANAGEMENT AppPermissions_organization_copilot_seat_management = iota +) + +func (i AppPermissions_organization_copilot_seat_management) String() string { + return []string{"write"}[i] +} +func ParseAppPermissions_organization_copilot_seat_management(v string) (any, error) { + result := WRITE_APPPERMISSIONS_ORGANIZATION_COPILOT_SEAT_MANAGEMENT + switch v { + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_COPILOT_SEAT_MANAGEMENT + default: + return 0, errors.New("Unknown AppPermissions_organization_copilot_seat_management value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_copilot_seat_management(values []AppPermissions_organization_copilot_seat_management) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_copilot_seat_management) isMultiValue() bool { + return false +} diff --git a/github/octokit/models/app_permissions_organization_custom_org_roles.go b/github/octokit/models/app_permissions_organization_custom_org_roles.go new file mode 100644 index 00000000..146db921 --- /dev/null +++ b/github/octokit/models/app_permissions_organization_custom_org_roles.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token for custom organization roles management. +type AppPermissions_organization_custom_org_roles int + +const ( + READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES AppPermissions_organization_custom_org_roles = iota + WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES +) + +func (i AppPermissions_organization_custom_org_roles) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_organization_custom_org_roles(v string) (any, error) { + result := READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES + switch v { + case "read": + result = READ_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES + case "write": + result = WRITE_APPPERMISSIONS_ORGANIZATION_CUSTOM_ORG_ROLES + default: + return 0, errors.New("Unknown AppPermissions_organization_custom_org_roles value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_organization_custom_org_roles(values []AppPermissions_organization_custom_org_roles) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_organization_custom_org_roles) isMultiValue() bool { + return false +} diff --git a/github/octokit/models/app_permissions_organization_custom_roles.go b/github/octokit/models/app_permissions_organization_custom_roles.go index 2c41e9da..3f121939 100644 --- a/github/octokit/models/app_permissions_organization_custom_roles.go +++ b/github/octokit/models/app_permissions_organization_custom_roles.go @@ -2,7 +2,7 @@ package models import ( "errors" ) -// The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. +// The level of permission to grant the access token for custom repository roles management. type AppPermissions_organization_custom_roles int const ( diff --git a/github/octokit/models/app_permissions_repository_custom_properties.go b/github/octokit/models/app_permissions_repository_custom_properties.go new file mode 100644 index 00000000..9f408afb --- /dev/null +++ b/github/octokit/models/app_permissions_repository_custom_properties.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. +type AppPermissions_repository_custom_properties int + +const ( + READ_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES AppPermissions_repository_custom_properties = iota + WRITE_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES +) + +func (i AppPermissions_repository_custom_properties) String() string { + return []string{"read", "write"}[i] +} +func ParseAppPermissions_repository_custom_properties(v string) (any, error) { + result := READ_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES + switch v { + case "read": + result = READ_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES + case "write": + result = WRITE_APPPERMISSIONS_REPOSITORY_CUSTOM_PROPERTIES + default: + return 0, errors.New("Unknown AppPermissions_repository_custom_properties value: " + v) + } + return &result, nil +} +func SerializeAppPermissions_repository_custom_properties(values []AppPermissions_repository_custom_properties) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppPermissions_repository_custom_properties) isMultiValue() bool { + return false +} diff --git a/github/octokit/models/full_repository.go b/github/octokit/models/full_repository.go index 58c7bd66..993b3944 100644 --- a/github/octokit/models/full_repository.go +++ b/github/octokit/models/full_repository.go @@ -163,7 +163,7 @@ type FullRepository struct { releases_url *string // The security_and_analysis property security_and_analysis SecurityAndAnalysisable - // The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. size *int32 // A repository on GitHub. source Repositoryable @@ -1568,7 +1568,7 @@ func (m *FullRepository) GetReleasesUrl()(*string) { func (m *FullRepository) GetSecurityAndAnalysis()(SecurityAndAnalysisable) { return m.security_and_analysis } -// GetSize gets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *FullRepository) GetSize()(*int32) { return m.size } @@ -2606,7 +2606,7 @@ func (m *FullRepository) SetReleasesUrl(value *string)() { func (m *FullRepository) SetSecurityAndAnalysis(value SecurityAndAnalysisable)() { m.security_and_analysis = value } -// SetSize sets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *FullRepository) SetSize(value *int32)() { m.size = value } diff --git a/github/octokit/models/minimal_repository.go b/github/octokit/models/minimal_repository.go index c39d4884..7a090367 100644 --- a/github/octokit/models/minimal_repository.go +++ b/github/octokit/models/minimal_repository.go @@ -143,7 +143,7 @@ type MinimalRepository struct { role_name *string // The security_and_analysis property security_and_analysis SecurityAndAnalysisable - // The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. size *int32 // The ssh_url property ssh_url *string @@ -1348,7 +1348,7 @@ func (m *MinimalRepository) GetRoleName()(*string) { func (m *MinimalRepository) GetSecurityAndAnalysis()(SecurityAndAnalysisable) { return m.security_and_analysis } -// GetSize gets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *MinimalRepository) GetSize()(*int32) { return m.size } @@ -2232,7 +2232,7 @@ func (m *MinimalRepository) SetRoleName(value *string)() { func (m *MinimalRepository) SetSecurityAndAnalysis(value SecurityAndAnalysisable)() { m.security_and_analysis = value } -// SetSize sets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *MinimalRepository) SetSize(value *int32)() { m.size = value } diff --git a/github/octokit/models/nullable_minimal_repository.go b/github/octokit/models/nullable_minimal_repository.go index afbabfe8..0730a984 100644 --- a/github/octokit/models/nullable_minimal_repository.go +++ b/github/octokit/models/nullable_minimal_repository.go @@ -143,7 +143,7 @@ type NullableMinimalRepository struct { role_name *string // The security_and_analysis property security_and_analysis SecurityAndAnalysisable - // The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. size *int32 // The ssh_url property ssh_url *string @@ -1348,7 +1348,7 @@ func (m *NullableMinimalRepository) GetRoleName()(*string) { func (m *NullableMinimalRepository) GetSecurityAndAnalysis()(SecurityAndAnalysisable) { return m.security_and_analysis } -// GetSize gets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *NullableMinimalRepository) GetSize()(*int32) { return m.size } @@ -2232,7 +2232,7 @@ func (m *NullableMinimalRepository) SetRoleName(value *string)() { func (m *NullableMinimalRepository) SetSecurityAndAnalysis(value SecurityAndAnalysisable)() { m.security_and_analysis = value } -// SetSize sets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *NullableMinimalRepository) SetSize(value *int32)() { m.size = value } diff --git a/github/octokit/models/nullable_repository.go b/github/octokit/models/nullable_repository.go index 39bfc35a..d9144a9a 100644 --- a/github/octokit/models/nullable_repository.go +++ b/github/octokit/models/nullable_repository.go @@ -158,7 +158,7 @@ type NullableRepository struct { pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The releases_url property releases_url *string - // The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. size *int32 // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. squash_merge_commit_message *NullableRepository_squash_merge_commit_message @@ -1525,7 +1525,7 @@ func (m *NullableRepository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f func (m *NullableRepository) GetReleasesUrl()(*string) { return m.releases_url } -// GetSize gets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *NullableRepository) GetSize()(*int32) { return m.size } @@ -2535,7 +2535,7 @@ func (m *NullableRepository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a func (m *NullableRepository) SetReleasesUrl(value *string)() { m.releases_url = value } -// SetSize sets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *NullableRepository) SetSize(value *int32)() { m.size = value } diff --git a/github/octokit/models/private_vulnerability_report_create.go b/github/octokit/models/private_vulnerability_report_create.go index 05f5cda5..eb25d0e8 100644 --- a/github/octokit/models/private_vulnerability_report_create.go +++ b/github/octokit/models/private_vulnerability_report_create.go @@ -14,6 +14,8 @@ type PrivateVulnerabilityReportCreate struct { description *string // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. severity *PrivateVulnerabilityReportCreate_severity + // Whether to create a temporary private fork of the repository to collaborate on a fix. + start_private_fork *bool // A short summary of the advisory. summary *string // An array of products affected by the vulnerability detailed in a repository security advisory. @@ -90,6 +92,16 @@ func (m *PrivateVulnerabilityReportCreate) GetFieldDeserializers()(map[string]fu } return nil } + res["start_private_fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStartPrivateFork(val) + } + return nil + } res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -122,6 +134,10 @@ func (m *PrivateVulnerabilityReportCreate) GetFieldDeserializers()(map[string]fu func (m *PrivateVulnerabilityReportCreate) GetSeverity()(*PrivateVulnerabilityReportCreate_severity) { return m.severity } +// GetStartPrivateFork gets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +func (m *PrivateVulnerabilityReportCreate) GetStartPrivateFork()(*bool) { + return m.start_private_fork +} // GetSummary gets the summary property value. A short summary of the advisory. func (m *PrivateVulnerabilityReportCreate) GetSummary()(*string) { return m.summary @@ -157,6 +173,12 @@ func (m *PrivateVulnerabilityReportCreate) Serialize(writer i878a80d2330e89d2689 return err } } + { + err := writer.WriteBoolValue("start_private_fork", m.GetStartPrivateFork()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("summary", m.GetSummary()) if err != nil { @@ -193,6 +215,10 @@ func (m *PrivateVulnerabilityReportCreate) SetDescription(value *string)() { func (m *PrivateVulnerabilityReportCreate) SetSeverity(value *PrivateVulnerabilityReportCreate_severity)() { m.severity = value } +// SetStartPrivateFork sets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +func (m *PrivateVulnerabilityReportCreate) SetStartPrivateFork(value *bool)() { + m.start_private_fork = value +} // SetSummary sets the summary property value. A short summary of the advisory. func (m *PrivateVulnerabilityReportCreate) SetSummary(value *string)() { m.summary = value @@ -208,12 +234,14 @@ type PrivateVulnerabilityReportCreateable interface { GetCweIds()([]string) GetDescription()(*string) GetSeverity()(*PrivateVulnerabilityReportCreate_severity) + GetStartPrivateFork()(*bool) GetSummary()(*string) GetVulnerabilities()([]PrivateVulnerabilityReportCreate_vulnerabilitiesable) SetCvssVectorString(value *string)() SetCweIds(value []string)() SetDescription(value *string)() SetSeverity(value *PrivateVulnerabilityReportCreate_severity)() + SetStartPrivateFork(value *bool)() SetSummary(value *string)() SetVulnerabilities(value []PrivateVulnerabilityReportCreate_vulnerabilitiesable)() } diff --git a/github/octokit/models/repository.go b/github/octokit/models/repository.go index a37d5356..c008c022 100644 --- a/github/octokit/models/repository.go +++ b/github/octokit/models/repository.go @@ -158,7 +158,7 @@ type Repository struct { pushed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The releases_url property releases_url *string - // The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + // The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. size *int32 // The default value for a squash merge commit message:- `PR_BODY` - default to the pull request's body.- `COMMIT_MESSAGES` - default to the branch's commit messages.- `BLANK` - default to a blank commit message. squash_merge_commit_message *Repository_squash_merge_commit_message @@ -1525,7 +1525,7 @@ func (m *Repository) GetPushedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a163 func (m *Repository) GetReleasesUrl()(*string) { return m.releases_url } -// GetSize gets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// GetSize gets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *Repository) GetSize()(*int32) { return m.size } @@ -2535,7 +2535,7 @@ func (m *Repository) SetPushedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077 func (m *Repository) SetReleasesUrl(value *string)() { m.releases_url = value } -// SetSize sets the size property value. The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. +// SetSize sets the size property value. The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. func (m *Repository) SetSize(value *int32)() { m.size = value } diff --git a/github/octokit/models/repository_advisory_create.go b/github/octokit/models/repository_advisory_create.go index 8ede3435..2be4f9f1 100644 --- a/github/octokit/models/repository_advisory_create.go +++ b/github/octokit/models/repository_advisory_create.go @@ -18,6 +18,8 @@ type RepositoryAdvisoryCreate struct { description *string // The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. severity *RepositoryAdvisoryCreate_severity + // Whether to create a temporary private fork of the repository to collaborate on a fix. + start_private_fork *bool // A short summary of the advisory. summary *string // A product affected by the vulnerability detailed in a repository security advisory. @@ -128,6 +130,16 @@ func (m *RepositoryAdvisoryCreate) GetFieldDeserializers()(map[string]func(i878a } return nil } + res["start_private_fork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStartPrivateFork(val) + } + return nil + } res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -160,6 +172,10 @@ func (m *RepositoryAdvisoryCreate) GetFieldDeserializers()(map[string]func(i878a func (m *RepositoryAdvisoryCreate) GetSeverity()(*RepositoryAdvisoryCreate_severity) { return m.severity } +// GetStartPrivateFork gets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +func (m *RepositoryAdvisoryCreate) GetStartPrivateFork()(*bool) { + return m.start_private_fork +} // GetSummary gets the summary property value. A short summary of the advisory. func (m *RepositoryAdvisoryCreate) GetSummary()(*string) { return m.summary @@ -213,6 +229,12 @@ func (m *RepositoryAdvisoryCreate) Serialize(writer i878a80d2330e89d26896388a3f4 return err } } + { + err := writer.WriteBoolValue("start_private_fork", m.GetStartPrivateFork()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("summary", m.GetSummary()) if err != nil { @@ -257,6 +279,10 @@ func (m *RepositoryAdvisoryCreate) SetDescription(value *string)() { func (m *RepositoryAdvisoryCreate) SetSeverity(value *RepositoryAdvisoryCreate_severity)() { m.severity = value } +// SetStartPrivateFork sets the start_private_fork property value. Whether to create a temporary private fork of the repository to collaborate on a fix. +func (m *RepositoryAdvisoryCreate) SetStartPrivateFork(value *bool)() { + m.start_private_fork = value +} // SetSummary sets the summary property value. A short summary of the advisory. func (m *RepositoryAdvisoryCreate) SetSummary(value *string)() { m.summary = value @@ -274,6 +300,7 @@ type RepositoryAdvisoryCreateable interface { GetCweIds()([]string) GetDescription()(*string) GetSeverity()(*RepositoryAdvisoryCreate_severity) + GetStartPrivateFork()(*bool) GetSummary()(*string) GetVulnerabilities()([]RepositoryAdvisoryCreate_vulnerabilitiesable) SetCredits(value []RepositoryAdvisoryCreate_creditsable)() @@ -282,6 +309,7 @@ type RepositoryAdvisoryCreateable interface { SetCweIds(value []string)() SetDescription(value *string)() SetSeverity(value *RepositoryAdvisoryCreate_severity)() + SetStartPrivateFork(value *bool)() SetSummary(value *string)() SetVulnerabilities(value []RepositoryAdvisoryCreate_vulnerabilitiesable)() } diff --git a/github/octokit/models/secret_scanning_location.go b/github/octokit/models/secret_scanning_location.go index c9f500bd..52d6b61e 100644 --- a/github/octokit/models/secret_scanning_location.go +++ b/github/octokit/models/secret_scanning_location.go @@ -10,19 +10,35 @@ type SecretScanningLocation struct { additionalData map[string]any // The details property details SecretScanningLocation_SecretScanningLocation_detailsable - // The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. + // The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. typeEscaped *SecretScanningLocation_type } -// SecretScanningLocation_SecretScanningLocation_details composed type wrapper for classes secretScanningLocationCommit, secretScanningLocationIssueBody, secretScanningLocationIssueComment, secretScanningLocationIssueTitle +// SecretScanningLocation_SecretScanningLocation_details composed type wrapper for classes secretScanningLocationCommit, secretScanningLocationDiscussionBody, secretScanningLocationDiscussionComment, secretScanningLocationDiscussionTitle, secretScanningLocationIssueBody, secretScanningLocationIssueComment, secretScanningLocationIssueTitle, secretScanningLocationPullRequestBody, secretScanningLocationPullRequestComment, secretScanningLocationPullRequestReview, secretScanningLocationPullRequestReviewComment, secretScanningLocationPullRequestTitle type SecretScanningLocation_SecretScanningLocation_details struct { // Composed type representation for type secretScanningLocationCommit secretScanningLocationCommit SecretScanningLocationCommitable + // Composed type representation for type secretScanningLocationDiscussionBody + secretScanningLocationDiscussionBody SecretScanningLocationDiscussionBodyable + // Composed type representation for type secretScanningLocationDiscussionComment + secretScanningLocationDiscussionComment SecretScanningLocationDiscussionCommentable + // Composed type representation for type secretScanningLocationDiscussionTitle + secretScanningLocationDiscussionTitle SecretScanningLocationDiscussionTitleable // Composed type representation for type secretScanningLocationIssueBody secretScanningLocationIssueBody SecretScanningLocationIssueBodyable // Composed type representation for type secretScanningLocationIssueComment secretScanningLocationIssueComment SecretScanningLocationIssueCommentable // Composed type representation for type secretScanningLocationIssueTitle secretScanningLocationIssueTitle SecretScanningLocationIssueTitleable + // Composed type representation for type secretScanningLocationPullRequestBody + secretScanningLocationPullRequestBody SecretScanningLocationPullRequestBodyable + // Composed type representation for type secretScanningLocationPullRequestComment + secretScanningLocationPullRequestComment SecretScanningLocationPullRequestCommentable + // Composed type representation for type secretScanningLocationPullRequestReview + secretScanningLocationPullRequestReview SecretScanningLocationPullRequestReviewable + // Composed type representation for type secretScanningLocationPullRequestReviewComment + secretScanningLocationPullRequestReviewComment SecretScanningLocationPullRequestReviewCommentable + // Composed type representation for type secretScanningLocationPullRequestTitle + secretScanningLocationPullRequestTitle SecretScanningLocationPullRequestTitleable } // NewSecretScanningLocation_SecretScanningLocation_details instantiates a new secretScanningLocation_details and sets the default values. func NewSecretScanningLocation_SecretScanningLocation_details()(*SecretScanningLocation_SecretScanningLocation_details) { @@ -61,6 +77,18 @@ func (m *SecretScanningLocation_SecretScanningLocation_details) GetIsComposedTyp func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationCommit()(SecretScanningLocationCommitable) { return m.secretScanningLocationCommit } +// GetSecretScanningLocationDiscussionBody gets the secretScanningLocationDiscussionBody property value. Composed type representation for type secretScanningLocationDiscussionBody +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationDiscussionBody()(SecretScanningLocationDiscussionBodyable) { + return m.secretScanningLocationDiscussionBody +} +// GetSecretScanningLocationDiscussionComment gets the secretScanningLocationDiscussionComment property value. Composed type representation for type secretScanningLocationDiscussionComment +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationDiscussionComment()(SecretScanningLocationDiscussionCommentable) { + return m.secretScanningLocationDiscussionComment +} +// GetSecretScanningLocationDiscussionTitle gets the secretScanningLocationDiscussionTitle property value. Composed type representation for type secretScanningLocationDiscussionTitle +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationDiscussionTitle()(SecretScanningLocationDiscussionTitleable) { + return m.secretScanningLocationDiscussionTitle +} // GetSecretScanningLocationIssueBody gets the secretScanningLocationIssueBody property value. Composed type representation for type secretScanningLocationIssueBody func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationIssueBody()(SecretScanningLocationIssueBodyable) { return m.secretScanningLocationIssueBody @@ -73,6 +101,26 @@ func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScannin func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationIssueTitle()(SecretScanningLocationIssueTitleable) { return m.secretScanningLocationIssueTitle } +// GetSecretScanningLocationPullRequestBody gets the secretScanningLocationPullRequestBody property value. Composed type representation for type secretScanningLocationPullRequestBody +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestBody()(SecretScanningLocationPullRequestBodyable) { + return m.secretScanningLocationPullRequestBody +} +// GetSecretScanningLocationPullRequestComment gets the secretScanningLocationPullRequestComment property value. Composed type representation for type secretScanningLocationPullRequestComment +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestComment()(SecretScanningLocationPullRequestCommentable) { + return m.secretScanningLocationPullRequestComment +} +// GetSecretScanningLocationPullRequestReview gets the secretScanningLocationPullRequestReview property value. Composed type representation for type secretScanningLocationPullRequestReview +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestReview()(SecretScanningLocationPullRequestReviewable) { + return m.secretScanningLocationPullRequestReview +} +// GetSecretScanningLocationPullRequestReviewComment gets the secretScanningLocationPullRequestReviewComment property value. Composed type representation for type secretScanningLocationPullRequestReviewComment +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestReviewComment()(SecretScanningLocationPullRequestReviewCommentable) { + return m.secretScanningLocationPullRequestReviewComment +} +// GetSecretScanningLocationPullRequestTitle gets the secretScanningLocationPullRequestTitle property value. Composed type representation for type secretScanningLocationPullRequestTitle +func (m *SecretScanningLocation_SecretScanningLocation_details) GetSecretScanningLocationPullRequestTitle()(SecretScanningLocationPullRequestTitleable) { + return m.secretScanningLocationPullRequestTitle +} // Serialize serializes information the current object func (m *SecretScanningLocation_SecretScanningLocation_details) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetSecretScanningLocationCommit() != nil { @@ -80,6 +128,21 @@ func (m *SecretScanningLocation_SecretScanningLocation_details) Serialize(writer if err != nil { return err } + } else if m.GetSecretScanningLocationDiscussionBody() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationDiscussionBody()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationDiscussionComment() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationDiscussionComment()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationDiscussionTitle() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationDiscussionTitle()) + if err != nil { + return err + } } else if m.GetSecretScanningLocationIssueBody() != nil { err := writer.WriteObjectValue("", m.GetSecretScanningLocationIssueBody()) if err != nil { @@ -95,6 +158,31 @@ func (m *SecretScanningLocation_SecretScanningLocation_details) Serialize(writer if err != nil { return err } + } else if m.GetSecretScanningLocationPullRequestBody() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestBody()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestComment() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestComment()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestReview() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestReview()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestReviewComment() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestReviewComment()) + if err != nil { + return err + } + } else if m.GetSecretScanningLocationPullRequestTitle() != nil { + err := writer.WriteObjectValue("", m.GetSecretScanningLocationPullRequestTitle()) + if err != nil { + return err + } } return nil } @@ -102,6 +190,18 @@ func (m *SecretScanningLocation_SecretScanningLocation_details) Serialize(writer func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationCommit(value SecretScanningLocationCommitable)() { m.secretScanningLocationCommit = value } +// SetSecretScanningLocationDiscussionBody sets the secretScanningLocationDiscussionBody property value. Composed type representation for type secretScanningLocationDiscussionBody +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationDiscussionBody(value SecretScanningLocationDiscussionBodyable)() { + m.secretScanningLocationDiscussionBody = value +} +// SetSecretScanningLocationDiscussionComment sets the secretScanningLocationDiscussionComment property value. Composed type representation for type secretScanningLocationDiscussionComment +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationDiscussionComment(value SecretScanningLocationDiscussionCommentable)() { + m.secretScanningLocationDiscussionComment = value +} +// SetSecretScanningLocationDiscussionTitle sets the secretScanningLocationDiscussionTitle property value. Composed type representation for type secretScanningLocationDiscussionTitle +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationDiscussionTitle(value SecretScanningLocationDiscussionTitleable)() { + m.secretScanningLocationDiscussionTitle = value +} // SetSecretScanningLocationIssueBody sets the secretScanningLocationIssueBody property value. Composed type representation for type secretScanningLocationIssueBody func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationIssueBody(value SecretScanningLocationIssueBodyable)() { m.secretScanningLocationIssueBody = value @@ -114,17 +214,53 @@ func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScannin func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationIssueTitle(value SecretScanningLocationIssueTitleable)() { m.secretScanningLocationIssueTitle = value } +// SetSecretScanningLocationPullRequestBody sets the secretScanningLocationPullRequestBody property value. Composed type representation for type secretScanningLocationPullRequestBody +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestBody(value SecretScanningLocationPullRequestBodyable)() { + m.secretScanningLocationPullRequestBody = value +} +// SetSecretScanningLocationPullRequestComment sets the secretScanningLocationPullRequestComment property value. Composed type representation for type secretScanningLocationPullRequestComment +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestComment(value SecretScanningLocationPullRequestCommentable)() { + m.secretScanningLocationPullRequestComment = value +} +// SetSecretScanningLocationPullRequestReview sets the secretScanningLocationPullRequestReview property value. Composed type representation for type secretScanningLocationPullRequestReview +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestReview(value SecretScanningLocationPullRequestReviewable)() { + m.secretScanningLocationPullRequestReview = value +} +// SetSecretScanningLocationPullRequestReviewComment sets the secretScanningLocationPullRequestReviewComment property value. Composed type representation for type secretScanningLocationPullRequestReviewComment +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestReviewComment(value SecretScanningLocationPullRequestReviewCommentable)() { + m.secretScanningLocationPullRequestReviewComment = value +} +// SetSecretScanningLocationPullRequestTitle sets the secretScanningLocationPullRequestTitle property value. Composed type representation for type secretScanningLocationPullRequestTitle +func (m *SecretScanningLocation_SecretScanningLocation_details) SetSecretScanningLocationPullRequestTitle(value SecretScanningLocationPullRequestTitleable)() { + m.secretScanningLocationPullRequestTitle = value +} // SecretScanningLocation_SecretScanningLocation_detailsable type SecretScanningLocation_SecretScanningLocation_detailsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetSecretScanningLocationCommit()(SecretScanningLocationCommitable) + GetSecretScanningLocationDiscussionBody()(SecretScanningLocationDiscussionBodyable) + GetSecretScanningLocationDiscussionComment()(SecretScanningLocationDiscussionCommentable) + GetSecretScanningLocationDiscussionTitle()(SecretScanningLocationDiscussionTitleable) GetSecretScanningLocationIssueBody()(SecretScanningLocationIssueBodyable) GetSecretScanningLocationIssueComment()(SecretScanningLocationIssueCommentable) GetSecretScanningLocationIssueTitle()(SecretScanningLocationIssueTitleable) + GetSecretScanningLocationPullRequestBody()(SecretScanningLocationPullRequestBodyable) + GetSecretScanningLocationPullRequestComment()(SecretScanningLocationPullRequestCommentable) + GetSecretScanningLocationPullRequestReview()(SecretScanningLocationPullRequestReviewable) + GetSecretScanningLocationPullRequestReviewComment()(SecretScanningLocationPullRequestReviewCommentable) + GetSecretScanningLocationPullRequestTitle()(SecretScanningLocationPullRequestTitleable) SetSecretScanningLocationCommit(value SecretScanningLocationCommitable)() + SetSecretScanningLocationDiscussionBody(value SecretScanningLocationDiscussionBodyable)() + SetSecretScanningLocationDiscussionComment(value SecretScanningLocationDiscussionCommentable)() + SetSecretScanningLocationDiscussionTitle(value SecretScanningLocationDiscussionTitleable)() SetSecretScanningLocationIssueBody(value SecretScanningLocationIssueBodyable)() SetSecretScanningLocationIssueComment(value SecretScanningLocationIssueCommentable)() SetSecretScanningLocationIssueTitle(value SecretScanningLocationIssueTitleable)() + SetSecretScanningLocationPullRequestBody(value SecretScanningLocationPullRequestBodyable)() + SetSecretScanningLocationPullRequestComment(value SecretScanningLocationPullRequestCommentable)() + SetSecretScanningLocationPullRequestReview(value SecretScanningLocationPullRequestReviewable)() + SetSecretScanningLocationPullRequestReviewComment(value SecretScanningLocationPullRequestReviewCommentable)() + SetSecretScanningLocationPullRequestTitle(value SecretScanningLocationPullRequestTitleable)() } // NewSecretScanningLocation instantiates a new secretScanningLocation and sets the default values. func NewSecretScanningLocation()(*SecretScanningLocation) { @@ -170,7 +306,7 @@ func (m *SecretScanningLocation) GetFieldDeserializers()(map[string]func(i878a80 } return res } -// GetTypeEscaped gets the type property value. The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. +// GetTypeEscaped gets the type property value. The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. func (m *SecretScanningLocation) GetTypeEscaped()(*SecretScanningLocation_type) { return m.typeEscaped } @@ -205,7 +341,7 @@ func (m *SecretScanningLocation) SetAdditionalData(value map[string]any)() { func (m *SecretScanningLocation) SetDetails(value SecretScanningLocation_SecretScanningLocation_detailsable)() { m.details = value } -// SetTypeEscaped sets the type property value. The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. +// SetTypeEscaped sets the type property value. The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. func (m *SecretScanningLocation) SetTypeEscaped(value *SecretScanningLocation_type)() { m.typeEscaped = value } diff --git a/github/octokit/models/secret_scanning_location_discussion_body.go b/github/octokit/models/secret_scanning_location_discussion_body.go new file mode 100644 index 00000000..f2b08951 --- /dev/null +++ b/github/octokit/models/secret_scanning_location_discussion_body.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationDiscussionBody represents a 'discussion_body' secret scanning location type. This location type shows that a secret was detected in the body of a discussion. +type SecretScanningLocationDiscussionBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The URL to the discussion where the secret was detected. + discussion_body_url *string +} +// NewSecretScanningLocationDiscussionBody instantiates a new secretScanningLocationDiscussionBody and sets the default values. +func NewSecretScanningLocationDiscussionBody()(*SecretScanningLocationDiscussionBody) { + m := &SecretScanningLocationDiscussionBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationDiscussionBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationDiscussionBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationDiscussionBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationDiscussionBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiscussionBodyUrl gets the discussion_body_url property value. The URL to the discussion where the secret was detected. +func (m *SecretScanningLocationDiscussionBody) GetDiscussionBodyUrl()(*string) { + return m.discussion_body_url +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationDiscussionBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["discussion_body_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionBodyUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecretScanningLocationDiscussionBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("discussion_body_url", m.GetDiscussionBodyUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationDiscussionBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiscussionBodyUrl sets the discussion_body_url property value. The URL to the discussion where the secret was detected. +func (m *SecretScanningLocationDiscussionBody) SetDiscussionBodyUrl(value *string)() { + m.discussion_body_url = value +} +// SecretScanningLocationDiscussionBodyable +type SecretScanningLocationDiscussionBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiscussionBodyUrl()(*string) + SetDiscussionBodyUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_discussion_comment.go b/github/octokit/models/secret_scanning_location_discussion_comment.go new file mode 100644 index 00000000..338778da --- /dev/null +++ b/github/octokit/models/secret_scanning_location_discussion_comment.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationDiscussionComment represents a 'discussion_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion. +type SecretScanningLocationDiscussionComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the discussion comment where the secret was detected. + discussion_comment_url *string +} +// NewSecretScanningLocationDiscussionComment instantiates a new secretScanningLocationDiscussionComment and sets the default values. +func NewSecretScanningLocationDiscussionComment()(*SecretScanningLocationDiscussionComment) { + m := &SecretScanningLocationDiscussionComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationDiscussionCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationDiscussionCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationDiscussionComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationDiscussionComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiscussionCommentUrl gets the discussion_comment_url property value. The API URL to get the discussion comment where the secret was detected. +func (m *SecretScanningLocationDiscussionComment) GetDiscussionCommentUrl()(*string) { + return m.discussion_comment_url +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationDiscussionComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["discussion_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionCommentUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecretScanningLocationDiscussionComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("discussion_comment_url", m.GetDiscussionCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationDiscussionComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiscussionCommentUrl sets the discussion_comment_url property value. The API URL to get the discussion comment where the secret was detected. +func (m *SecretScanningLocationDiscussionComment) SetDiscussionCommentUrl(value *string)() { + m.discussion_comment_url = value +} +// SecretScanningLocationDiscussionCommentable +type SecretScanningLocationDiscussionCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiscussionCommentUrl()(*string) + SetDiscussionCommentUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_discussion_title.go b/github/octokit/models/secret_scanning_location_discussion_title.go new file mode 100644 index 00000000..b46d17f4 --- /dev/null +++ b/github/octokit/models/secret_scanning_location_discussion_title.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationDiscussionTitle represents a 'discussion_title' secret scanning location type. This location type shows that a secret was detected in the title of a discussion. +type SecretScanningLocationDiscussionTitle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The URL to the discussion where the secret was detected. + discussion_title_url *string +} +// NewSecretScanningLocationDiscussionTitle instantiates a new secretScanningLocationDiscussionTitle and sets the default values. +func NewSecretScanningLocationDiscussionTitle()(*SecretScanningLocationDiscussionTitle) { + m := &SecretScanningLocationDiscussionTitle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationDiscussionTitleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationDiscussionTitleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationDiscussionTitle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationDiscussionTitle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDiscussionTitleUrl gets the discussion_title_url property value. The URL to the discussion where the secret was detected. +func (m *SecretScanningLocationDiscussionTitle) GetDiscussionTitleUrl()(*string) { + return m.discussion_title_url +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationDiscussionTitle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["discussion_title_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscussionTitleUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecretScanningLocationDiscussionTitle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("discussion_title_url", m.GetDiscussionTitleUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationDiscussionTitle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDiscussionTitleUrl sets the discussion_title_url property value. The URL to the discussion where the secret was detected. +func (m *SecretScanningLocationDiscussionTitle) SetDiscussionTitleUrl(value *string)() { + m.discussion_title_url = value +} +// SecretScanningLocationDiscussionTitleable +type SecretScanningLocationDiscussionTitleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiscussionTitleUrl()(*string) + SetDiscussionTitleUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_pull_request_body.go b/github/octokit/models/secret_scanning_location_pull_request_body.go new file mode 100644 index 00000000..f6db5668 --- /dev/null +++ b/github/octokit/models/secret_scanning_location_pull_request_body.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestBody represents a 'pull_request_body' secret scanning location type. This location type shows that a secret was detected in the body of a pull request. +type SecretScanningLocationPullRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request where the secret was detected. + pull_request_body_url *string +} +// NewSecretScanningLocationPullRequestBody instantiates a new secretScanningLocationPullRequestBody and sets the default values. +func NewSecretScanningLocationPullRequestBody()(*SecretScanningLocationPullRequestBody) { + m := &SecretScanningLocationPullRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationPullRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationPullRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_body_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestBodyUrl(val) + } + return nil + } + return res +} +// GetPullRequestBodyUrl gets the pull_request_body_url property value. The API URL to get the pull request where the secret was detected. +func (m *SecretScanningLocationPullRequestBody) GetPullRequestBodyUrl()(*string) { + return m.pull_request_body_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_body_url", m.GetPullRequestBodyUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestBodyUrl sets the pull_request_body_url property value. The API URL to get the pull request where the secret was detected. +func (m *SecretScanningLocationPullRequestBody) SetPullRequestBodyUrl(value *string)() { + m.pull_request_body_url = value +} +// SecretScanningLocationPullRequestBodyable +type SecretScanningLocationPullRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestBodyUrl()(*string) + SetPullRequestBodyUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_pull_request_comment.go b/github/octokit/models/secret_scanning_location_pull_request_comment.go new file mode 100644 index 00000000..70da9d8b --- /dev/null +++ b/github/octokit/models/secret_scanning_location_pull_request_comment.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestComment represents a 'pull_request_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a pull request. +type SecretScanningLocationPullRequestComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request comment where the secret was detected. + pull_request_comment_url *string +} +// NewSecretScanningLocationPullRequestComment instantiates a new secretScanningLocationPullRequestComment and sets the default values. +func NewSecretScanningLocationPullRequestComment()(*SecretScanningLocationPullRequestComment) { + m := &SecretScanningLocationPullRequestComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationPullRequestCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationPullRequestComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestCommentUrl(val) + } + return nil + } + return res +} +// GetPullRequestCommentUrl gets the pull_request_comment_url property value. The API URL to get the pull request comment where the secret was detected. +func (m *SecretScanningLocationPullRequestComment) GetPullRequestCommentUrl()(*string) { + return m.pull_request_comment_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_comment_url", m.GetPullRequestCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestCommentUrl sets the pull_request_comment_url property value. The API URL to get the pull request comment where the secret was detected. +func (m *SecretScanningLocationPullRequestComment) SetPullRequestCommentUrl(value *string)() { + m.pull_request_comment_url = value +} +// SecretScanningLocationPullRequestCommentable +type SecretScanningLocationPullRequestCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestCommentUrl()(*string) + SetPullRequestCommentUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_pull_request_review.go b/github/octokit/models/secret_scanning_location_pull_request_review.go new file mode 100644 index 00000000..053c52d0 --- /dev/null +++ b/github/octokit/models/secret_scanning_location_pull_request_review.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestReview represents a 'pull_request_review' secret scanning location type. This location type shows that a secret was detected in a review on a pull request. +type SecretScanningLocationPullRequestReview struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request review where the secret was detected. + pull_request_review_url *string +} +// NewSecretScanningLocationPullRequestReview instantiates a new secretScanningLocationPullRequestReview and sets the default values. +func NewSecretScanningLocationPullRequestReview()(*SecretScanningLocationPullRequestReview) { + m := &SecretScanningLocationPullRequestReview{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestReviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationPullRequestReviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestReview(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestReview) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationPullRequestReview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_review_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestReviewUrl(val) + } + return nil + } + return res +} +// GetPullRequestReviewUrl gets the pull_request_review_url property value. The API URL to get the pull request review where the secret was detected. +func (m *SecretScanningLocationPullRequestReview) GetPullRequestReviewUrl()(*string) { + return m.pull_request_review_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestReview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_review_url", m.GetPullRequestReviewUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestReview) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestReviewUrl sets the pull_request_review_url property value. The API URL to get the pull request review where the secret was detected. +func (m *SecretScanningLocationPullRequestReview) SetPullRequestReviewUrl(value *string)() { + m.pull_request_review_url = value +} +// SecretScanningLocationPullRequestReviewable +type SecretScanningLocationPullRequestReviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestReviewUrl()(*string) + SetPullRequestReviewUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_pull_request_review_comment.go b/github/octokit/models/secret_scanning_location_pull_request_review_comment.go new file mode 100644 index 00000000..ec31f0ab --- /dev/null +++ b/github/octokit/models/secret_scanning_location_pull_request_review_comment.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestReviewComment represents a 'pull_request_review_comment' secret scanning location type. This location type shows that a secret was detected in a review comment on a pull request. +type SecretScanningLocationPullRequestReviewComment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request review comment where the secret was detected. + pull_request_review_comment_url *string +} +// NewSecretScanningLocationPullRequestReviewComment instantiates a new secretScanningLocationPullRequestReviewComment and sets the default values. +func NewSecretScanningLocationPullRequestReviewComment()(*SecretScanningLocationPullRequestReviewComment) { + m := &SecretScanningLocationPullRequestReviewComment{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestReviewCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationPullRequestReviewCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestReviewComment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestReviewComment) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationPullRequestReviewComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_review_comment_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestReviewCommentUrl(val) + } + return nil + } + return res +} +// GetPullRequestReviewCommentUrl gets the pull_request_review_comment_url property value. The API URL to get the pull request review comment where the secret was detected. +func (m *SecretScanningLocationPullRequestReviewComment) GetPullRequestReviewCommentUrl()(*string) { + return m.pull_request_review_comment_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestReviewComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_review_comment_url", m.GetPullRequestReviewCommentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestReviewComment) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestReviewCommentUrl sets the pull_request_review_comment_url property value. The API URL to get the pull request review comment where the secret was detected. +func (m *SecretScanningLocationPullRequestReviewComment) SetPullRequestReviewCommentUrl(value *string)() { + m.pull_request_review_comment_url = value +} +// SecretScanningLocationPullRequestReviewCommentable +type SecretScanningLocationPullRequestReviewCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestReviewCommentUrl()(*string) + SetPullRequestReviewCommentUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_pull_request_title.go b/github/octokit/models/secret_scanning_location_pull_request_title.go new file mode 100644 index 00000000..5a773efc --- /dev/null +++ b/github/octokit/models/secret_scanning_location_pull_request_title.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningLocationPullRequestTitle represents a 'pull_request_title' secret scanning location type. This location type shows that a secret was detected in the title of a pull request. +type SecretScanningLocationPullRequestTitle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The API URL to get the pull request where the secret was detected. + pull_request_title_url *string +} +// NewSecretScanningLocationPullRequestTitle instantiates a new secretScanningLocationPullRequestTitle and sets the default values. +func NewSecretScanningLocationPullRequestTitle()(*SecretScanningLocationPullRequestTitle) { + m := &SecretScanningLocationPullRequestTitle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningLocationPullRequestTitleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecretScanningLocationPullRequestTitleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningLocationPullRequestTitle(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestTitle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecretScanningLocationPullRequestTitle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["pull_request_title_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPullRequestTitleUrl(val) + } + return nil + } + return res +} +// GetPullRequestTitleUrl gets the pull_request_title_url property value. The API URL to get the pull request where the secret was detected. +func (m *SecretScanningLocationPullRequestTitle) GetPullRequestTitleUrl()(*string) { + return m.pull_request_title_url +} +// Serialize serializes information the current object +func (m *SecretScanningLocationPullRequestTitle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("pull_request_title_url", m.GetPullRequestTitleUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningLocationPullRequestTitle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPullRequestTitleUrl sets the pull_request_title_url property value. The API URL to get the pull request where the secret was detected. +func (m *SecretScanningLocationPullRequestTitle) SetPullRequestTitleUrl(value *string)() { + m.pull_request_title_url = value +} +// SecretScanningLocationPullRequestTitleable +type SecretScanningLocationPullRequestTitleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPullRequestTitleUrl()(*string) + SetPullRequestTitleUrl(value *string)() +} diff --git a/github/octokit/models/secret_scanning_location_type.go b/github/octokit/models/secret_scanning_location_type.go index e0ab02db..3fe5632f 100644 --- a/github/octokit/models/secret_scanning_location_type.go +++ b/github/octokit/models/secret_scanning_location_type.go @@ -2,7 +2,7 @@ package models import ( "errors" ) -// The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found. +// The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. type SecretScanningLocation_type int const ( @@ -10,10 +10,18 @@ const ( ISSUE_TITLE_SECRETSCANNINGLOCATION_TYPE ISSUE_BODY_SECRETSCANNINGLOCATION_TYPE ISSUE_COMMENT_SECRETSCANNINGLOCATION_TYPE + DISCUSSION_TITLE_SECRETSCANNINGLOCATION_TYPE + DISCUSSION_BODY_SECRETSCANNINGLOCATION_TYPE + DISCUSSION_COMMENT_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_TITLE_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_BODY_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_COMMENT_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_REVIEW_SECRETSCANNINGLOCATION_TYPE + PULL_REQUEST_REVIEW_COMMENT_SECRETSCANNINGLOCATION_TYPE ) func (i SecretScanningLocation_type) String() string { - return []string{"commit", "issue_title", "issue_body", "issue_comment"}[i] + return []string{"commit", "issue_title", "issue_body", "issue_comment", "discussion_title", "discussion_body", "discussion_comment", "pull_request_title", "pull_request_body", "pull_request_comment", "pull_request_review", "pull_request_review_comment"}[i] } func ParseSecretScanningLocation_type(v string) (any, error) { result := COMMIT_SECRETSCANNINGLOCATION_TYPE @@ -26,6 +34,22 @@ func ParseSecretScanningLocation_type(v string) (any, error) { result = ISSUE_BODY_SECRETSCANNINGLOCATION_TYPE case "issue_comment": result = ISSUE_COMMENT_SECRETSCANNINGLOCATION_TYPE + case "discussion_title": + result = DISCUSSION_TITLE_SECRETSCANNINGLOCATION_TYPE + case "discussion_body": + result = DISCUSSION_BODY_SECRETSCANNINGLOCATION_TYPE + case "discussion_comment": + result = DISCUSSION_COMMENT_SECRETSCANNINGLOCATION_TYPE + case "pull_request_title": + result = PULL_REQUEST_TITLE_SECRETSCANNINGLOCATION_TYPE + case "pull_request_body": + result = PULL_REQUEST_BODY_SECRETSCANNINGLOCATION_TYPE + case "pull_request_comment": + result = PULL_REQUEST_COMMENT_SECRETSCANNINGLOCATION_TYPE + case "pull_request_review": + result = PULL_REQUEST_REVIEW_SECRETSCANNINGLOCATION_TYPE + case "pull_request_review_comment": + result = PULL_REQUEST_REVIEW_COMMENT_SECRETSCANNINGLOCATION_TYPE default: return 0, errors.New("Unknown SecretScanningLocation_type value: " + v) } diff --git a/github/octokit/orgs/item/invitations/invitations_post_request_body_role.go b/github/octokit/orgs/item/invitations/invitations_post_request_body_role.go index 4f30308c..ad846479 100644 --- a/github/octokit/orgs/item/invitations/invitations_post_request_body_role.go +++ b/github/octokit/orgs/item/invitations/invitations_post_request_body_role.go @@ -2,17 +2,18 @@ package invitations import ( "errors" ) -// The role for the new member. * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. +// The role for the new member. * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. * `reinstate` - The previous role assigned to the invitee before they were removed from your organization. Can be one of the roles listed above. Only works if the invitee was previously part of your organization. type InvitationsPostRequestBody_role int const ( ADMIN_INVITATIONSPOSTREQUESTBODY_ROLE InvitationsPostRequestBody_role = iota DIRECT_MEMBER_INVITATIONSPOSTREQUESTBODY_ROLE BILLING_MANAGER_INVITATIONSPOSTREQUESTBODY_ROLE + REINSTATE_INVITATIONSPOSTREQUESTBODY_ROLE ) func (i InvitationsPostRequestBody_role) String() string { - return []string{"admin", "direct_member", "billing_manager"}[i] + return []string{"admin", "direct_member", "billing_manager", "reinstate"}[i] } func ParseInvitationsPostRequestBody_role(v string) (any, error) { result := ADMIN_INVITATIONSPOSTREQUESTBODY_ROLE @@ -23,6 +24,8 @@ func ParseInvitationsPostRequestBody_role(v string) (any, error) { result = DIRECT_MEMBER_INVITATIONSPOSTREQUESTBODY_ROLE case "billing_manager": result = BILLING_MANAGER_INVITATIONSPOSTREQUESTBODY_ROLE + case "reinstate": + result = REINSTATE_INVITATIONSPOSTREQUESTBODY_ROLE default: return 0, errors.New("Unknown InvitationsPostRequestBody_role value: " + v) } diff --git a/github/octokit/orgs/item_copilot_billing_request_builder.go b/github/octokit/orgs/item_copilot_billing_request_builder.go index 587bcff7..8be3e021 100644 --- a/github/octokit/orgs/item_copilot_billing_request_builder.go +++ b/github/octokit/orgs/item_copilot_billing_request_builder.go @@ -30,7 +30,7 @@ func NewItemCopilotBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Note**: This endpoint is in beta and is subject to change.Gets information about an organization's Copilot Business subscription, including seat breakdownand code matching policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot Business in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization)".Only organization owners and members with admin permissions can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// Get **Note**: This endpoint is in beta and is subject to change.Gets information about an organization's Copilot Business subscription, including seat breakdownand code matching policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot Business in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/copilot/copilot-business#get-copilot-business-seat-information-and-settings-for-an-organization @@ -66,7 +66,7 @@ func (m *ItemCopilotBillingRequestBuilder) Selected_teams()(*ItemCopilotBillingS func (m *ItemCopilotBillingRequestBuilder) Selected_users()(*ItemCopilotBillingSelected_usersRequestBuilder) { return NewItemCopilotBillingSelected_usersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Gets information about an organization's Copilot Business subscription, including seat breakdownand code matching policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot Business in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization)".Only organization owners and members with admin permissions can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Gets information about an organization's Copilot Business subscription, including seat breakdownand code matching policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot Business in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. func (m *ItemCopilotBillingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCopilotBillingRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/orgs/item_copilot_billing_seats_request_builder.go b/github/octokit/orgs/item_copilot_billing_seats_request_builder.go index 11644cb7..daf3df91 100644 --- a/github/octokit/orgs/item_copilot_billing_seats_request_builder.go +++ b/github/octokit/orgs/item_copilot_billing_seats_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemCopilotBillingSeatsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners and members with admin permissions can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. type ItemCopilotBillingSeatsRequestBuilderGetQueryParameters struct { // Page number of the results to fetch. Page *int32 `uriparametername:"page"` @@ -39,7 +39,7 @@ func NewItemCopilotBillingSeatsRequestBuilder(rawUrl string, requestAdapter i2ae urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSeatsRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners and members with admin permissions can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// Get **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // Deprecated: This method is obsolete. Use GetAsSeatsGetResponse instead. // [API method documentation] // @@ -64,7 +64,7 @@ func (m *ItemCopilotBillingSeatsRequestBuilder) Get(ctx context.Context, request } return res.(ItemCopilotBillingSeatsResponseable), nil } -// GetAsSeatsGetResponse **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners and members with admin permissions can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// GetAsSeatsGetResponse **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/copilot/copilot-business#list-all-copilot-business-seat-assignments-for-an-organization @@ -88,7 +88,7 @@ func (m *ItemCopilotBillingSeatsRequestBuilder) GetAsSeatsGetResponse(ctx contex } return res.(ItemCopilotBillingSeatsGetResponseable), nil } -// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners and members with admin permissions can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all Copilot Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle).Only organization owners can configure and view details about the organization's Copilot Business subscription. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. func (m *ItemCopilotBillingSeatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCopilotBillingSeatsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/orgs/item_copilot_billing_selected_teams_request_builder.go b/github/octokit/orgs/item_copilot_billing_selected_teams_request_builder.go index a969ca6c..4446bb7d 100644 --- a/github/octokit/orgs/item_copilot_billing_selected_teams_request_builder.go +++ b/github/octokit/orgs/item_copilot_billing_selected_teams_request_builder.go @@ -37,7 +37,7 @@ func NewItemCopilotBillingSelected_teamsRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSelected_teamsRequestBuilderInternal(urlParams, requestAdapter) } -// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // Deprecated: This method is obsolete. Use DeleteAsSelected_teamsDeleteResponse instead. // [API method documentation] // @@ -62,7 +62,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_teamsResponseable), nil } -// DeleteAsSelected_teamsDeleteResponse **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// DeleteAsSelected_teamsDeleteResponse **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/copilot/copilot-business#remove-teams-from-the-copilot-business-subscription-for-an-organization @@ -86,7 +86,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) DeleteAsSelected_teamsD } return res.(ItemCopilotBillingSelected_teamsDeleteResponseable), nil } -// Post **Note**: This endpoint is in beta and is subject to change. Purchases a GitHub Copilot Business seat for all users within each specified team. The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)". Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy. For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)". For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". +// Post **Note**: This endpoint is in beta and is subject to change. Purchases a GitHub Copilot Business seat for all users within each specified team. The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)". Only organization owners can configure GitHub Copilot in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy. For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)". For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". // Deprecated: This method is obsolete. Use PostAsSelected_teamsPostResponse instead. // [API method documentation] // @@ -111,7 +111,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_teamsResponseable), nil } -// PostAsSelected_teamsPostResponse **Note**: This endpoint is in beta and is subject to change. Purchases a GitHub Copilot Business seat for all users within each specified team. The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)". Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy. For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)". For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". +// PostAsSelected_teamsPostResponse **Note**: This endpoint is in beta and is subject to change. Purchases a GitHub Copilot Business seat for all users within each specified team. The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)". Only organization owners can configure GitHub Copilot in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy. For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)". For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/copilot/copilot-business#add-teams-to-the-copilot-business-subscription-for-an-organization @@ -135,7 +135,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) PostAsSelected_teamsPos } return res.(ItemCopilotBillingSelected_teamsPostResponseable), nil } -// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsDeleteRequestBodyable, requestConfiguration *ItemCopilotBillingSelected_teamsRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { @@ -152,7 +152,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformat } return requestInfo, nil } -// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change. Purchases a GitHub Copilot Business seat for all users within each specified team. The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)". Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy. For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)". For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". +// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change. Purchases a GitHub Copilot Business seat for all users within each specified team. The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)". Only organization owners can configure GitHub Copilot in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy. For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)". For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsPostRequestBodyable, requestConfiguration *ItemCopilotBillingSelected_teamsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/orgs/item_copilot_billing_selected_users_request_builder.go b/github/octokit/orgs/item_copilot_billing_selected_users_request_builder.go index 075dc277..ca498603 100644 --- a/github/octokit/orgs/item_copilot_billing_selected_users_request_builder.go +++ b/github/octokit/orgs/item_copilot_billing_selected_users_request_builder.go @@ -37,7 +37,7 @@ func NewItemCopilotBillingSelected_usersRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSelected_usersRequestBuilderInternal(urlParams, requestAdapter) } -// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)"For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)"For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // Deprecated: This method is obsolete. Use DeleteAsSelected_usersDeleteResponse instead. // [API method documentation] // @@ -62,7 +62,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_usersResponseable), nil } -// DeleteAsSelected_usersDeleteResponse **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)"For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// DeleteAsSelected_usersDeleteResponse **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)"For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/copilot/copilot-business#remove-users-from-the-copilot-business-subscription-for-an-organization @@ -86,7 +86,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) DeleteAsSelected_usersD } return res.(ItemCopilotBillingSelected_usersDeleteResponseable), nil } -// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot Business seat for each user specified.The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint.In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy.For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". +// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot Business seat for each user specified.The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint.In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy.For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". // Deprecated: This method is obsolete. Use PostAsSelected_usersPostResponse instead. // [API method documentation] // @@ -111,7 +111,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_usersResponseable), nil } -// PostAsSelected_usersPostResponse **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot Business seat for each user specified.The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint.In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy.For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". +// PostAsSelected_usersPostResponse **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot Business seat for each user specified.The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint.In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy.For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/copilot/copilot-business#add-users-to-the-copilot-business-subscription-for-an-organization @@ -135,7 +135,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) PostAsSelected_usersPos } return res.(ItemCopilotBillingSelected_usersPostResponseable), nil } -// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)"For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot Business seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)"For more information about disabling access to Copilot Business, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-access-for-copilot-business-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersDeleteRequestBodyable, requestConfiguration *ItemCopilotBillingSelected_usersRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { @@ -152,7 +152,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformat } return requestInfo, nil } -// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot Business seat for each user specified.The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint.In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy.For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". +// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot Business seat for each user specified.The organization will be billed accordingly. For more information about Copilot Business pricing, see "[Pricing for GitHub Copilot Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-business)".Only organization owners can configure GitHub Copilot in their organization. You mustauthenticate using an access token with the `manage_billing:copilot` scope to use this endpoint.In order for an admin to use this endpoint, the organization must have a Copilot Business subscription and a configured suggestion matching policy.For more information about setting up a Copilot Business subscription, see "[Setting up a Copilot Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-business-subscription-for-your-organization)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot-business/managing-policies-for-copilot-business-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersPostRequestBodyable, requestConfiguration *ItemCopilotBillingSelected_usersRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/orgs/item_members_item_copilot_request_builder.go b/github/octokit/orgs/item_members_item_copilot_request_builder.go index 06d7f305..23e090c3 100644 --- a/github/octokit/orgs/item_members_item_copilot_request_builder.go +++ b/github/octokit/orgs/item_members_item_copilot_request_builder.go @@ -30,7 +30,7 @@ func NewItemMembersItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4 urlParams["request-raw-url"] = rawUrl return NewItemMembersItemCopilotRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Note**: This endpoint is in beta and is subject to change.Gets the GitHub Copilot Business seat assignment details for a member of an organization who currently has access to GitHub Copilot.Organization owners and members with admin permissions can view GitHub Copilot seat assignment details for members in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// Get **Note**: This endpoint is in beta and is subject to change.Gets the GitHub Copilot Business seat assignment details for a member of an organization who currently has access to GitHub Copilot.Organization owners can view GitHub Copilot seat assignment details for members in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/copilot/copilot-business#get-copilot-business-seat-assignment-details-for-a-user @@ -54,7 +54,7 @@ func (m *ItemMembersItemCopilotRequestBuilder) Get(ctx context.Context, requestC } return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CopilotSeatDetailsable), nil } -// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Gets the GitHub Copilot Business seat assignment details for a member of an organization who currently has access to GitHub Copilot.Organization owners and members with admin permissions can view GitHub Copilot seat assignment details for members in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Gets the GitHub Copilot Business seat assignment details for a member of an organization who currently has access to GitHub Copilot.Organization owners can view GitHub Copilot seat assignment details for members in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. func (m *ItemMembersItemCopilotRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemMembersItemCopilotRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/orgs/item_organization_fine_grained_permissions_request_builder.go b/github/octokit/orgs/item_organization_fine_grained_permissions_request_builder.go index 6f0c50eb..7ec9d850 100644 --- a/github/octokit/orgs/item_organization_fine_grained_permissions_request_builder.go +++ b/github/octokit/orgs/item_organization_fine_grained_permissions_request_builder.go @@ -30,7 +30,7 @@ func NewItemOrganizationFineGrainedPermissionsRequestBuilder(rawUrl string, requ urlParams["request-raw-url"] = rawUrl return NewItemOrganizationFineGrainedPermissionsRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Note**: This operation is in beta and subject to change.Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.The authenticated user needs an access token with `admin:org` scope or a fine-grained personal access token with the `organization_custom_roles:read` permission to use this endpoint.GitHub Apps must have the `organization_custom_org_roles:read` organization permission to use this endpoint. +// Get lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.The authenticated user needs an access token with `admin:org` scope or a fine-grained personal access token with the `organization_custom_roles:read` permission to use this endpoint.GitHub Apps must have the `organization_custom_org_roles:read` organization permission to use this endpoint. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization @@ -55,7 +55,7 @@ func (m *ItemOrganizationFineGrainedPermissionsRequestBuilder) Get(ctx context.C } return val, nil } -// ToGetRequestInformation **Note**: This operation is in beta and subject to change.Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.The authenticated user needs an access token with `admin:org` scope or a fine-grained personal access token with the `organization_custom_roles:read` permission to use this endpoint.GitHub Apps must have the `organization_custom_org_roles:read` organization permission to use this endpoint. +// ToGetRequestInformation lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)."To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)."To use this endpoint, the authenticated user must be one of:- An administrator for the organization.- A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization.The authenticated user needs an access token with `admin:org` scope or a fine-grained personal access token with the `organization_custom_roles:read` permission to use this endpoint.GitHub Apps must have the `organization_custom_org_roles:read` organization permission to use this endpoint. func (m *ItemOrganizationFineGrainedPermissionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemOrganizationFineGrainedPermissionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/orgs/item_repos_request_builder.go b/github/octokit/orgs/item_repos_request_builder.go index 4fe91400..5418f55b 100644 --- a/github/octokit/orgs/item_repos_request_builder.go +++ b/github/octokit/orgs/item_repos_request_builder.go @@ -83,11 +83,11 @@ func (m *ItemReposRequestBuilder) Get(ctx context.Context, requestConfiguration } return val, nil } -// Post creates a new repository in the specified organization. The authenticated user must be a member of the organization.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.* `repo` scope to create a private repository +// Post creates a new repository in the specified organization. The authenticated user must be a member of the organization.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository* `repo` scope to create a private repository // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/repos/repos#create-an-organization-repository -func (m *ItemReposRequestBuilder) Post(ctx context.Context, body ItemReposPostRequestBodyable, requestConfiguration *ItemReposRequestBuilderPostRequestConfiguration)(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.Repositoryable, error) { +func (m *ItemReposRequestBuilder) Post(ctx context.Context, body ItemReposPostRequestBodyable, requestConfiguration *ItemReposRequestBuilderPostRequestConfiguration)(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -96,14 +96,14 @@ func (m *ItemReposRequestBuilder) Post(ctx context.Context, body ItemReposPostRe "403": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateBasicErrorFromDiscriminatorValue, "422": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateValidationErrorFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateRepositoryFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateFullRepositoryFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.Repositoryable), nil + return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable), nil } // ToGetRequestInformation lists repositories for the specified organization.**Note:** In order to see the `security_and_analysis` block for a repository 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)." func (m *ItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemReposRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { @@ -121,7 +121,7 @@ func (m *ItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, r requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a new repository in the specified organization. The authenticated user must be a member of the organization.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.* `repo` scope to create a private repository +// ToPostRequestInformation creates a new repository in the specified organization. The authenticated user must be a member of the organization.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository* `repo` scope to create a private repository func (m *ItemReposRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemReposPostRequestBodyable, requestConfiguration *ItemReposRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go b/github/octokit/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go index ab1b9d31..33e9c12c 100644 --- a/github/octokit/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go +++ b/github/octokit/orgs/item_teams_item_repos_item_with_repo_item_request_builder.go @@ -59,7 +59,7 @@ func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) Delete(ctx context.Co } return nil } -// Get checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository and your token must have the `repo` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// Get checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository @@ -104,7 +104,7 @@ func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) ToDeleteRequestInform requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE return requestInfo, nil } -// ToGetRequestInformation checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository and your token must have the `repo` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. +// ToGetRequestInformation checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. func (m *ItemTeamsItemReposItemWithRepoItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamsItemReposItemWithRepoItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/repos/item_item_generate_request_builder.go b/github/octokit/repos/item_item_generate_request_builder.go index c03592a1..7cd1bc51 100644 --- a/github/octokit/repos/item_item_generate_request_builder.go +++ b/github/octokit/repos/item_item_generate_request_builder.go @@ -30,25 +30,25 @@ func NewItemItemGenerateRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewItemItemGenerateRequestBuilderInternal(urlParams, requestAdapter) } -// Post creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/repos/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.* `repo` scope to create a private repository +// Post creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/repos/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository* `repo` scope to create a private repository // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/repos/repos#create-a-repository-using-a-template -func (m *ItemItemGenerateRequestBuilder) Post(ctx context.Context, body ItemItemGeneratePostRequestBodyable, requestConfiguration *ItemItemGenerateRequestBuilderPostRequestConfiguration)(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.Repositoryable, error) { +func (m *ItemItemGenerateRequestBuilder) Post(ctx context.Context, body ItemItemGeneratePostRequestBodyable, requestConfiguration *ItemItemGenerateRequestBuilderPostRequestConfiguration)(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateRepositoryFromDiscriminatorValue, nil) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateFullRepositoryFromDiscriminatorValue, nil) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.Repositoryable), nil + return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable), nil } -// ToPostRequestInformation creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/repos/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.* `repo` scope to create a private repository +// ToPostRequestInformation creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/repos/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository* `repo` scope to create a private repository func (m *ItemItemGenerateRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGeneratePostRequestBodyable, requestConfiguration *ItemItemGenerateRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/repos/item_item_issues_with_issue_number_item_request_builder.go b/github/octokit/repos/item_item_issues_with_issue_number_item_request_builder.go index d9ac48b0..f1046118 100644 --- a/github/octokit/repos/item_item_issues_with_issue_number_item_request_builder.go +++ b/github/octokit/repos/item_item_issues_with_issue_number_item_request_builder.go @@ -49,7 +49,7 @@ func NewItemItemIssuesWithIssue_numberItemRequestBuilder(rawUrl string, requestA func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Events()(*ItemItemIssuesItemEventsRequestBuilder) { return NewItemItemIssuesItemEventsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get the API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was[transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. Ifthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the APIreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has readaccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribeto the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. +// Get the API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was[transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. Ifthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the APIreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has readaccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribeto the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/issues/issues#get-an-issue @@ -112,7 +112,7 @@ func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Reactions()(*ItemItem func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Timeline()(*ItemItemIssuesItemTimelineRequestBuilder) { return NewItemItemIssuesItemTimelineRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation the API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was[transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. Ifthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the APIreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has readaccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribeto the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. +// ToGetRequestInformation the API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was[transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. Ifthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the APIreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has readaccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribeto the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For thisreason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests bythe `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pullrequest id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemIssuesWithIssue_numberItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/repos/item_item_security_advisories_item_forks_request_builder.go b/github/octokit/repos/item_item_security_advisories_item_forks_request_builder.go new file mode 100644 index 00000000..261d1915 --- /dev/null +++ b/github/octokit/repos/item_item_security_advisories_item_forks_request_builder.go @@ -0,0 +1,73 @@ +package repos + +import ( + "context" + i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e "github.com/octokit/go-sdk/github/octokit/models" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemSecurityAdvisoriesItemForksRequestBuilder builds and executes requests for operations under \repos\{owner}\{repo}\security-advisories\{ghsa_id}\forks +type ItemItemSecurityAdvisoriesItemForksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemSecurityAdvisoriesItemForksRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemSecurityAdvisoriesItemForksRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal instantiates a new ForksRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + m := &ItemItemSecurityAdvisoriesItemForksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks", pathParameters), + } + return m +} +// NewItemItemSecurityAdvisoriesItemForksRequestBuilder instantiates a new ForksRequestBuilder and sets the default values. +func NewItemItemSecurityAdvisoriesItemForksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal(urlParams, requestAdapter) +} +// Post create a temporary private fork to collaborate on fixing a security vulnerability in your repository.**Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/security-advisories/repository-advisories#create-a-temporary-private-fork +func (m *ItemItemSecurityAdvisoriesItemForksRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemItemSecurityAdvisoriesItemForksRequestBuilderPostRequestConfiguration)(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateBasicErrorFromDiscriminatorValue, + "403": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateBasicErrorFromDiscriminatorValue, + "404": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateBasicErrorFromDiscriminatorValue, + "422": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateFullRepositoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable), nil +} +// ToPostRequestInformation create a temporary private fork to collaborate on fixing a security vulnerability in your repository.**Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. +func (m *ItemItemSecurityAdvisoriesItemForksRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemItemSecurityAdvisoriesItemForksRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.TryAdd("Accept", "application/json") + 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. +func (m *ItemItemSecurityAdvisoriesItemForksRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + return NewItemItemSecurityAdvisoriesItemForksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/github/octokit/repos/item_item_security_advisories_with_ghsa_item_request_builder.go b/github/octokit/repos/item_item_security_advisories_with_ghsa_item_request_builder.go index 0243f7f1..df9ee57d 100644 --- a/github/octokit/repos/item_item_security_advisories_with_ghsa_item_request_builder.go +++ b/github/octokit/repos/item_item_security_advisories_with_ghsa_item_request_builder.go @@ -41,6 +41,10 @@ func NewItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder(rawUrl string, req func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) Cve()(*ItemItemSecurityAdvisoriesItemCveRequestBuilder) { return NewItemItemSecurityAdvisoriesItemCveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Forks the forks property +func (m *ItemItemSecurityAdvisoriesWithGhsa_ItemRequestBuilder) Forks()(*ItemItemSecurityAdvisoriesItemForksRequestBuilder) { + return NewItemItemSecurityAdvisoriesItemForksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get a repository security advisory using its GitHub Security Advisory (GHSA) identifier.You can access any published security advisory on a public repository.You must authenticate using an access token with the `repo` scope or `repository_advisories:read` permissionin order to get a published security advisory in a private repository, or any unpublished security advisory that you have access to.You can access an unpublished security advisory from a repository if you are a security manager or administrator of that repository, or if you are acollaborator on the security advisory. // [API method documentation] // diff --git a/github/octokit/user/repos_request_builder.go b/github/octokit/user/repos_request_builder.go index edfae0e8..1cbe7370 100644 --- a/github/octokit/user/repos_request_builder.go +++ b/github/octokit/user/repos_request_builder.go @@ -100,11 +100,11 @@ func (m *ReposRequestBuilder) Get(ctx context.Context, requestConfiguration *Rep } return val, nil } -// Post creates a new repository for the authenticated user.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.* `repo` scope to create a private repository. +// Post creates a new repository for the authenticated user.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository* `repo` scope to create a private repository // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user -func (m *ReposRequestBuilder) Post(ctx context.Context, body ReposPostRequestBodyable, requestConfiguration *ReposRequestBuilderPostRequestConfiguration)(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.Repositoryable, error) { +func (m *ReposRequestBuilder) Post(ctx context.Context, body ReposPostRequestBodyable, requestConfiguration *ReposRequestBuilderPostRequestConfiguration)(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -116,14 +116,14 @@ func (m *ReposRequestBuilder) Post(ctx context.Context, body ReposPostRequestBod "404": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateBasicErrorFromDiscriminatorValue, "422": i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateValidationErrorFromDiscriminatorValue, } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateRepositoryFromDiscriminatorValue, errorMapping) + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.CreateFullRepositoryFromDiscriminatorValue, errorMapping) if err != nil { return nil, err } if res == nil { return nil, nil } - return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.Repositoryable), nil + return res.(i8bb20811a612dd15efa26f086111481a68f72cd9ac5da7a939a417131078d77e.FullRepositoryable), nil } // ToGetRequestInformation lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. func (m *ReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ReposRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { @@ -141,7 +141,7 @@ func (m *ReposRequestBuilder) ToGetRequestInformation(ctx context.Context, reque requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation creates a new repository for the authenticated user.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.* `repo` scope to create a private repository. +// ToPostRequestInformation creates a new repository for the authenticated user.**OAuth scope requirements**When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:* `public_repo` scope or `repo` scope to create a public repository* `repo` scope to create a private repository func (m *ReposRequestBuilder) ToPostRequestInformation(ctx context.Context, body ReposPostRequestBodyable, requestConfiguration *ReposRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/users/item_repos_request_builder.go b/github/octokit/users/item_repos_request_builder.go index c94995bb..5206005a 100644 --- a/github/octokit/users/item_repos_request_builder.go +++ b/github/octokit/users/item_repos_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemReposRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemReposRequestBuilderGetQueryParameters lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. +// ItemReposRequestBuilderGetQueryParameters lists public repositories for the specified user. type ItemReposRequestBuilderGetQueryParameters struct { // The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. // Deprecated: This property is deprecated, use directionAsGetDirectionQueryParameterType instead @@ -55,7 +55,7 @@ func NewItemReposRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 urlParams["request-raw-url"] = rawUrl return NewItemReposRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. +// Get lists public repositories for the specified user. // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/repos/repos#list-repositories-for-a-user @@ -76,7 +76,7 @@ func (m *ItemReposRequestBuilder) Get(ctx context.Context, requestConfiguration } return val, nil } -// ToGetRequestInformation lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. +// ToGetRequestInformation lists public repositories for the specified user. func (m *ItemReposRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemReposRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() if requestConfiguration != nil { diff --git a/github/octokit/users/item_starred_repository.go b/github/octokit/users/item_starred_repository.go index 31be0b49..cf2b5b84 100644 --- a/github/octokit/users/item_starred_repository.go +++ b/github/octokit/users/item_starred_repository.go @@ -43,7 +43,7 @@ func (m *ItemStarredRepository) Serialize(writer i878a80d2330e89d26896388a3f487e func (m *ItemStarredRepository) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// ItemStarredRepositoryable +// ItemStarredRepositoryable type ItemStarredRepositoryable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable diff --git a/go.mod b/go.mod index e0ad4df5..d2c73031 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/octokit/go-sdk go 1.21.4 require ( - github.com/microsoft/kiota-abstractions-go v1.5.2 - github.com/microsoft/kiota-http-go v1.1.1 + github.com/microsoft/kiota-abstractions-go v1.4.0 + github.com/microsoft/kiota-http-go v1.1.0 github.com/microsoft/kiota-serialization-form-go v1.0.0 github.com/microsoft/kiota-serialization-json-go v1.0.4 github.com/microsoft/kiota-serialization-multipart-go v1.0.0 @@ -14,14 +14,14 @@ require ( require ( github.com/cjlapao/common-go v0.0.39 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/uuid v1.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/std-uritemplate/std-uritemplate/go v0.0.47 // indirect + github.com/std-uritemplate/std-uritemplate/go v0.0.46 // indirect github.com/stretchr/testify v1.8.4 // indirect - go.opentelemetry.io/otel v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index ae00e224..badc0868 100644 --- a/go.sum +++ b/go.sum @@ -3,22 +3,22 @@ github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/microsoft/kiota-abstractions-go v1.5.2 h1:rVGmtb0B557fCxVjHXUrSGXDWTdrIN/9gl6TTBan1fc= -github.com/microsoft/kiota-abstractions-go v1.5.2/go.mod h1:xyBzTVCYrp7QBW4/p+RFi44PHwp/IPn2dZepuV4nF80= -github.com/microsoft/kiota-http-go v1.1.1 h1:W4Olo7Z/MwNZCfkcvH/5eLhnn7koRBMMRhLEnf5MPKo= -github.com/microsoft/kiota-http-go v1.1.1/go.mod h1:QzhhfW5xkoUuT+/ohflpHJvumWeXIxa/Xl0GmQ2M6mY= +github.com/microsoft/kiota-abstractions-go v1.4.0 h1:i9+LZ1wQ90xpq/gR2umCA5DgHvgBr3ibzsEdexZGnVY= +github.com/microsoft/kiota-abstractions-go v1.4.0/go.mod h1:NRJnAFg8qqOoX/VQWTe3ZYmcIbLa20LNC+eTqO2j60U= +github.com/microsoft/kiota-http-go v1.1.0 h1:L5I93EiNtlP/X6YzeTlhjWt7Q1DxzC9CmWSVtX3b0tE= +github.com/microsoft/kiota-http-go v1.1.0/go.mod h1:zESUM6ovki9LEupqziCbxJ+FAYoF0dFDYZVpOkAfSLc= github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA= github.com/microsoft/kiota-serialization-json-go v1.0.4 h1:5TaISWwd2Me8clrK7SqNATo0tv9seOq59y4I5953egQ= @@ -29,16 +29,16 @@ github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0 github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/std-uritemplate/std-uritemplate/go v0.0.47 h1:erzz/DR4sOzWr0ca2MgSTkMckpLEsDySaTZwVFQq9zw= -github.com/std-uritemplate/std-uritemplate/go v0.0.47/go.mod h1:Qov4Ay4U83j37XjgxMYevGJFLbnZ2o9cEOhGufBKgKY= +github.com/std-uritemplate/std-uritemplate/go v0.0.46 h1:rWcEym/hz9YhPTXJELTXfrq48lTx69jNVhv+dOMmyZY= +github.com/std-uritemplate/std-uritemplate/go v0.0.46/go.mod h1:Qov4Ay4U83j37XjgxMYevGJFLbnZ2o9cEOhGufBKgKY= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=