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 Aug 22, 2024
1 parent d642a6b commit 76f3047
Show file tree
Hide file tree
Showing 7 changed files with 2,300 additions and 2,267 deletions.
4,278 changes: 2,065 additions & 2,213 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": "86C5D11D01116E2C1F2A835544126745671AC771F3A1AF1A01B9054F627A35ECF647D8D0084D5A4ACA4E89A7FF6FCCC2AE8134A146CA201FFDBC25D2B925E708",
"descriptionHash": "6CA137E1F68B10CB479F25A8C8834292DE7E77CD31EED411A6F07ADC2F822AE77386DA8282A349AA08AA0C97D296A957F77EF5F0BD685754B62676BE2E75A07A",
"descriptionLocation": "../../../../../schemas/ghes-3.12.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
Expand Down
16 changes: 8 additions & 8 deletions pkg/github/models/check_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type CheckRun struct {
// The html_url property
html_url *string
// The id of the check.
id *int32
id *int64
// The name of the check.
name *string
// The node_id property
Expand Down Expand Up @@ -191,7 +191,7 @@ func (m *CheckRun) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896
return nil
}
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
val, err := n.GetInt64Value()
if err != nil {
return err
}
Expand Down Expand Up @@ -289,8 +289,8 @@ func (m *CheckRun) GetHtmlUrl()(*string) {
return m.html_url
}
// GetId gets the id property value. The id of the check.
// returns a *int32 when successful
func (m *CheckRun) GetId()(*int32) {
// returns a *int64 when successful
func (m *CheckRun) GetId()(*int64) {
return m.id
}
// GetName gets the name property value. The name of the check.
Expand Down Expand Up @@ -386,7 +386,7 @@ func (m *CheckRun) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01
}
}
{
err := writer.WriteInt32Value("id", m.GetId())
err := writer.WriteInt64Value("id", m.GetId())
if err != nil {
return err
}
Expand Down Expand Up @@ -489,7 +489,7 @@ func (m *CheckRun) SetHtmlUrl(value *string)() {
m.html_url = value
}
// SetId sets the id property value. The id of the check.
func (m *CheckRun) SetId(value *int32)() {
func (m *CheckRun) SetId(value *int64)() {
m.id = value
}
// SetName sets the name property value. The name of the check.
Expand Down Expand Up @@ -532,7 +532,7 @@ type CheckRunable interface {
GetExternalId()(*string)
GetHeadSha()(*string)
GetHtmlUrl()(*string)
GetId()(*int32)
GetId()(*int64)
GetName()(*string)
GetNodeId()(*string)
GetOutput()(CheckRun_outputable)
Expand All @@ -549,7 +549,7 @@ type CheckRunable interface {
SetExternalId(value *string)()
SetHeadSha(value *string)()
SetHtmlUrl(value *string)()
SetId(value *int32)()
SetId(value *int64)()
SetName(value *string)()
SetNodeId(value *string)()
SetOutput(value CheckRun_outputable)()
Expand Down
152 changes: 111 additions & 41 deletions pkg/github/models/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ 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
// Whether this email address is the primary address.
primary *bool
// The type of email address.
typeEscaped *string
// The email address.
value *string
// 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
}
// NewUsers instantiates a new Users and sets the default values.
func NewUsers()(*Users) {
Expand All @@ -35,69 +39,123 @@ 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["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
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()
if err != nil {
return err
}
if val != nil {
m.SetPrimary(val)
m.SetObjectType(val)
}
return nil
}
res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTypeEscaped(val)
m.SetObjectUrl(val)
}
return nil
}
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetValue(val)
m.SetProperty(val)
}
return nil
}
return res
}
// 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
// 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
}
// GetTypeEscaped gets the type property value. The type of email address.
// GetObjectUrl gets the object_url property value. The object_url property
// returns a *string when successful
func (m *Users) GetTypeEscaped()(*string) {
return m.typeEscaped
func (m *Users) GetObjectUrl()(*string) {
return m.object_url
}
// GetValue gets the value property value. The email address.
// GetProperty gets the property property value. The property property
// returns a *string when successful
func (m *Users) GetValue()(*string) {
return m.value
func (m *Users) GetProperty()(*string) {
return m.property
}
// Serialize serializes information the current object
func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteBoolValue("primary", m.GetPrimary())
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())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("type", m.GetTypeEscaped())
err := writer.WriteStringValue("object_url", m.GetObjectUrl())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("value", m.GetValue())
err := writer.WriteStringValue("property", m.GetProperty())
if err != nil {
return err
}
Expand All @@ -114,25 +172,37 @@ func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4
func (m *Users) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetPrimary sets the primary property value. Whether this email address is the primary address.
func (m *Users) SetPrimary(value *bool)() {
m.primary = 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
}
// SetTypeEscaped sets the type property value. The type of email address.
func (m *Users) SetTypeEscaped(value *string)() {
m.typeEscaped = value
// SetObjectUrl sets the object_url property value. The object_url property
func (m *Users) SetObjectUrl(value *string)() {
m.object_url = value
}
// SetValue sets the value property value. The email address.
func (m *Users) SetValue(value *string)() {
m.value = value
// SetProperty sets the property property value. The property property
func (m *Users) SetProperty(value *string)() {
m.property = value
}
type Usersable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetPrimary()(*bool)
GetTypeEscaped()(*string)
GetValue()(*string)
SetPrimary(value *bool)()
SetTypeEscaped(value *string)()
SetValue(value *string)()
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)()
}
Loading

0 comments on commit 76f3047

Please sign in to comment.