Skip to content

Commit

Permalink
New updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
Octokit Bot committed Dec 5, 2023
1 parent 8971919 commit 5edec8a
Show file tree
Hide file tree
Showing 42 changed files with 1,245 additions and 96 deletions.
2 changes: 1 addition & 1 deletion github/octokit/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "E685E9EDE7DA3604D00809BFEB3E1F25E7647029BCA527A50F7E21438E7AC1B2CF702369E7112041512476291B7B5389DC2F0F975A507ECDB0BC3C43DFDDFA8A",
"descriptionHash": "29017D664EE04E643751B17C52A1C5F046ABEDC94E4381BA0842CD27900EED33AB6951C411F9E0A9BDF48632A3A483155884C7AF337B6A823CC1BA10304DD7A5",
"descriptionLocation": "../../../source-generator/schemas/downloaded.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.8.2",
Expand Down
34 changes: 34 additions & 0 deletions github/octokit/models/api_overview_domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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)()
Expand Down
93 changes: 90 additions & 3 deletions github/octokit/models/app_permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)()
Expand All @@ -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)()
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
Loading

0 comments on commit 5edec8a

Please sign in to comment.