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 4, 2024
1 parent c140e26 commit 5a9f2c3
Show file tree
Hide file tree
Showing 9 changed files with 664 additions and 243 deletions.
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": "6D6707352559D66F205993CC48D594156D55EFB35A56C118DEA259E403B11A1CC8239DC18809BA5616176AEC54471E2525FC88993B1CDF9CC641762785A4D523",
"descriptionHash": "5FAA9A17936D273F78B3687421CFFC23344ED506C52677F79ADFF26BFABF57AD8D35CDB43EBF316E73301D91556EFAEEA073EF2DE56B07248D1BA4519BD3A706",
"descriptionLocation": "../../../../../schemas/api.github.com.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.18.0",
"kiotaVersion": "1.19.0",
"clientClassName": "ApiClient",
"typeAccessModifier": "Public",
"clientNamespaceName": "github.com/octokit/go-sdk/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
51 changes: 40 additions & 11 deletions pkg/github/models/validation_error_escaped_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ type ValidationError_errors struct {
// The value property
value ValidationError_errors_ValidationError_errors_valueable
}
// ValidationError_errors_ValidationError_errors_value composed type wrapper for classes int32, string
// ValidationError_errors_ValidationError_errors_value composed type wrapper for classes int32, string, []string
type ValidationError_errors_ValidationError_errors_value struct {
// Composed type representation for type int32
integer *int32
// Composed type representation for type []string
string []string
// Composed type representation for type string
string *string
validationError_errors_valueString *string
}
// NewValidationError_errors_ValidationError_errors_value instantiates a new ValidationError_errors_ValidationError_errors_value and sets the default values.
func NewValidationError_errors_ValidationError_errors_value()(*ValidationError_errors_ValidationError_errors_value) {
Expand Down Expand Up @@ -60,7 +62,18 @@ func CreateValidationError_errors_ValidationError_errors_valueFromDiscriminatorV
if err != nil {
return nil, err
}
result.SetString(val)
result.SetValidationErrorErrorsValueString(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
}
Expand All @@ -79,20 +92,30 @@ func (m *ValidationError_errors_ValidationError_errors_value) GetInteger()(*int3
func (m *ValidationError_errors_ValidationError_errors_value) GetIsComposedType()(bool) {
return true
}
// GetString gets the string property value. Composed type representation for type string
// returns a *string when successful
func (m *ValidationError_errors_ValidationError_errors_value) GetString()(*string) {
// GetString gets the string property value. Composed type representation for type []string
// returns a []string when successful
func (m *ValidationError_errors_ValidationError_errors_value) GetString()([]string) {
return m.string
}
// GetValidationErrorErrorsValueString gets the string property value. Composed type representation for type string
// returns a *string when successful
func (m *ValidationError_errors_ValidationError_errors_value) GetValidationErrorErrorsValueString()(*string) {
return m.validationError_errors_valueString
}
// Serialize serializes information the current object
func (m *ValidationError_errors_ValidationError_errors_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
if m.GetInteger() != nil {
err := writer.WriteInt32Value("", m.GetInteger())
if err != nil {
return err
}
} else if m.GetValidationErrorErrorsValueString() != nil {
err := writer.WriteStringValue("", m.GetValidationErrorErrorsValueString())
if err != nil {
return err
}
} else if m.GetString() != nil {
err := writer.WriteStringValue("", m.GetString())
err := writer.WriteCollectionOfStringValues("", m.GetString())
if err != nil {
return err
}
Expand All @@ -103,16 +126,22 @@ func (m *ValidationError_errors_ValidationError_errors_value) Serialize(writer i
func (m *ValidationError_errors_ValidationError_errors_value) SetInteger(value *int32)() {
m.integer = value
}
// SetString sets the string property value. Composed type representation for type string
func (m *ValidationError_errors_ValidationError_errors_value) SetString(value *string)() {
// SetString sets the string property value. Composed type representation for type []string
func (m *ValidationError_errors_ValidationError_errors_value) SetString(value []string)() {
m.string = value
}
// SetValidationErrorErrorsValueString sets the string property value. Composed type representation for type string
func (m *ValidationError_errors_ValidationError_errors_value) SetValidationErrorErrorsValueString(value *string)() {
m.validationError_errors_valueString = value
}
type ValidationError_errors_ValidationError_errors_valueable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetInteger()(*int32)
GetString()(*string)
GetString()([]string)
GetValidationErrorErrorsValueString()(*string)
SetInteger(value *int32)()
SetString(value *string)()
SetString(value []string)()
SetValidationErrorErrorsValueString(value *string)()
}
// NewValidationError_errors instantiates a new ValidationError_errors and sets the default values.
func NewValidationError_errors()(*ValidationError_errors) {
Expand Down
Loading

0 comments on commit 5a9f2c3

Please sign in to comment.