Skip to content

Commit

Permalink
feat: Updates to generated code
Browse files Browse the repository at this point in the history
* New updates to generated code

* New updates to generated code

* New updates to generated code

* New updates to generated code
  • Loading branch information
octokitbot authored Dec 23, 2024
1 parent 1e57ad0 commit f4e7631
Show file tree
Hide file tree
Showing 24 changed files with 4,631 additions and 2,675 deletions.
5,364 changes: 2,737 additions & 2,627 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": "F94BFB679AB485E50D630C793DF9DD71FCDED74ABEE8669F15904A391A069694B7A82A114CE9EEE6C825CC35F342C3175223C4D4D37837F8E4DAC3CCF6FC8005",
"descriptionHash": "227AA9495DA3105FF81582DD86965B767B1026AC103961C834D82B7C09FC012448B70C448DF745E5AAC9F194124DDC5D2B5AEA49E0734E7CF8DA37FFB4E5A523",
"descriptionLocation": "../../../../../schemas/ghec.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package models
type CodeScanningDefaultSetup_languages int

const (
CCPP_CODESCANNINGDEFAULTSETUP_LANGUAGES CodeScanningDefaultSetup_languages = iota
ACTIONS_CODESCANNINGDEFAULTSETUP_LANGUAGES CodeScanningDefaultSetup_languages = iota
CCPP_CODESCANNINGDEFAULTSETUP_LANGUAGES
CSHARP_CODESCANNINGDEFAULTSETUP_LANGUAGES
GO_CODESCANNINGDEFAULTSETUP_LANGUAGES
JAVAKOTLIN_CODESCANNINGDEFAULTSETUP_LANGUAGES
Expand All @@ -15,11 +16,13 @@ const (
)

func (i CodeScanningDefaultSetup_languages) String() string {
return []string{"c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "javascript", "python", "ruby", "typescript", "swift"}[i]
return []string{"actions", "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "javascript", "python", "ruby", "typescript", "swift"}[i]
}
func ParseCodeScanningDefaultSetup_languages(v string) (any, error) {
result := CCPP_CODESCANNINGDEFAULTSETUP_LANGUAGES
result := ACTIONS_CODESCANNINGDEFAULTSETUP_LANGUAGES
switch v {
case "actions":
result = ACTIONS_CODESCANNINGDEFAULTSETUP_LANGUAGES
case "c-cpp":
result = CCPP_CODESCANNINGDEFAULTSETUP_LANGUAGES
case "csharp":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package models
type CodeScanningDefaultSetupUpdate_languages int

const (
CCPP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES CodeScanningDefaultSetupUpdate_languages = iota
ACTIONS_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES CodeScanningDefaultSetupUpdate_languages = iota
CCPP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
CSHARP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
GO_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
JAVAKOTLIN_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
Expand All @@ -13,11 +14,13 @@ const (
)

func (i CodeScanningDefaultSetupUpdate_languages) String() string {
return []string{"c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"}[i]
return []string{"actions", "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"}[i]
}
func ParseCodeScanningDefaultSetupUpdate_languages(v string) (any, error) {
result := CCPP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
result := ACTIONS_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
switch v {
case "actions":
result = ACTIONS_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
case "c-cpp":
result = CCPP_CODESCANNINGDEFAULTSETUPUPDATE_LANGUAGES
case "csharp":
Expand Down
229 changes: 229 additions & 0 deletions pkg/github/models/org_private_registry_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
package models

import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)

// OrgPrivateRegistryConfiguration private registry configuration for an organization
type OrgPrivateRegistryConfiguration 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 created_at property
created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The name of the private registry configuration.
name *string
// The registry type.
registry_type *OrgPrivateRegistryConfiguration_registry_type
// The updated_at property
updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The username to use when authenticating with the private registry.
username *string
// Which type of organization repositories have access to the private registry.
visibility *OrgPrivateRegistryConfiguration_visibility
}
// NewOrgPrivateRegistryConfiguration instantiates a new OrgPrivateRegistryConfiguration and sets the default values.
func NewOrgPrivateRegistryConfiguration()(*OrgPrivateRegistryConfiguration) {
m := &OrgPrivateRegistryConfiguration{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateOrgPrivateRegistryConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateOrgPrivateRegistryConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewOrgPrivateRegistryConfiguration(), 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 *OrgPrivateRegistryConfiguration) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetCreatedAt gets the created_at property value. The created_at property
// returns a *Time when successful
func (m *OrgPrivateRegistryConfiguration) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.created_at
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *OrgPrivateRegistryConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetCreatedAt(val)
}
return nil
}
res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetName(val)
}
return nil
}
res["registry_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseOrgPrivateRegistryConfiguration_registry_type)
if err != nil {
return err
}
if val != nil {
m.SetRegistryType(val.(*OrgPrivateRegistryConfiguration_registry_type))
}
return nil
}
res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetUpdatedAt(val)
}
return nil
}
res["username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetUsername(val)
}
return nil
}
res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseOrgPrivateRegistryConfiguration_visibility)
if err != nil {
return err
}
if val != nil {
m.SetVisibility(val.(*OrgPrivateRegistryConfiguration_visibility))
}
return nil
}
return res
}
// GetName gets the name property value. The name of the private registry configuration.
// returns a *string when successful
func (m *OrgPrivateRegistryConfiguration) GetName()(*string) {
return m.name
}
// GetRegistryType gets the registry_type property value. The registry type.
// returns a *OrgPrivateRegistryConfiguration_registry_type when successful
func (m *OrgPrivateRegistryConfiguration) GetRegistryType()(*OrgPrivateRegistryConfiguration_registry_type) {
return m.registry_type
}
// GetUpdatedAt gets the updated_at property value. The updated_at property
// returns a *Time when successful
func (m *OrgPrivateRegistryConfiguration) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.updated_at
}
// GetUsername gets the username property value. The username to use when authenticating with the private registry.
// returns a *string when successful
func (m *OrgPrivateRegistryConfiguration) GetUsername()(*string) {
return m.username
}
// GetVisibility gets the visibility property value. Which type of organization repositories have access to the private registry.
// returns a *OrgPrivateRegistryConfiguration_visibility when successful
func (m *OrgPrivateRegistryConfiguration) GetVisibility()(*OrgPrivateRegistryConfiguration_visibility) {
return m.visibility
}
// Serialize serializes information the current object
func (m *OrgPrivateRegistryConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteTimeValue("created_at", m.GetCreatedAt())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("name", m.GetName())
if err != nil {
return err
}
}
if m.GetRegistryType() != nil {
cast := (*m.GetRegistryType()).String()
err := writer.WriteStringValue("registry_type", &cast)
if err != nil {
return err
}
}
{
err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("username", m.GetUsername())
if err != nil {
return err
}
}
if m.GetVisibility() != nil {
cast := (*m.GetVisibility()).String()
err := writer.WriteStringValue("visibility", &cast)
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 *OrgPrivateRegistryConfiguration) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetCreatedAt sets the created_at property value. The created_at property
func (m *OrgPrivateRegistryConfiguration) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
m.created_at = value
}
// SetName sets the name property value. The name of the private registry configuration.
func (m *OrgPrivateRegistryConfiguration) SetName(value *string)() {
m.name = value
}
// SetRegistryType sets the registry_type property value. The registry type.
func (m *OrgPrivateRegistryConfiguration) SetRegistryType(value *OrgPrivateRegistryConfiguration_registry_type)() {
m.registry_type = value
}
// SetUpdatedAt sets the updated_at property value. The updated_at property
func (m *OrgPrivateRegistryConfiguration) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
m.updated_at = value
}
// SetUsername sets the username property value. The username to use when authenticating with the private registry.
func (m *OrgPrivateRegistryConfiguration) SetUsername(value *string)() {
m.username = value
}
// SetVisibility sets the visibility property value. Which type of organization repositories have access to the private registry.
func (m *OrgPrivateRegistryConfiguration) SetVisibility(value *OrgPrivateRegistryConfiguration_visibility)() {
m.visibility = value
}
type OrgPrivateRegistryConfigurationable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetName()(*string)
GetRegistryType()(*OrgPrivateRegistryConfiguration_registry_type)
GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetUsername()(*string)
GetVisibility()(*OrgPrivateRegistryConfiguration_visibility)
SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetName(value *string)()
SetRegistryType(value *OrgPrivateRegistryConfiguration_registry_type)()
SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetUsername(value *string)()
SetVisibility(value *OrgPrivateRegistryConfiguration_visibility)()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package models
// The registry type.
type OrgPrivateRegistryConfiguration_registry_type int

const (
MAVEN_REPOSITORY_ORGPRIVATEREGISTRYCONFIGURATION_REGISTRY_TYPE OrgPrivateRegistryConfiguration_registry_type = iota
)

func (i OrgPrivateRegistryConfiguration_registry_type) String() string {
return []string{"maven_repository"}[i]
}
func ParseOrgPrivateRegistryConfiguration_registry_type(v string) (any, error) {
result := MAVEN_REPOSITORY_ORGPRIVATEREGISTRYCONFIGURATION_REGISTRY_TYPE
switch v {
case "maven_repository":
result = MAVEN_REPOSITORY_ORGPRIVATEREGISTRYCONFIGURATION_REGISTRY_TYPE
default:
return nil, nil
}
return &result, nil
}
func SerializeOrgPrivateRegistryConfiguration_registry_type(values []OrgPrivateRegistryConfiguration_registry_type) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i OrgPrivateRegistryConfiguration_registry_type) isMultiValue() bool {
return false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package models
// Which type of organization repositories have access to the private registry.
type OrgPrivateRegistryConfiguration_visibility int

const (
ALL_ORGPRIVATEREGISTRYCONFIGURATION_VISIBILITY OrgPrivateRegistryConfiguration_visibility = iota
PRIVATE_ORGPRIVATEREGISTRYCONFIGURATION_VISIBILITY
SELECTED_ORGPRIVATEREGISTRYCONFIGURATION_VISIBILITY
)

func (i OrgPrivateRegistryConfiguration_visibility) String() string {
return []string{"all", "private", "selected"}[i]
}
func ParseOrgPrivateRegistryConfiguration_visibility(v string) (any, error) {
result := ALL_ORGPRIVATEREGISTRYCONFIGURATION_VISIBILITY
switch v {
case "all":
result = ALL_ORGPRIVATEREGISTRYCONFIGURATION_VISIBILITY
case "private":
result = PRIVATE_ORGPRIVATEREGISTRYCONFIGURATION_VISIBILITY
case "selected":
result = SELECTED_ORGPRIVATEREGISTRYCONFIGURATION_VISIBILITY
default:
return nil, nil
}
return &result, nil
}
func SerializeOrgPrivateRegistryConfiguration_visibility(values []OrgPrivateRegistryConfiguration_visibility) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i OrgPrivateRegistryConfiguration_visibility) isMultiValue() bool {
return false
}
Loading

0 comments on commit f4e7631

Please sign in to comment.