-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHES 3.11: Changes in generated code (#92)
* New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code
- Loading branch information
1 parent
2aeb32c
commit 168e99f
Showing
10 changed files
with
2,875 additions
and
2,146 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
package models | ||
|
||
import ( | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" | ||
) | ||
|
||
type Users_matches 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 indices property | ||
indices []int32 | ||
// The text property | ||
text *string | ||
} | ||
// NewUsers_matches instantiates a new Users_matches and sets the default values. | ||
func NewUsers_matches()(*Users_matches) { | ||
m := &Users_matches{ | ||
} | ||
m.SetAdditionalData(make(map[string]any)) | ||
return m | ||
} | ||
// CreateUsers_matchesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value | ||
// returns a Parsable when successful | ||
func CreateUsers_matchesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { | ||
return NewUsers_matches(), 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 *Users_matches) 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 *Users_matches) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { | ||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) | ||
res["indices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetCollectionOfPrimitiveValues("int32") | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
res := make([]int32, len(val)) | ||
for i, v := range val { | ||
if v != nil { | ||
res[i] = *(v.(*int32)) | ||
} | ||
} | ||
m.SetIndices(res) | ||
} | ||
return nil | ||
} | ||
res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetStringValue() | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
m.SetText(val) | ||
} | ||
return nil | ||
} | ||
return res | ||
} | ||
// GetIndices gets the indices property value. The indices property | ||
// returns a []int32 when successful | ||
func (m *Users_matches) GetIndices()([]int32) { | ||
return m.indices | ||
} | ||
// GetText gets the text property value. The text property | ||
// returns a *string when successful | ||
func (m *Users_matches) GetText()(*string) { | ||
return m.text | ||
} | ||
// Serialize serializes information the current object | ||
func (m *Users_matches) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { | ||
if m.GetIndices() != nil { | ||
err := writer.WriteCollectionOfInt32Values("indices", m.GetIndices()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
{ | ||
err := writer.WriteStringValue("text", m.GetText()) | ||
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 *Users_matches) SetAdditionalData(value map[string]any)() { | ||
m.additionalData = value | ||
} | ||
// SetIndices sets the indices property value. The indices property | ||
func (m *Users_matches) SetIndices(value []int32)() { | ||
m.indices = value | ||
} | ||
// SetText sets the text property value. The text property | ||
func (m *Users_matches) SetText(value *string)() { | ||
m.text = value | ||
} | ||
type Users_matchesable interface { | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable | ||
GetIndices()([]int32) | ||
GetText()(*string) | ||
SetIndices(value []int32)() | ||
SetText(value *string)() | ||
} |
Oops, something went wrong.