diff --git a/go.mod b/go.mod index b94a3972..a8542c1f 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/microsoft/kiota-serialization-json-go v1.0.7 github.com/microsoft/kiota-serialization-multipart-go v1.0.0 github.com/microsoft/kiota-serialization-text-go v1.0.0 - golang.org/x/sync v0.7.0 ) require ( diff --git a/go.sum b/go.sum index 8ebb0fdc..903ae99b 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,6 @@ go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGX go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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= diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 9a936b2e..00457bc9 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "EAF8A068E4D8873A357DB207B2686C5F61421902A300167633CFC77135B9F8D2B9CAE898577355E6188B350689BDEC26A54CF6CEAF4EF0246F0A669E5718456C", + "descriptionHash": "C4D764354C09F3368D481B03828B3989456CB5BFA95D3617D50FB8EDB5D482B43E04E026D0B7C8380C38BD215C9D5A45E08B8EF00FDD2A7A66EF8D2449ECFF03", "descriptionLocation": "../../../../schemas/downloaded.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", diff --git a/pkg/github/models/copilot_seat_details.go b/pkg/github/models/copilot_seat_details.go index 37b47075..9ddf50ae 100644 --- a/pkg/github/models/copilot_seat_details.go +++ b/pkg/github/models/copilot_seat_details.go @@ -9,14 +9,16 @@ import ( type CopilotSeatDetails struct { // The assignee that has been granted access to GitHub Copilot. assignee CopilotSeatDetails_CopilotSeatDetails_assigneeable - // The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. - assigning_team Teamable + // 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. created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. 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 // 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. @@ -114,6 +116,82 @@ func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetSimpleUser(value Sim func (m *CopilotSeatDetails_CopilotSeatDetails_assignee) SetTeam(value Teamable)() { m.team = value } +// CopilotSeatDetails_CopilotSeatDetails_assigning_team composed type wrapper for classes EnterpriseTeamable, Teamable +type CopilotSeatDetails_CopilotSeatDetails_assigning_team struct { + // Composed type representation for type EnterpriseTeamable + enterpriseTeam EnterpriseTeamable + // Composed type representation for type Teamable + team Teamable +} +// NewCopilotSeatDetails_CopilotSeatDetails_assigning_team instantiates a new CopilotSeatDetails_CopilotSeatDetails_assigning_team and sets the default values. +func NewCopilotSeatDetails_CopilotSeatDetails_assigning_team()(*CopilotSeatDetails_CopilotSeatDetails_assigning_team) { + m := &CopilotSeatDetails_CopilotSeatDetails_assigning_team{ + } + return m +} +// CreateCopilotSeatDetails_CopilotSeatDetails_assigning_teamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatDetails_CopilotSeatDetails_assigning_teamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewCopilotSeatDetails_CopilotSeatDetails_assigning_team() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetEnterpriseTeam gets the enterpriseTeam property value. Composed type representation for type EnterpriseTeamable +// returns a EnterpriseTeamable when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetEnterpriseTeam()(EnterpriseTeamable) { + return m.enterpriseTeam +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetIsComposedType()(bool) { + return true +} +// GetTeam gets the team property value. Composed type representation for type Teamable +// returns a Teamable when successful +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) GetTeam()(Teamable) { + return m.team +} +// Serialize serializes information the current object +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnterpriseTeam() != nil { + err := writer.WriteObjectValue("", m.GetEnterpriseTeam()) + if err != nil { + return err + } + } else if m.GetTeam() != nil { + err := writer.WriteObjectValue("", m.GetTeam()) + if err != nil { + return err + } + } + return nil +} +// SetEnterpriseTeam sets the enterpriseTeam property value. Composed type representation for type EnterpriseTeamable +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) SetEnterpriseTeam(value EnterpriseTeamable)() { + m.enterpriseTeam = value +} +// SetTeam sets the team property value. Composed type representation for type Teamable +func (m *CopilotSeatDetails_CopilotSeatDetails_assigning_team) SetTeam(value Teamable)() { + m.team = value +} type CopilotSeatDetails_CopilotSeatDetails_assigneeable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetOrganization()(Organizationable) @@ -123,6 +201,13 @@ type CopilotSeatDetails_CopilotSeatDetails_assigneeable interface { SetSimpleUser(value SimpleUserable)() SetTeam(value Teamable)() } +type CopilotSeatDetails_CopilotSeatDetails_assigning_teamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnterpriseTeam()(EnterpriseTeamable) + GetTeam()(Teamable) + SetEnterpriseTeam(value EnterpriseTeamable)() + SetTeam(value Teamable)() +} // NewCopilotSeatDetails instantiates a new CopilotSeatDetails and sets the default values. func NewCopilotSeatDetails()(*CopilotSeatDetails) { m := &CopilotSeatDetails{ @@ -139,9 +224,9 @@ func CreateCopilotSeatDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26 func (m *CopilotSeatDetails) GetAssignee()(CopilotSeatDetails_CopilotSeatDetails_assigneeable) { return m.assignee } -// GetAssigningTeam gets the assigning_team property value. The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. -// returns a Teamable when successful -func (m *CopilotSeatDetails) GetAssigningTeam()(Teamable) { +// GetAssigningTeam gets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable. +// returns a CopilotSeatDetails_CopilotSeatDetails_assigning_teamable when successful +func (m *CopilotSeatDetails) GetAssigningTeam()(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable) { return m.assigning_team } // GetCreatedAt gets the created_at property value. Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. @@ -164,12 +249,12 @@ func (m *CopilotSeatDetails) GetFieldDeserializers()(map[string]func(i878a80d233 return nil } res["assigning_team"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateTeamFromDiscriminatorValue) + val, err := n.GetObjectValue(CreateCopilotSeatDetails_CopilotSeatDetails_assigning_teamFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetAssigningTeam(val.(Teamable)) + m.SetAssigningTeam(val.(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)) } return nil } @@ -203,6 +288,16 @@ func (m *CopilotSeatDetails) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCopilotSeatDetails_organizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val.(CopilotSeatDetails_organizationable)) + } + return nil + } res["pending_cancellation_date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetDateOnlyValue() if err != nil { @@ -235,6 +330,11 @@ 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) { + 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. // returns a *DateOnly when successful func (m *CopilotSeatDetails) GetPendingCancellationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { @@ -277,6 +377,12 @@ func (m *CopilotSeatDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err := writer.WriteObjectValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } { err := writer.WriteDateOnlyValue("pending_cancellation_date", m.GetPendingCancellationDate()) if err != nil { @@ -295,8 +401,8 @@ func (m *CopilotSeatDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef2 func (m *CopilotSeatDetails) SetAssignee(value CopilotSeatDetails_CopilotSeatDetails_assigneeable)() { m.assignee = value } -// SetAssigningTeam sets the assigning_team property value. The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. -func (m *CopilotSeatDetails) SetAssigningTeam(value Teamable)() { +// SetAssigningTeam sets the assigning_team property value. The team through which the assignee is granted access to GitHub Copilot, if applicable. +func (m *CopilotSeatDetails) SetAssigningTeam(value CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)() { m.assigning_team = value } // SetCreatedAt sets the created_at property value. Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. @@ -311,6 +417,10 @@ 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)() { + 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. func (m *CopilotSeatDetails) SetPendingCancellationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { m.pending_cancellation_date = value @@ -322,17 +432,19 @@ func (m *CopilotSeatDetails) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97 type CopilotSeatDetailsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAssignee()(CopilotSeatDetails_CopilotSeatDetails_assigneeable) - GetAssigningTeam()(Teamable) + GetAssigningTeam()(CopilotSeatDetails_CopilotSeatDetails_assigning_teamable) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastActivityAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastActivityEditor()(*string) + GetOrganization()(CopilotSeatDetails_organizationable) GetPendingCancellationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) SetAssignee(value CopilotSeatDetails_CopilotSeatDetails_assigneeable)() - SetAssigningTeam(value Teamable)() + SetAssigningTeam(value CopilotSeatDetails_CopilotSeatDetails_assigning_teamable)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastActivityAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastActivityEditor(value *string)() + SetOrganization(value CopilotSeatDetails_organizationable)() SetPendingCancellationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() } diff --git a/pkg/github/models/copilot_seat_details_organization.go b/pkg/github/models/copilot_seat_details_organization.go new file mode 100644 index 00000000..9ef2e105 --- /dev/null +++ b/pkg/github/models/copilot_seat_details_organization.go @@ -0,0 +1,52 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopilotSeatDetails_organization the organization to which this seat belongs. +type CopilotSeatDetails_organization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewCopilotSeatDetails_organization instantiates a new CopilotSeatDetails_organization and sets the default values. +func NewCopilotSeatDetails_organization()(*CopilotSeatDetails_organization) { + m := &CopilotSeatDetails_organization{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCopilotSeatDetails_organizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCopilotSeatDetails_organizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopilotSeatDetails_organization(), 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. +// returns a map[string]any when successful +func (m *CopilotSeatDetails_organization) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CopilotSeatDetails_organization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *CopilotSeatDetails_organization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *CopilotSeatDetails_organization) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type CopilotSeatDetails_organizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/models/enterprise_team.go b/pkg/github/models/enterprise_team.go new file mode 100644 index 00000000..a05107ff --- /dev/null +++ b/pkg/github/models/enterprise_team.go @@ -0,0 +1,343 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnterpriseTeam group of enterprise owners and/or members +type EnterpriseTeam 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 created_at property + created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The group_id property + group_id *int32 + // The html_url property + html_url *string + // The id property + id *int32 + // The members_url property + members_url *string + // The name property + name *string + // The slug property + slug *string + // The sync_to_organizations property + sync_to_organizations *string + // The updated_at property + updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The url property + url *string +} +// NewEnterpriseTeam instantiates a new EnterpriseTeam and sets the default values. +func NewEnterpriseTeam()(*EnterpriseTeam) { + m := &EnterpriseTeam{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateEnterpriseTeamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateEnterpriseTeamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnterpriseTeam(), 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. +// returns a map[string]any when successful +func (m *EnterpriseTeam) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCreatedAt gets the created_at property value. The created_at property +// returns a *Time when successful +func (m *EnterpriseTeam) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.created_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *EnterpriseTeam) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedAt(val) + } + return nil + } + res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHtmlUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembersUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["slug"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSlug(val) + } + return nil + } + res["sync_to_organizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncToOrganizations(val) + } + return nil + } + res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedAt(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetGroupId gets the group_id property value. The group_id property +// returns a *int32 when successful +func (m *EnterpriseTeam) GetGroupId()(*int32) { + return m.group_id +} +// GetHtmlUrl gets the html_url property value. The html_url property +// returns a *string when successful +func (m *EnterpriseTeam) GetHtmlUrl()(*string) { + return m.html_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *EnterpriseTeam) GetId()(*int32) { + return m.id +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *EnterpriseTeam) GetMembersUrl()(*string) { + return m.members_url +} +// GetName gets the name property value. The name property +// returns a *string when successful +func (m *EnterpriseTeam) GetName()(*string) { + return m.name +} +// GetSlug gets the slug property value. The slug property +// returns a *string when successful +func (m *EnterpriseTeam) GetSlug()(*string) { + return m.slug +} +// GetSyncToOrganizations gets the sync_to_organizations property value. The sync_to_organizations property +// returns a *string when successful +func (m *EnterpriseTeam) GetSyncToOrganizations()(*string) { + return m.sync_to_organizations +} +// GetUpdatedAt gets the updated_at property value. The updated_at property +// returns a *Time when successful +func (m *EnterpriseTeam) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updated_at +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *EnterpriseTeam) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *EnterpriseTeam) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("group_id", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("html_url", m.GetHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("slug", m.GetSlug()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sync_to_organizations", m.GetSyncToOrganizations()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + 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 *EnterpriseTeam) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCreatedAt sets the created_at property value. The created_at property +func (m *EnterpriseTeam) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.created_at = value +} +// SetGroupId sets the group_id property value. The group_id property +func (m *EnterpriseTeam) SetGroupId(value *int32)() { + m.group_id = value +} +// SetHtmlUrl sets the html_url property value. The html_url property +func (m *EnterpriseTeam) SetHtmlUrl(value *string)() { + m.html_url = value +} +// SetId sets the id property value. The id property +func (m *EnterpriseTeam) SetId(value *int32)() { + m.id = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *EnterpriseTeam) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetName sets the name property value. The name property +func (m *EnterpriseTeam) SetName(value *string)() { + m.name = value +} +// SetSlug sets the slug property value. The slug property +func (m *EnterpriseTeam) SetSlug(value *string)() { + m.slug = value +} +// SetSyncToOrganizations sets the sync_to_organizations property value. The sync_to_organizations property +func (m *EnterpriseTeam) SetSyncToOrganizations(value *string)() { + m.sync_to_organizations = value +} +// SetUpdatedAt sets the updated_at property value. The updated_at property +func (m *EnterpriseTeam) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updated_at = value +} +// SetUrl sets the url property value. The url property +func (m *EnterpriseTeam) SetUrl(value *string)() { + m.url = value +} +type EnterpriseTeamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupId()(*int32) + GetHtmlUrl()(*string) + GetId()(*int32) + GetMembersUrl()(*string) + GetName()(*string) + GetSlug()(*string) + GetSyncToOrganizations()(*string) + GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUrl()(*string) + SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupId(value *int32)() + SetHtmlUrl(value *string)() + SetId(value *int32)() + SetMembersUrl(value *string)() + SetName(value *string)() + SetSlug(value *string)() + SetSyncToOrganizations(value *string)() + SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUrl(value *string)() +} diff --git a/pkg/github/models/org_custom_property_value_type.go b/pkg/github/models/org_custom_property_value_type.go index c81a64bb..7ad5c0ce 100644 --- a/pkg/github/models/org_custom_property_value_type.go +++ b/pkg/github/models/org_custom_property_value_type.go @@ -8,10 +8,12 @@ type OrgCustomProperty_value_type int const ( STRING_ORGCUSTOMPROPERTY_VALUE_TYPE OrgCustomProperty_value_type = iota SINGLE_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + MULTI_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + TRUE_FALSE_ORGCUSTOMPROPERTY_VALUE_TYPE ) func (i OrgCustomProperty_value_type) String() string { - return []string{"string", "single_select"}[i] + return []string{"string", "single_select", "multi_select", "true_false"}[i] } func ParseOrgCustomProperty_value_type(v string) (any, error) { result := STRING_ORGCUSTOMPROPERTY_VALUE_TYPE @@ -20,6 +22,10 @@ func ParseOrgCustomProperty_value_type(v string) (any, error) { result = STRING_ORGCUSTOMPROPERTY_VALUE_TYPE case "single_select": result = SINGLE_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + case "multi_select": + result = MULTI_SELECT_ORGCUSTOMPROPERTY_VALUE_TYPE + case "true_false": + result = TRUE_FALSE_ORGCUSTOMPROPERTY_VALUE_TYPE default: return 0, errors.New("Unknown OrgCustomProperty_value_type value: " + v) } diff --git a/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go b/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go index 8b1bf404..ab3ed2c9 100644 --- a/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go +++ b/pkg/github/orgs/item/properties/schema/item/with_custom_property_name_put_request_body_value_type.go @@ -8,10 +8,12 @@ type WithCustom_property_namePutRequestBody_value_type int const ( STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE WithCustom_property_namePutRequestBody_value_type = iota SINGLE_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + MULTI_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + TRUE_FALSE_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE ) func (i WithCustom_property_namePutRequestBody_value_type) String() string { - return []string{"string", "single_select"}[i] + return []string{"string", "single_select", "multi_select", "true_false"}[i] } func ParseWithCustom_property_namePutRequestBody_value_type(v string) (any, error) { result := STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE @@ -20,6 +22,10 @@ func ParseWithCustom_property_namePutRequestBody_value_type(v string) (any, erro result = STRING_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE case "single_select": result = SINGLE_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + case "multi_select": + result = MULTI_SELECT_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE + case "true_false": + result = TRUE_FALSE_WITHCUSTOM_PROPERTY_NAMEPUTREQUESTBODY_VALUE_TYPE default: return 0, errors.New("Unknown WithCustom_property_namePutRequestBody_value_type value: " + v) } diff --git a/pkg/github/orgs/item_copilot_billing_request_builder.go b/pkg/github/orgs/item_copilot_billing_request_builder.go index 04f54e13..ad18e5bf 100644 --- a/pkg/github/orgs/item_copilot_billing_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_request_builder.go @@ -23,7 +23,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 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 in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can configure and view details about the organization's Copilot Business subscription.OAuth app tokens and personal access tokens (classic) need 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 subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a CopilotOrganizationDetailsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -67,7 +67,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 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 in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can configure and view details about the organization's Copilot Business subscription.OAuth app tokens and personal access tokens (classic) need 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 subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_copilot_billing_seats_request_builder.go b/pkg/github/orgs/item_copilot_billing_seats_request_builder.go index 277e6441..ef228edb 100644 --- a/pkg/github/orgs/item_copilot_billing_seats_request_builder.go +++ b/pkg/github/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 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 or Enterprise subscription.OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. type ItemCopilotBillingSeatsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,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 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 or Enterprise subscription.OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// Get **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a ItemCopilotBillingSeatsGetResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -59,7 +59,7 @@ func (m *ItemCopilotBillingSeatsRequestBuilder) Get(ctx context.Context, request } return res.(ItemCopilotBillingSeatsGetResponseable), nil } -// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all Copilot 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 or Enterprise subscription.OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSeatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_copilot_billing_selected_teams_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_teams_request_builder.go index 179226a2..6cd021b4 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_teams_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_selected_teams_request_builder.go @@ -23,7 +23,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 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization.OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_teamsDeleteResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_teamsDeleteResponseable), nil } -// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can configure GitHub Copilot in their organization.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_teamsPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -81,7 +81,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_teamsPostResponseable), nil } -// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization.OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -93,7 +93,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 seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can configure GitHub Copilot in their organization.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_copilot_billing_selected_users_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_users_request_builder.go index 607716c0..aed7cc9f 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_users_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_selected_users_request_builder.go @@ -23,7 +23,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 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization.OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// Delete **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_usersDeleteResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_usersDeleteResponseable), nil } -// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can configure GitHub Copilot in their organization.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// Post **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_usersPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -81,7 +81,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_usersPostResponseable), nil } -// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can configure GitHub Copilot in their organization.OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// ToDeleteRequestInformation **Note**: This endpoint is in beta and is subject to change.Cancels the Copilot 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 pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -93,7 +93,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 seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can configure GitHub Copilot in their organization.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. +// ToPostRequestInformation **Note**: This endpoint is in beta and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".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/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_members_item_copilot_request_builder.go b/pkg/github/orgs/item_members_item_copilot_request_builder.go index a3ecc20a..1864647b 100644 --- a/pkg/github/orgs/item_members_item_copilot_request_builder.go +++ b/pkg/github/orgs/item_members_item_copilot_request_builder.go @@ -23,7 +23,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 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.OAuth app tokens and personal access tokens (classic) need 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 seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a CopilotSeatDetailsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemMembersItemCopilotRequestBuilder) Get(ctx context.Context, requestC } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable), nil } -// ToGetRequestInformation **Note**: This endpoint is in beta and is subject to change.Gets the GitHub Copilot 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.OAuth app tokens and personal access tokens (classic) need 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 seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemMembersItemCopilotRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_memberships_with_username_item_request_builder.go b/pkg/github/orgs/item_memberships_with_username_item_request_builder.go index 55cd1e0e..1dbd36a0 100644 --- a/pkg/github/orgs/item_memberships_with_username_item_request_builder.go +++ b/pkg/github/orgs/item_memberships_with_username_item_request_builder.go @@ -69,7 +69,7 @@ func (m *ItemMembershipsWithUsernameItemRequestBuilder) Get(ctx context.Context, } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgMembershipable), nil } -// Put only authenticated organization owners can add a member to the organization or update the member's role.* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.**Rate limits**To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. +// Put only authenticated organization owners can add a member to the organization or update the member's role.* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.**Rate limits**To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. // returns a OrgMembershipable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -110,7 +110,7 @@ func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToGetRequestInformation( requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPutRequestInformation only authenticated organization owners can add a member to the organization or update the member's role.* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.**Rate limits**To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. +// ToPutRequestInformation only authenticated organization owners can add a member to the organization or update the member's role.* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.**Rate limits**To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. // returns a *RequestInformation when successful func (m *ItemMembershipsWithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemMembershipsItemWithUsernamePutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_commits_request_builder.go b/pkg/github/repos/item_item_commits_request_builder.go index 06ff7b39..821a41c3 100644 --- a/pkg/github/repos/item_item_commits_request_builder.go +++ b/pkg/github/repos/item_item_commits_request_builder.go @@ -25,9 +25,9 @@ type ItemItemCommitsRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` // SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). Sha *string `uriparametername:"sha"` - // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + // Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. Since *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"since"` - // Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + // Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Due to limitations of Git, timestamps must be between 1970-01-01 and 2099-12-31 (inclusive) or unexpected results may be returned. Until *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time `uriparametername:"until"` } // ByCommit_shaId gets an item from the github.com/octokit/go-sdk/pkg/github.repos.item.item.commits.item collection