Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eat | fix | breaking: updates CopilotSeatDetails[CopilotSeatDetails_organization > NullableOrganizationSimple], [CopilotSeatDetails_assignee > SimpleUser], fixes many previously unknown types, fixes check run discriminator to evaluate status, fixes content discriminator to evaluate type #115

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "465ACB0611A29503ADB35236C24DE46088E11661E09BED91171E887E64A53313F9B1AD12A52B1DC1B29964EA8AE35C9D0E1A62C8CB950C389D038DFDF6942163",
"descriptionHash": "66C48296D32F2DF7B89235D036841D14E635F5F8D2617BD66FD09D9814A17B81ADD1E1B95EA6C8A8521D0C42FBB5B557F8B1A0A7413EB39A465FC4487E3EE5D1",
"descriptionLocation": "../../../../../schemas/api.github.com.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.18.0",
Expand Down
44 changes: 22 additions & 22 deletions pkg/github/models/copilot_seat_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

// CopilotSeatDetails information about a Copilot Business seat assignment for a user, team, or organization.
type CopilotSeatDetails struct {
// The assignee that has been granted access to GitHub Copilot.
assignee CopilotSeatDetails_assigneeable
// A GitHub user.
assignee SimpleUserable
// The team through which the assignee is granted access to GitHub Copilot, if applicable.
assigning_team CopilotSeatDetails_CopilotSeatDetails_assigning_teamable
// Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format.
Expand All @@ -17,8 +17,8 @@ type CopilotSeatDetails struct {
last_activity_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// Last editor that was used by the user for a GitHub Copilot completion.
last_activity_editor *string
// The organization to which this seat belongs.
organization CopilotSeatDetails_organizationable
// A GitHub organization.
organization NullableOrganizationSimpleable
// The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle.
pending_cancellation_date *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly
// Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format.
Expand Down Expand Up @@ -118,9 +118,9 @@ func NewCopilotSeatDetails()(*CopilotSeatDetails) {
func CreateCopilotSeatDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewCopilotSeatDetails(), nil
}
// GetAssignee gets the assignee property value. The assignee that has been granted access to GitHub Copilot.
// returns a CopilotSeatDetails_assigneeable when successful
func (m *CopilotSeatDetails) GetAssignee()(CopilotSeatDetails_assigneeable) {
// GetAssignee gets the assignee property value. A GitHub user.
// returns a SimpleUserable when successful
func (m *CopilotSeatDetails) GetAssignee()(SimpleUserable) {
return m.assignee
}
// GetAssigningTeam gets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable.
Expand All @@ -138,12 +138,12 @@ func (m *CopilotSeatDetails) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6
func (m *CopilotSeatDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["assignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateCopilotSeatDetails_assigneeFromDiscriminatorValue)
val, err := n.GetObjectValue(CreateSimpleUserFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetAssignee(val.(CopilotSeatDetails_assigneeable))
m.SetAssignee(val.(SimpleUserable))
}
return nil
}
Expand Down Expand Up @@ -188,12 +188,12 @@ func (m *CopilotSeatDetails) GetFieldDeserializers()(map[string]func(i878a80d233
return nil
}
res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateCopilotSeatDetails_organizationFromDiscriminatorValue)
val, err := n.GetObjectValue(CreateNullableOrganizationSimpleFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetOrganization(val.(CopilotSeatDetails_organizationable))
m.SetOrganization(val.(NullableOrganizationSimpleable))
}
return nil
}
Expand Down Expand Up @@ -229,9 +229,9 @@ func (m *CopilotSeatDetails) GetLastActivityAt()(*i336074805fc853987abe6f7fe3ad9
func (m *CopilotSeatDetails) GetLastActivityEditor()(*string) {
return m.last_activity_editor
}
// GetOrganization gets the organization property value. The organization to which this seat belongs.
// returns a CopilotSeatDetails_organizationable when successful
func (m *CopilotSeatDetails) GetOrganization()(CopilotSeatDetails_organizationable) {
// GetOrganization gets the organization property value. A GitHub organization.
// returns a NullableOrganizationSimpleable when successful
func (m *CopilotSeatDetails) GetOrganization()(NullableOrganizationSimpleable) {
return m.organization
}
// GetPendingCancellationDate gets the pending_cancellation_date property value. The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle.
Expand Down Expand Up @@ -296,8 +296,8 @@ func (m *CopilotSeatDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef2
}
return nil
}
// SetAssignee sets the assignee property value. The assignee that has been granted access to GitHub Copilot.
func (m *CopilotSeatDetails) SetAssignee(value CopilotSeatDetails_assigneeable)() {
// SetAssignee sets the assignee property value. A GitHub user.
func (m *CopilotSeatDetails) SetAssignee(value SimpleUserable)() {
m.assignee = value
}
// SetAssigningTeam sets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable.
Expand All @@ -316,8 +316,8 @@ func (m *CopilotSeatDetails) SetLastActivityAt(value *i336074805fc853987abe6f7fe
func (m *CopilotSeatDetails) SetLastActivityEditor(value *string)() {
m.last_activity_editor = value
}
// SetOrganization sets the organization property value. The organization to which this seat belongs.
func (m *CopilotSeatDetails) SetOrganization(value CopilotSeatDetails_organizationable)() {
// SetOrganization sets the organization property value. A GitHub organization.
func (m *CopilotSeatDetails) SetOrganization(value NullableOrganizationSimpleable)() {
m.organization = value
}
// SetPendingCancellationDate sets the pending_cancellation_date property value. The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle.
Expand All @@ -330,20 +330,20 @@ func (m *CopilotSeatDetails) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97
}
type CopilotSeatDetailsable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAssignee()(CopilotSeatDetails_assigneeable)
GetAssignee()(SimpleUserable)
GetAssigningTeam()(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)
GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetLastActivityAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetLastActivityEditor()(*string)
GetOrganization()(CopilotSeatDetails_organizationable)
GetOrganization()(NullableOrganizationSimpleable)
GetPendingCancellationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)
GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
SetAssignee(value CopilotSeatDetails_assigneeable)()
SetAssignee(value SimpleUserable)()
SetAssigningTeam(value CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)()
SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetLastActivityAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetLastActivityEditor(value *string)()
SetOrganization(value CopilotSeatDetails_organizationable)()
SetOrganization(value NullableOrganizationSimpleable)()
SetPendingCancellationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)()
SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
}
52 changes: 0 additions & 52 deletions pkg/github/models/copilot_seat_details_escaped_assignee.go

This file was deleted.

52 changes: 0 additions & 52 deletions pkg/github/models/copilot_seat_details_escaped_organization.go

This file was deleted.

Loading
Loading