diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 66eca5d6..f96df248 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "465ACB0611A29503ADB35236C24DE46088E11661E09BED91171E887E64A53313F9B1AD12A52B1DC1B29964EA8AE35C9D0E1A62C8CB950C389D038DFDF6942163", + "descriptionHash": "66C48296D32F2DF7B89235D036841D14E635F5F8D2617BD66FD09D9814A17B81ADD1E1B95EA6C8A8521D0C42FBB5B557F8B1A0A7413EB39A465FC4487E3EE5D1", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.18.0", diff --git a/pkg/github/models/copilot_seat_details.go b/pkg/github/models/copilot_seat_details.go index 87e1c2b1..1740790e 100644 --- a/pkg/github/models/copilot_seat_details.go +++ b/pkg/github/models/copilot_seat_details.go @@ -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. @@ -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. @@ -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. @@ -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 } @@ -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 } @@ -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. @@ -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. @@ -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. @@ -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)() } diff --git a/pkg/github/models/copilot_seat_details_escaped_assignee.go b/pkg/github/models/copilot_seat_details_escaped_assignee.go deleted file mode 100644 index 1daa439e..00000000 --- a/pkg/github/models/copilot_seat_details_escaped_assignee.go +++ /dev/null @@ -1,52 +0,0 @@ -package models - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" -) - -// CopilotSeatDetails_assignee the assignee that has been granted access to GitHub Copilot. -type CopilotSeatDetails_assignee 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_assignee instantiates a new CopilotSeatDetails_assignee and sets the default values. -func NewCopilotSeatDetails_assignee()(*CopilotSeatDetails_assignee) { - m := &CopilotSeatDetails_assignee{ - } - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateCopilotSeatDetails_assigneeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateCopilotSeatDetails_assigneeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewCopilotSeatDetails_assignee(), 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_assignee) 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_assignee) 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_assignee) 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_assignee) SetAdditionalData(value map[string]any)() { - m.additionalData = value -} -type CopilotSeatDetails_assigneeable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable -} diff --git a/pkg/github/models/copilot_seat_details_escaped_organization.go b/pkg/github/models/copilot_seat_details_escaped_organization.go deleted file mode 100644 index 9ef2e105..00000000 --- a/pkg/github/models/copilot_seat_details_escaped_organization.go +++ /dev/null @@ -1,52 +0,0 @@ -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/nullable_organization_simple.go b/pkg/github/models/nullable_organization_simple.go new file mode 100644 index 00000000..e2b10fb6 --- /dev/null +++ b/pkg/github/models/nullable_organization_simple.go @@ -0,0 +1,400 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NullableOrganizationSimple a GitHub organization. +type NullableOrganizationSimple 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 avatar_url property + avatar_url *string + // The description property + description *string + // The events_url property + events_url *string + // The hooks_url property + hooks_url *string + // The id property + id *int32 + // The issues_url property + issues_url *string + // The login property + login *string + // The members_url property + members_url *string + // The node_id property + node_id *string + // The public_members_url property + public_members_url *string + // The repos_url property + repos_url *string + // The url property + url *string +} +// NewNullableOrganizationSimple instantiates a new NullableOrganizationSimple and sets the default values. +func NewNullableOrganizationSimple()(*NullableOrganizationSimple) { + m := &NullableOrganizationSimple{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateNullableOrganizationSimpleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateNullableOrganizationSimpleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNullableOrganizationSimple(), 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 *NullableOrganizationSimple) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAvatarUrl gets the avatar_url property value. The avatar_url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetAvatarUrl()(*string) { + return m.avatar_url +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetDescription()(*string) { + return m.description +} +// GetEventsUrl gets the events_url property value. The events_url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetEventsUrl()(*string) { + return m.events_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *NullableOrganizationSimple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvatarUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["events_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventsUrl(val) + } + return nil + } + res["hooks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHooksUrl(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["issues_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuesUrl(val) + } + return nil + } + res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogin(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["node_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNodeId(val) + } + return nil + } + res["public_members_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicMembersUrl(val) + } + return nil + } + res["repos_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReposUrl(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 +} +// GetHooksUrl gets the hooks_url property value. The hooks_url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetHooksUrl()(*string) { + return m.hooks_url +} +// GetId gets the id property value. The id property +// returns a *int32 when successful +func (m *NullableOrganizationSimple) GetId()(*int32) { + return m.id +} +// GetIssuesUrl gets the issues_url property value. The issues_url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetIssuesUrl()(*string) { + return m.issues_url +} +// GetLogin gets the login property value. The login property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetLogin()(*string) { + return m.login +} +// GetMembersUrl gets the members_url property value. The members_url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetMembersUrl()(*string) { + return m.members_url +} +// GetNodeId gets the node_id property value. The node_id property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetNodeId()(*string) { + return m.node_id +} +// GetPublicMembersUrl gets the public_members_url property value. The public_members_url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetPublicMembersUrl()(*string) { + return m.public_members_url +} +// GetReposUrl gets the repos_url property value. The repos_url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetReposUrl()(*string) { + return m.repos_url +} +// GetUrl gets the url property value. The url property +// returns a *string when successful +func (m *NullableOrganizationSimple) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *NullableOrganizationSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("events_url", m.GetEventsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hooks_url", m.GetHooksUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issues_url", m.GetIssuesUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("login", m.GetLogin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("members_url", m.GetMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("node_id", m.GetNodeId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("public_members_url", m.GetPublicMembersUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repos_url", m.GetReposUrl()) + 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 *NullableOrganizationSimple) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAvatarUrl sets the avatar_url property value. The avatar_url property +func (m *NullableOrganizationSimple) SetAvatarUrl(value *string)() { + m.avatar_url = value +} +// SetDescription sets the description property value. The description property +func (m *NullableOrganizationSimple) SetDescription(value *string)() { + m.description = value +} +// SetEventsUrl sets the events_url property value. The events_url property +func (m *NullableOrganizationSimple) SetEventsUrl(value *string)() { + m.events_url = value +} +// SetHooksUrl sets the hooks_url property value. The hooks_url property +func (m *NullableOrganizationSimple) SetHooksUrl(value *string)() { + m.hooks_url = value +} +// SetId sets the id property value. The id property +func (m *NullableOrganizationSimple) SetId(value *int32)() { + m.id = value +} +// SetIssuesUrl sets the issues_url property value. The issues_url property +func (m *NullableOrganizationSimple) SetIssuesUrl(value *string)() { + m.issues_url = value +} +// SetLogin sets the login property value. The login property +func (m *NullableOrganizationSimple) SetLogin(value *string)() { + m.login = value +} +// SetMembersUrl sets the members_url property value. The members_url property +func (m *NullableOrganizationSimple) SetMembersUrl(value *string)() { + m.members_url = value +} +// SetNodeId sets the node_id property value. The node_id property +func (m *NullableOrganizationSimple) SetNodeId(value *string)() { + m.node_id = value +} +// SetPublicMembersUrl sets the public_members_url property value. The public_members_url property +func (m *NullableOrganizationSimple) SetPublicMembersUrl(value *string)() { + m.public_members_url = value +} +// SetReposUrl sets the repos_url property value. The repos_url property +func (m *NullableOrganizationSimple) SetReposUrl(value *string)() { + m.repos_url = value +} +// SetUrl sets the url property value. The url property +func (m *NullableOrganizationSimple) SetUrl(value *string)() { + m.url = value +} +type NullableOrganizationSimpleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvatarUrl()(*string) + GetDescription()(*string) + GetEventsUrl()(*string) + GetHooksUrl()(*string) + GetId()(*int32) + GetIssuesUrl()(*string) + GetLogin()(*string) + GetMembersUrl()(*string) + GetNodeId()(*string) + GetPublicMembersUrl()(*string) + GetReposUrl()(*string) + GetUrl()(*string) + SetAvatarUrl(value *string)() + SetDescription(value *string)() + SetEventsUrl(value *string)() + SetHooksUrl(value *string)() + SetId(value *int32)() + SetIssuesUrl(value *string)() + SetLogin(value *string)() + SetMembersUrl(value *string)() + SetNodeId(value *string)() + SetPublicMembersUrl(value *string)() + SetReposUrl(value *string)() + SetUrl(value *string)() +} diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body.go similarity index 78% rename from pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body_member1.go rename to pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body.go index 5ce1f77b..bdc5a83d 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body_member1.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_delete_request_body.go @@ -4,37 +4,37 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 struct { +type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody 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 GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. apps []string } -// NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 and sets the default values. -func NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) { - m := &ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1{ +// NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody()(*ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody) { + m := &ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(), nil +func CreateItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody(), 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 *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) GetAdditionalData()(map[string]any) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody) GetAdditionalData()(map[string]any) { return m.additionalData } // GetApps gets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. // returns a []string when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) GetApps()([]string) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody) GetApps()([]string) { return m.apps } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -55,7 +55,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) return res } // Serialize serializes information the current object -func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetApps() != nil { err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) if err != nil { @@ -71,14 +71,14 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) 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 *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) SetAdditionalData(value map[string]any)() { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetApps sets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. -func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1) SetApps(value []string)() { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBody) SetApps(value []string)() { m.apps = value } -type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able interface { +type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetApps()([]string) diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body.go similarity index 78% rename from pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body_member1.go rename to pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body.go index a099409b..afc3c259 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body_member1.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_post_request_body.go @@ -4,37 +4,37 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 struct { +type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody 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 GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. apps []string } -// NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 and sets the default values. -func NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) { - m := &ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1{ +// NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody()(*ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody) { + m := &ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(), nil +func CreateItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody(), 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 *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) GetAdditionalData()(map[string]any) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody) GetAdditionalData()(map[string]any) { return m.additionalData } // GetApps gets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. // returns a []string when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) GetApps()([]string) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody) GetApps()([]string) { return m.apps } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -55,7 +55,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) G return res } // Serialize serializes information the current object -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetApps() != nil { err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) if err != nil { @@ -71,14 +71,14 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) S 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 *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetApps sets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1) SetApps(value []string)() { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBody) SetApps(value []string)() { m.apps = value } -type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able interface { +type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetApps()([]string) diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body.go similarity index 78% rename from pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body_member1.go rename to pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body.go index 0e1ebc43..5668d2f6 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body_member1.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_put_request_body.go @@ -4,37 +4,37 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 struct { +type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody 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 GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. apps []string } -// NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 and sets the default values. -func NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) { - m := &ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1{ +// NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody()(*ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody) { + m := &ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(), nil +func CreateItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody(), 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 *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) GetAdditionalData()(map[string]any) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody) GetAdditionalData()(map[string]any) { return m.additionalData } // GetApps gets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. // returns a []string when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) GetApps()([]string) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody) GetApps()([]string) { return m.apps } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -55,7 +55,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) Ge return res } // Serialize serializes information the current object -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetApps() != nil { err := writer.WriteCollectionOfStringValues("apps", m.GetApps()) if err != nil { @@ -71,14 +71,14 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) Se 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 *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) SetAdditionalData(value map[string]any)() { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetApps sets the apps property value. The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. -func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1) SetApps(value []string)() { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBody) SetApps(value []string)() { m.apps = value } -type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able interface { +type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetApps()([]string) diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_request_builder.go index cae6efd9..18c36eb0 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_request_builder.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_apps_request_builder.go @@ -3,7 +3,6 @@ package repos import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" ) @@ -11,396 +10,6 @@ import ( type ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// AppsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able, string -type AppsDeleteRequestBody struct { - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able - appsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able - // Composed type representation for type string - appsDeleteRequestBodyString *string - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able - itemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able - // Composed type representation for type string - string *string -} -// NewAppsDeleteRequestBody instantiates a new AppsDeleteRequestBody and sets the default values. -func NewAppsDeleteRequestBody()(*AppsDeleteRequestBody) { - m := &AppsDeleteRequestBody{ - } - return m -} -// CreateAppsDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateAppsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewAppsDeleteRequestBody() - 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 { - } - } - } - if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetAppsDeleteRequestBodyString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetString(val) - } - return result, nil -} -// GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able when successful -func (m *AppsDeleteRequestBody) GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) { - return m.appsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 -} -// GetAppsDeleteRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *AppsDeleteRequestBody) GetAppsDeleteRequestBodyString()(*string) { - return m.appsDeleteRequestBodyString -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *AppsDeleteRequestBody) 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 *AppsDeleteRequestBody) GetIsComposedType()(bool) { - return true -} -// GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able when successful -func (m *AppsDeleteRequestBody) GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) { - return m.itemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 -} -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *AppsDeleteRequestBody) GetString()(*string) { - return m.string -} -// Serialize serializes information the current object -func (m *AppsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetAppsDeleteRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetAppsDeleteRequestBodyString()) - if err != nil { - return err - } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) - if err != nil { - return err - } - } - return nil -} -// SetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able -func (m *AppsDeleteRequestBody) SetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() { - m.appsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 = value -} -// SetAppsDeleteRequestBodyString sets the string property value. Composed type representation for type string -func (m *AppsDeleteRequestBody) SetAppsDeleteRequestBodyString(value *string)() { - m.appsDeleteRequestBodyString = value -} -// SetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able -func (m *AppsDeleteRequestBody) SetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() { - m.itemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1 = value -} -// SetString sets the string property value. Composed type representation for type string -func (m *AppsDeleteRequestBody) SetString(value *string)() { - m.string = value -} -// AppsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able, string -type AppsPostRequestBody struct { - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able - appsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able - // Composed type representation for type string - appsPostRequestBodyString *string - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able - itemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able - // Composed type representation for type string - string *string -} -// NewAppsPostRequestBody instantiates a new AppsPostRequestBody and sets the default values. -func NewAppsPostRequestBody()(*AppsPostRequestBody) { - m := &AppsPostRequestBody{ - } - return m -} -// CreateAppsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateAppsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewAppsPostRequestBody() - 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 { - } - } - } - if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetAppsPostRequestBodyString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetString(val) - } - return result, nil -} -// GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able when successful -func (m *AppsPostRequestBody) GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) { - return m.appsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 -} -// GetAppsPostRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *AppsPostRequestBody) GetAppsPostRequestBodyString()(*string) { - return m.appsPostRequestBodyString -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *AppsPostRequestBody) 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 *AppsPostRequestBody) GetIsComposedType()(bool) { - return true -} -// GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able when successful -func (m *AppsPostRequestBody) GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) { - return m.itemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 -} -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *AppsPostRequestBody) GetString()(*string) { - return m.string -} -// Serialize serializes information the current object -func (m *AppsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetAppsPostRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetAppsPostRequestBodyString()) - if err != nil { - return err - } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) - if err != nil { - return err - } - } - return nil -} -// SetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able -func (m *AppsPostRequestBody) SetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() { - m.appsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 = value -} -// SetAppsPostRequestBodyString sets the string property value. Composed type representation for type string -func (m *AppsPostRequestBody) SetAppsPostRequestBodyString(value *string)() { - m.appsPostRequestBodyString = value -} -// SetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able -func (m *AppsPostRequestBody) SetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() { - m.itemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1 = value -} -// SetString sets the string property value. Composed type representation for type string -func (m *AppsPostRequestBody) SetString(value *string)() { - m.string = value -} -// AppsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able, string -type AppsPutRequestBody struct { - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able - appsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able - // Composed type representation for type string - appsPutRequestBodyString *string - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able - itemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able - // Composed type representation for type string - string *string -} -// NewAppsPutRequestBody instantiates a new AppsPutRequestBody and sets the default values. -func NewAppsPutRequestBody()(*AppsPutRequestBody) { - m := &AppsPutRequestBody{ - } - return m -} -// CreateAppsPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateAppsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewAppsPutRequestBody() - 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 { - } - } - } - if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetAppsPutRequestBodyString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetString(val) - } - return result, nil -} -// GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able when successful -func (m *AppsPutRequestBody) GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) { - return m.appsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 -} -// GetAppsPutRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *AppsPutRequestBody) GetAppsPutRequestBodyString()(*string) { - return m.appsPutRequestBodyString -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *AppsPutRequestBody) 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 *AppsPutRequestBody) GetIsComposedType()(bool) { - return true -} -// GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able when successful -func (m *AppsPutRequestBody) GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) { - return m.itemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 -} -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *AppsPutRequestBody) GetString()(*string) { - return m.string -} -// Serialize serializes information the current object -func (m *AppsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetAppsPutRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetAppsPutRequestBodyString()) - if err != nil { - return err - } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) - if err != nil { - return err - } - } - return nil -} -// SetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able -func (m *AppsPutRequestBody) SetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() { - m.appsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 = value -} -// SetAppsPutRequestBodyString sets the string property value. Composed type representation for type string -func (m *AppsPutRequestBody) SetAppsPutRequestBodyString(value *string)() { - m.appsPutRequestBodyString = value -} -// SetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able -func (m *AppsPutRequestBody) SetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() { - m.itemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1 = value -} -// SetString sets the string property value. Composed type representation for type string -func (m *AppsPutRequestBody) SetString(value *string)() { - m.string = value -} -type AppsDeleteRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) - GetAppsDeleteRequestBodyString()(*string) - GetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able) - GetString()(*string) - SetAppsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() - SetAppsDeleteRequestBodyString(value *string)() - SetItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyMember1able)() - SetString(value *string)() -} -type AppsPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) - GetAppsPostRequestBodyString()(*string) - GetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able) - GetString()(*string) - SetAppsPostRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() - SetAppsPostRequestBodyString(value *string)() - SetItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyMember1able)() - SetString(value *string)() -} -type AppsPutRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) - GetAppsPutRequestBodyString()(*string) - GetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able) - GetString()(*string) - SetAppsPutRequestBodyItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() - SetAppsPutRequestBodyString(value *string)() - SetItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyMember1able)() - SetString(value *string)() -} // NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder and sets the default values. func NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) { m := &ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder{ @@ -420,7 +29,7 @@ func NewItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder(rawUrl stri // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions -func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Delete(ctx context.Context, body AppsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integrationable, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Delete(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integrationable, error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -472,7 +81,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Get(ctx c // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions -func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Post(ctx context.Context, body AppsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integrationable, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Post(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integrationable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -498,7 +107,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Post(ctx // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions -func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Put(ctx context.Context, body AppsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integrationable, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Put(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Integrationable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -520,7 +129,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) Put(ctx c } // ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of an app to push to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. // returns a *RequestInformation when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body AppsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsAppsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") @@ -540,7 +149,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToGetRequ } // ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified apps push access for this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. // returns a *RequestInformation when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body AppsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsAppsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") @@ -552,7 +161,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToPostReq } // ToPutRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. // returns a *RequestInformation when successful -func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToPutRequestInformation(ctx context.Context, body AppsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsAppsRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsAppsPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body.go similarity index 76% rename from pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body_member1.go rename to pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body.go index 9f01a921..d8395509 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body_member1.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_delete_request_body.go @@ -4,32 +4,32 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 struct { +type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody 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 username for users users []string } -// NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 and sets the default values. -func NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) { - m := &ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1{ +// NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody()(*ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody) { + m := &ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(), nil +func CreateItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody(), 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 *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) GetAdditionalData()(map[string]any) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody) 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 *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -51,11 +51,11 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 } // GetUsers gets the users property value. The username for users // returns a []string when successful -func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) GetUsers()([]string) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody) GetUsers()([]string) { return m.users } // Serialize serializes information the current object -func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetUsers() != nil { err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) if err != nil { @@ -71,14 +71,14 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 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 *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) SetAdditionalData(value map[string]any)() { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetUsers sets the users property value. The username for users -func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1) SetUsers(value []string)() { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBody) SetUsers(value []string)() { m.users = value } -type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able interface { +type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetUsers()([]string) diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body.go similarity index 76% rename from pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body_member1.go rename to pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body.go index 7f7e50e8..7e2d85e9 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body_member1.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_post_request_body.go @@ -4,32 +4,32 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 struct { +type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody 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 username for users users []string } -// NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 and sets the default values. -func NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) { - m := &ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1{ +// NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody()(*ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody) { + m := &ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(), nil +func CreateItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody(), 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 *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) GetAdditionalData()(map[string]any) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody) 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 *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -51,11 +51,11 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) } // GetUsers gets the users property value. The username for users // returns a []string when successful -func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) GetUsers()([]string) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody) GetUsers()([]string) { return m.users } // Serialize serializes information the current object -func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetUsers() != nil { err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) if err != nil { @@ -71,14 +71,14 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) 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 *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) SetAdditionalData(value map[string]any)() { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetUsers sets the users property value. The username for users -func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1) SetUsers(value []string)() { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBody) SetUsers(value []string)() { m.users = value } -type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able interface { +type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetUsers()([]string) diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body_member1.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body.go similarity index 76% rename from pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body_member1.go rename to pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body.go index b809f506..855e5452 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body_member1.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_put_request_body.go @@ -4,32 +4,32 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 struct { +type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody 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 username for users users []string } -// NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 and sets the default values. -func NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(*ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) { - m := &ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1{ +// NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody and sets the default values. +func NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody()(*ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody) { + m := &ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody{ } m.SetAdditionalData(make(map[string]any)) return m } -// CreateItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// CreateItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful -func CreateItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(), nil +func CreateItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody(), 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 *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) GetAdditionalData()(map[string]any) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody) 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 *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -51,11 +51,11 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) G } // GetUsers gets the users property value. The username for users // returns a []string when successful -func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) GetUsers()([]string) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody) GetUsers()([]string) { return m.users } // Serialize serializes information the current object -func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetUsers() != nil { err := writer.WriteCollectionOfStringValues("users", m.GetUsers()) if err != nil { @@ -71,14 +71,14 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) S 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 *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) SetAdditionalData(value map[string]any)() { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody) SetAdditionalData(value map[string]any)() { m.additionalData = value } // SetUsers sets the users property value. The username for users -func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1) SetUsers(value []string)() { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBody) SetUsers(value []string)() { m.users = value } -type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able interface { +type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetUsers()([]string) diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_request_builder.go index d59603ec..160d9136 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_users_request_builder.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_users_request_builder.go @@ -3,7 +3,6 @@ package repos import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" ) @@ -11,396 +10,6 @@ import ( type ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// UsersDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able, string -type UsersDeleteRequestBody struct { - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able - itemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able - // Composed type representation for type string - string *string - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able - usersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able - // Composed type representation for type string - usersDeleteRequestBodyString *string -} -// NewUsersDeleteRequestBody instantiates a new UsersDeleteRequestBody and sets the default values. -func NewUsersDeleteRequestBody()(*UsersDeleteRequestBody) { - m := &UsersDeleteRequestBody{ - } - return m -} -// CreateUsersDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateUsersDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewUsersDeleteRequestBody() - 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 { - } - } - } - if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetUsersDeleteRequestBodyString(val) - } - return result, nil -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *UsersDeleteRequestBody) 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 *UsersDeleteRequestBody) GetIsComposedType()(bool) { - return true -} -// GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able when successful -func (m *UsersDeleteRequestBody) GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) { - return m.itemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 -} -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *UsersDeleteRequestBody) GetString()(*string) { - return m.string -} -// GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able when successful -func (m *UsersDeleteRequestBody) GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) { - return m.usersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 -} -// GetUsersDeleteRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *UsersDeleteRequestBody) GetUsersDeleteRequestBodyString()(*string) { - return m.usersDeleteRequestBodyString -} -// Serialize serializes information the current object -func (m *UsersDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) - if err != nil { - return err - } - } else if m.GetUsersDeleteRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetUsersDeleteRequestBodyString()) - if err != nil { - return err - } - } - return nil -} -// SetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able -func (m *UsersDeleteRequestBody) SetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() { - m.itemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 = value -} -// SetString sets the string property value. Composed type representation for type string -func (m *UsersDeleteRequestBody) SetString(value *string)() { - m.string = value -} -// SetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able -func (m *UsersDeleteRequestBody) SetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() { - m.usersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1 = value -} -// SetUsersDeleteRequestBodyString sets the string property value. Composed type representation for type string -func (m *UsersDeleteRequestBody) SetUsersDeleteRequestBodyString(value *string)() { - m.usersDeleteRequestBodyString = value -} -// UsersPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able, string -type UsersPostRequestBody struct { - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able - itemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able - // Composed type representation for type string - string *string - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able - usersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able - // Composed type representation for type string - usersPostRequestBodyString *string -} -// NewUsersPostRequestBody instantiates a new UsersPostRequestBody and sets the default values. -func NewUsersPostRequestBody()(*UsersPostRequestBody) { - m := &UsersPostRequestBody{ - } - return m -} -// CreateUsersPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateUsersPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewUsersPostRequestBody() - 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 { - } - } - } - if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetUsersPostRequestBodyString(val) - } - return result, nil -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *UsersPostRequestBody) 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 *UsersPostRequestBody) GetIsComposedType()(bool) { - return true -} -// GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able when successful -func (m *UsersPostRequestBody) GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) { - return m.itemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 -} -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *UsersPostRequestBody) GetString()(*string) { - return m.string -} -// GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able when successful -func (m *UsersPostRequestBody) GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) { - return m.usersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 -} -// GetUsersPostRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *UsersPostRequestBody) GetUsersPostRequestBodyString()(*string) { - return m.usersPostRequestBodyString -} -// Serialize serializes information the current object -func (m *UsersPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) - if err != nil { - return err - } - } else if m.GetUsersPostRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetUsersPostRequestBodyString()) - if err != nil { - return err - } - } - return nil -} -// SetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able -func (m *UsersPostRequestBody) SetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() { - m.itemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 = value -} -// SetString sets the string property value. Composed type representation for type string -func (m *UsersPostRequestBody) SetString(value *string)() { - m.string = value -} -// SetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able -func (m *UsersPostRequestBody) SetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() { - m.usersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1 = value -} -// SetUsersPostRequestBodyString sets the string property value. Composed type representation for type string -func (m *UsersPostRequestBody) SetUsersPostRequestBodyString(value *string)() { - m.usersPostRequestBodyString = value -} -// UsersPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able, string -type UsersPutRequestBody struct { - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able - itemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able - // Composed type representation for type string - string *string - // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able - usersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able - // Composed type representation for type string - usersPutRequestBodyString *string -} -// NewUsersPutRequestBody instantiates a new UsersPutRequestBody and sets the default values. -func NewUsersPutRequestBody()(*UsersPutRequestBody) { - m := &UsersPutRequestBody{ - } - return m -} -// CreateUsersPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -// returns a Parsable when successful -func CreateUsersPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - result := NewUsersPutRequestBody() - 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 { - } - } - } - if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { - if err != nil { - return nil, err - } - result.SetUsersPutRequestBodyString(val) - } - return result, nil -} -// GetFieldDeserializers the deserialization information for the current model -// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful -func (m *UsersPutRequestBody) 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 *UsersPutRequestBody) GetIsComposedType()(bool) { - return true -} -// GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able when successful -func (m *UsersPutRequestBody) GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) { - return m.itemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 -} -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *UsersPutRequestBody) GetString()(*string) { - return m.string -} -// GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able -// returns a ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able when successful -func (m *UsersPutRequestBody) GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) { - return m.usersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 -} -// GetUsersPutRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *UsersPutRequestBody) GetUsersPutRequestBodyString()(*string) { - return m.usersPutRequestBodyString -} -// Serialize serializes information the current object -func (m *UsersPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1() != nil { - err := writer.WriteObjectValue("", m.GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()) - if err != nil { - return err - } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) - if err != nil { - return err - } - } else if m.GetUsersPutRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetUsersPutRequestBodyString()) - if err != nil { - return err - } - } - return nil -} -// SetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able -func (m *UsersPutRequestBody) SetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() { - m.itemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 = value -} -// SetString sets the string property value. Composed type representation for type string -func (m *UsersPutRequestBody) SetString(value *string)() { - m.string = value -} -// SetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able -func (m *UsersPutRequestBody) SetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() { - m.usersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1 = value -} -// SetUsersPutRequestBodyString sets the string property value. Composed type representation for type string -func (m *UsersPutRequestBody) SetUsersPutRequestBodyString(value *string)() { - m.usersPutRequestBodyString = value -} -type UsersDeleteRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) - GetString()(*string) - GetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able) - GetUsersDeleteRequestBodyString()(*string) - SetItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() - SetString(value *string)() - SetUsersDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyMember1able)() - SetUsersDeleteRequestBodyString(value *string)() -} -type UsersPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) - GetString()(*string) - GetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able) - GetUsersPostRequestBodyString()(*string) - SetItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() - SetString(value *string)() - SetUsersPostRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyMember1able)() - SetUsersPostRequestBodyString(value *string)() -} -type UsersPutRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) - GetString()(*string) - GetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able) - GetUsersPutRequestBodyString()(*string) - SetItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() - SetString(value *string)() - SetUsersPutRequestBodyItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyMember1able)() - SetUsersPutRequestBodyString(value *string)() -} // NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder and sets the default values. func NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) { m := &ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder{ @@ -420,7 +29,7 @@ func NewItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder(rawUrl str // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions -func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Delete(ctx context.Context, body UsersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SimpleUserable, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Delete(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SimpleUserable, error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -472,7 +81,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Get(ctx // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions -func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Post(ctx context.Context, body UsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SimpleUserable, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Post(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SimpleUserable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -498,7 +107,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Post(ctx // [API method documentation] // // [API method documentation]: https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions -func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Put(ctx context.Context, body UsersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SimpleUserable, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Put(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SimpleUserable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); if err != nil { return nil, err @@ -520,7 +129,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) Put(ctx } // ToDeleteRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Removes the ability of a user to push to this branch.| Type | Description || ------- | --------------------------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | // returns a *RequestInformation when successful -func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body UsersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsUsersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") @@ -540,7 +149,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToGetReq } // ToPostRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Grants the specified people push access for this branch.| Type | Description || ------- | ----------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | // returns a *RequestInformation when successful -func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToPostRequestInformation(ctx context.Context, body UsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsUsersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") @@ -552,7 +161,7 @@ func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToPostRe } // ToPutRequestInformation protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.| Type | Description || ------- | ----------------------------------------------------------------------------------------------------------------------------- || `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | // returns a *RequestInformation when successful -func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToPutRequestInformation(ctx context.Context, body UsersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *ItemItemBranchesItemProtectionRestrictionsUsersRequestBuilder) ToPutRequestInformation(ctx context.Context, body ItemItemBranchesItemProtectionRestrictionsUsersPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) requestInfo.Headers.TryAdd("Accept", "application/json") diff --git a/pkg/github/repos/item_item_check_runs_request_builder.go b/pkg/github/repos/item_item_check_runs_request_builder.go index 9cddfca9..b4268e5d 100644 --- a/pkg/github/repos/item_item_check_runs_request_builder.go +++ b/pkg/github/repos/item_item_check_runs_request_builder.go @@ -34,7 +34,7 @@ func NewCheckRunsPostRequestBody()(*CheckRunsPostRequestBody) { func CreateCheckRunsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { result := NewCheckRunsPostRequestBody() if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("") + mappingValueNode, err := parseNode.GetChildNode("status") if err != nil { return nil, err } diff --git a/pkg/github/repos/item_item_contents_with_path_item_request_builder.go b/pkg/github/repos/item_item_contents_with_path_item_request_builder.go index 6d1263e0..7ac19062 100644 --- a/pkg/github/repos/item_item_contents_with_path_item_request_builder.go +++ b/pkg/github/repos/item_item_contents_with_path_item_request_builder.go @@ -2,6 +2,7 @@ package repos import ( "context" + ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6 "strings" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" @@ -38,7 +39,7 @@ func NewWithPathGetResponse()(*WithPathGetResponse) { func CreateWithPathGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { result := NewWithPathGetResponse() if parseNode != nil { - mappingValueNode, err := parseNode.GetChildNode("") + mappingValueNode, err := parseNode.GetChildNode("type") if err != nil { return nil, err } @@ -48,6 +49,13 @@ func CreateWithPathGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d2 return nil, err } if mappingValue != nil { + if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "file") { + result.SetContentFile(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NewContentFile()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "submodule") { + result.SetContentSubmodule(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NewContentSubmodule()) + } else if ie967d16dae74a49b5e0e051225c5dac0d76e5e38f13dd1628028cbce108c25b6.EqualFold(*mappingValue, "symlink") { + result.SetContentSymlink(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.NewContentSymlink()) + } } } }