Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHES 3.13: Changes in generated code #94

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,116 changes: 2,153 additions & 1,963 deletions pkg/github/.kiota.log

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"descriptionHash": "A58B55D84B3AF26D7EDF01CE2518CA01A285E781E50C695FC76B1BF90AF95CCB0752D759B678448405DFFF69328B95BF6822830123313E5059C9FF4EAD1991CC",
"descriptionHash": "5E29A6CECA23378AE38B8762563DE30CB619E47B2DF5EB33EE80CEED5F2CCD82533988BE7E4810D5632BE7397B6D00DDE212F43514E330AA76EA804B00A29C95",
"descriptionLocation": "../../../../../schemas/ghes-3.13.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.18.0",
"kiotaVersion": "1.19.0",
"clientClassName": "ApiClient",
"typeAccessModifier": "Public",
"clientNamespaceName": "github.com/octokit/go-sdk-enterprise-server/pkg/github",
"language": "Go",
"usesBackingStore": false,
Expand Down
53 changes: 41 additions & 12 deletions pkg/github/models/custom_property.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ type CustomProperty struct {
// Who can edit the values of the property
values_editable_by *CustomProperty_values_editable_by
}
// CustomProperty_CustomProperty_default_value composed type wrapper for classes string
// CustomProperty_CustomProperty_default_value composed type wrapper for classes string, []string
type CustomProperty_CustomProperty_default_value struct {
// Composed type representation for type string
string *string
customProperty_default_valueString *string
// Composed type representation for type []string
string []string
}
// NewCustomProperty_CustomProperty_default_value instantiates a new CustomProperty_CustomProperty_default_value and sets the default values.
func NewCustomProperty_CustomProperty_default_value()(*CustomProperty_CustomProperty_default_value) {
Expand Down Expand Up @@ -58,10 +60,26 @@ func CreateCustomProperty_CustomProperty_default_valueFromDiscriminatorValue(par
if err != nil {
return nil, err
}
result.SetString(val)
result.SetCustomPropertyDefaultValueString(val)
} else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil {
if err != nil {
return nil, err
}
cast := make([]string, len(val))
for i, v := range val {
if v != nil {
cast[i] = *(v.(*string))
}
}
result.SetString(cast)
}
return result, nil
}
// GetCustomPropertyDefaultValueString gets the string property value. Composed type representation for type string
// returns a *string when successful
func (m *CustomProperty_CustomProperty_default_value) GetCustomPropertyDefaultValueString()(*string) {
return m.customProperty_default_valueString
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *CustomProperty_CustomProperty_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
Expand All @@ -72,29 +90,40 @@ func (m *CustomProperty_CustomProperty_default_value) GetFieldDeserializers()(ma
func (m *CustomProperty_CustomProperty_default_value) GetIsComposedType()(bool) {
return true
}
// GetString gets the string property value. Composed type representation for type string
// returns a *string when successful
func (m *CustomProperty_CustomProperty_default_value) GetString()(*string) {
// GetString gets the string property value. Composed type representation for type []string
// returns a []string when successful
func (m *CustomProperty_CustomProperty_default_value) GetString()([]string) {
return m.string
}
// Serialize serializes information the current object
func (m *CustomProperty_CustomProperty_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
if m.GetString() != nil {
err := writer.WriteStringValue("", m.GetString())
if m.GetCustomPropertyDefaultValueString() != nil {
err := writer.WriteStringValue("", m.GetCustomPropertyDefaultValueString())
if err != nil {
return err
}
} else if m.GetString() != nil {
err := writer.WriteCollectionOfStringValues("", m.GetString())
if err != nil {
return err
}
}
return nil
}
// SetString sets the string property value. Composed type representation for type string
func (m *CustomProperty_CustomProperty_default_value) SetString(value *string)() {
// SetCustomPropertyDefaultValueString sets the string property value. Composed type representation for type string
func (m *CustomProperty_CustomProperty_default_value) SetCustomPropertyDefaultValueString(value *string)() {
m.customProperty_default_valueString = value
}
// SetString sets the string property value. Composed type representation for type []string
func (m *CustomProperty_CustomProperty_default_value) SetString(value []string)() {
m.string = value
}
type CustomProperty_CustomProperty_default_valueable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetString()(*string)
SetString(value *string)()
GetCustomPropertyDefaultValueString()(*string)
GetString()([]string)
SetCustomPropertyDefaultValueString(value *string)()
SetString(value []string)()
}
// NewCustomProperty instantiates a new CustomProperty and sets the default values.
func NewCustomProperty()(*CustomProperty) {
Expand Down
53 changes: 41 additions & 12 deletions pkg/github/models/custom_property_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ type CustomPropertyValue struct {
// The value assigned to the property
value CustomPropertyValue_CustomPropertyValue_valueable
}
// CustomPropertyValue_CustomPropertyValue_value composed type wrapper for classes string
// CustomPropertyValue_CustomPropertyValue_value composed type wrapper for classes string, []string
type CustomPropertyValue_CustomPropertyValue_value struct {
// Composed type representation for type string
string *string
customPropertyValue_valueString *string
// Composed type representation for type []string
string []string
}
// NewCustomPropertyValue_CustomPropertyValue_value instantiates a new CustomPropertyValue_CustomPropertyValue_value and sets the default values.
func NewCustomPropertyValue_CustomPropertyValue_value()(*CustomPropertyValue_CustomPropertyValue_value) {
Expand Down Expand Up @@ -46,10 +48,26 @@ func CreateCustomPropertyValue_CustomPropertyValue_valueFromDiscriminatorValue(p
if err != nil {
return nil, err
}
result.SetString(val)
result.SetCustomPropertyValueValueString(val)
} else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil {
if err != nil {
return nil, err
}
cast := make([]string, len(val))
for i, v := range val {
if v != nil {
cast[i] = *(v.(*string))
}
}
result.SetString(cast)
}
return result, nil
}
// GetCustomPropertyValueValueString gets the string property value. Composed type representation for type string
// returns a *string when successful
func (m *CustomPropertyValue_CustomPropertyValue_value) GetCustomPropertyValueValueString()(*string) {
return m.customPropertyValue_valueString
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *CustomPropertyValue_CustomPropertyValue_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
Expand All @@ -60,29 +78,40 @@ func (m *CustomPropertyValue_CustomPropertyValue_value) GetFieldDeserializers()(
func (m *CustomPropertyValue_CustomPropertyValue_value) GetIsComposedType()(bool) {
return true
}
// GetString gets the string property value. Composed type representation for type string
// returns a *string when successful
func (m *CustomPropertyValue_CustomPropertyValue_value) GetString()(*string) {
// GetString gets the string property value. Composed type representation for type []string
// returns a []string when successful
func (m *CustomPropertyValue_CustomPropertyValue_value) GetString()([]string) {
return m.string
}
// Serialize serializes information the current object
func (m *CustomPropertyValue_CustomPropertyValue_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
if m.GetString() != nil {
err := writer.WriteStringValue("", m.GetString())
if m.GetCustomPropertyValueValueString() != nil {
err := writer.WriteStringValue("", m.GetCustomPropertyValueValueString())
if err != nil {
return err
}
} else if m.GetString() != nil {
err := writer.WriteCollectionOfStringValues("", m.GetString())
if err != nil {
return err
}
}
return nil
}
// SetString sets the string property value. Composed type representation for type string
func (m *CustomPropertyValue_CustomPropertyValue_value) SetString(value *string)() {
// SetCustomPropertyValueValueString sets the string property value. Composed type representation for type string
func (m *CustomPropertyValue_CustomPropertyValue_value) SetCustomPropertyValueValueString(value *string)() {
m.customPropertyValue_valueString = value
}
// SetString sets the string property value. Composed type representation for type []string
func (m *CustomPropertyValue_CustomPropertyValue_value) SetString(value []string)() {
m.string = value
}
type CustomPropertyValue_CustomPropertyValue_valueable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetString()(*string)
SetString(value *string)()
GetCustomPropertyValueValueString()(*string)
GetString()([]string)
SetCustomPropertyValueValueString(value *string)()
SetString(value []string)()
}
// NewCustomPropertyValue instantiates a new CustomPropertyValue and sets the default values.
func NewCustomPropertyValue()(*CustomPropertyValue) {
Expand Down
Loading
Loading