Skip to content

Commit

Permalink
New updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot committed Oct 11, 2024
1 parent ddaf977 commit 049b55e
Show file tree
Hide file tree
Showing 7 changed files with 2,053 additions and 2,456 deletions.
4,203 changes: 2,005 additions & 2,198 deletions pkg/github/.kiota.log

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "5E29A6CECA23378AE38B8762563DE30CB619E47B2DF5EB33EE80CEED5F2CCD82533988BE7E4810D5632BE7397B6D00DDE212F43514E330AA76EA804B00A29C95",
"descriptionHash": "7EC4749DFDE26AD6969C2AC334F2AB173EC4891A141915ED0452831F3F8FA298972A71FF189320AD6568E480CB42A21D5E9DB5D0F32EA288BB6CC5C60D2D445A",
"descriptionLocation": "../../../../../schemas/ghes-3.13.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
29 changes: 0 additions & 29 deletions pkg/github/models/organization_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ type OrganizationFull struct {
billing_email *string
// The blog property
blog *string
// The collaborators property
collaborators *int32
// The company property
company *string
// The created_at property
Expand Down Expand Up @@ -166,11 +164,6 @@ func (m *OrganizationFull) GetBillingEmail()(*string) {
func (m *OrganizationFull) GetBlog()(*string) {
return m.blog
}
// GetCollaborators gets the collaborators property value. The collaborators property
// returns a *int32 when successful
func (m *OrganizationFull) GetCollaborators()(*int32) {
return m.collaborators
}
// GetCompany gets the company property value. The company property
// returns a *string when successful
func (m *OrganizationFull) GetCompany()(*string) {
Expand Down Expand Up @@ -275,16 +268,6 @@ func (m *OrganizationFull) GetFieldDeserializers()(map[string]func(i878a80d2330e
}
return nil
}
res["collaborators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetCollaborators(val)
}
return nil
}
res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -1034,12 +1017,6 @@ func (m *OrganizationFull) Serialize(writer i878a80d2330e89d26896388a3f487eef27b
return err
}
}
{
err := writer.WriteInt32Value("collaborators", m.GetCollaborators())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("company", m.GetCompany())
if err != nil {
Expand Down Expand Up @@ -1378,10 +1355,6 @@ func (m *OrganizationFull) SetBillingEmail(value *string)() {
func (m *OrganizationFull) SetBlog(value *string)() {
m.blog = value
}
// SetCollaborators sets the collaborators property value. The collaborators property
func (m *OrganizationFull) SetCollaborators(value *int32)() {
m.collaborators = value
}
// SetCompany sets the company property value. The company property
func (m *OrganizationFull) SetCompany(value *string)() {
m.company = value
Expand Down Expand Up @@ -1594,7 +1567,6 @@ type OrganizationFullable interface {
GetAvatarUrl()(*string)
GetBillingEmail()(*string)
GetBlog()(*string)
GetCollaborators()(*int32)
GetCompany()(*string)
GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetDefaultRepositoryPermission()(*string)
Expand Down Expand Up @@ -1651,7 +1623,6 @@ type OrganizationFullable interface {
SetAvatarUrl(value *string)()
SetBillingEmail(value *string)()
SetBlog(value *string)()
SetCollaborators(value *int32)()
SetCompany(value *string)()
SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetDefaultRepositoryPermission(value *string)()
Expand Down
152 changes: 41 additions & 111 deletions pkg/github/models/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ import (
type Users 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 fragment property
fragment *string
// The matches property
matches []Users_matchesable
// The object_type property
object_type *string
// The object_url property
object_url *string
// The property property
property *string
// Whether this email address is the primary address.
primary *bool
// The type of email address.
typeEscaped *string
// The email address.
value *string
}
// NewUsers instantiates a new Users and sets the default values.
func NewUsers()(*Users) {
Expand All @@ -39,123 +35,69 @@ func (m *Users) GetAdditionalData()(map[string]any) {
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetFragment(val)
}
return nil
}
res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateUsers_matchesFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]Users_matchesable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(Users_matchesable)
}
}
m.SetMatches(res)
}
return nil
}
res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetObjectType(val)
m.SetPrimary(val)
}
return nil
}
res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetObjectUrl(val)
m.SetTypeEscaped(val)
}
return nil
}
res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetProperty(val)
m.SetValue(val)
}
return nil
}
return res
}
// GetFragment gets the fragment property value. The fragment property
// returns a *string when successful
func (m *Users) GetFragment()(*string) {
return m.fragment
}
// GetMatches gets the matches property value. The matches property
// returns a []Users_matchesable when successful
func (m *Users) GetMatches()([]Users_matchesable) {
return m.matches
}
// GetObjectType gets the object_type property value. The object_type property
// returns a *string when successful
func (m *Users) GetObjectType()(*string) {
return m.object_type
// GetPrimary gets the primary property value. Whether this email address is the primary address.
// returns a *bool when successful
func (m *Users) GetPrimary()(*bool) {
return m.primary
}
// GetObjectUrl gets the object_url property value. The object_url property
// GetTypeEscaped gets the type property value. The type of email address.
// returns a *string when successful
func (m *Users) GetObjectUrl()(*string) {
return m.object_url
func (m *Users) GetTypeEscaped()(*string) {
return m.typeEscaped
}
// GetProperty gets the property property value. The property property
// GetValue gets the value property value. The email address.
// returns a *string when successful
func (m *Users) GetProperty()(*string) {
return m.property
func (m *Users) GetValue()(*string) {
return m.value
}
// Serialize serializes information the current object
func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteStringValue("fragment", m.GetFragment())
if err != nil {
return err
}
}
if m.GetMatches() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches()))
for i, v := range m.GetMatches() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err := writer.WriteCollectionOfObjectValues("matches", cast)
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("object_type", m.GetObjectType())
err := writer.WriteBoolValue("primary", m.GetPrimary())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("object_url", m.GetObjectUrl())
err := writer.WriteStringValue("type", m.GetTypeEscaped())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("property", m.GetProperty())
err := writer.WriteStringValue("value", m.GetValue())
if err != nil {
return err
}
Expand All @@ -172,37 +114,25 @@ func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4
func (m *Users) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetFragment sets the fragment property value. The fragment property
func (m *Users) SetFragment(value *string)() {
m.fragment = value
}
// SetMatches sets the matches property value. The matches property
func (m *Users) SetMatches(value []Users_matchesable)() {
m.matches = value
}
// SetObjectType sets the object_type property value. The object_type property
func (m *Users) SetObjectType(value *string)() {
m.object_type = value
// SetPrimary sets the primary property value. Whether this email address is the primary address.
func (m *Users) SetPrimary(value *bool)() {
m.primary = value
}
// SetObjectUrl sets the object_url property value. The object_url property
func (m *Users) SetObjectUrl(value *string)() {
m.object_url = value
// SetTypeEscaped sets the type property value. The type of email address.
func (m *Users) SetTypeEscaped(value *string)() {
m.typeEscaped = value
}
// SetProperty sets the property property value. The property property
func (m *Users) SetProperty(value *string)() {
m.property = value
// SetValue sets the value property value. The email address.
func (m *Users) SetValue(value *string)() {
m.value = value
}
type Usersable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetFragment()(*string)
GetMatches()([]Users_matchesable)
GetObjectType()(*string)
GetObjectUrl()(*string)
GetProperty()(*string)
SetFragment(value *string)()
SetMatches(value []Users_matchesable)()
SetObjectType(value *string)()
SetObjectUrl(value *string)()
SetProperty(value *string)()
GetPrimary()(*bool)
GetTypeEscaped()(*string)
GetValue()(*string)
SetPrimary(value *bool)()
SetTypeEscaped(value *string)()
SetValue(value *string)()
}
Loading

0 comments on commit 049b55e

Please sign in to comment.