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

FEAT:| Added/Updated [NewFile_extension_restriction, CreateFile_extension_restrictionFromDiscriminatorValue, NewFile_extension_restriction_parameters, CreateFile_extension_restriction_parametersFromDiscriminatorValue, ParseFile_extension_restriction_type, SerializeFile_extension_restriction_type, NewFile_path_restriction, CreateFile_path_restrictionFromDiscriminatorValue, NewFile_path_restriction_parameters, CreateFile_path_restriction_parametersFromDiscriminatorValue, ParseFile_path_restriction_type, SerializeFile_path_restriction_type, NewMax_file_path_length, CreateMax_file_path_lengthFromDiscriminatorValue, NewMax_file_path_length_parameters, CreateMax_file_path_length_parametersFromDiscriminatorValue, ParseMax_file_path_length_type, SerializeMax_file_path_length_type, NewMax_file_size, CreateMax_file_sizeFromDiscriminatorValue, NewMax_file_size_parameters, CreateMax_file_size_parametersFromDiscriminatorValue, ParseMax_file_size_type, SerializeMax_file_size_type, repositories]| Removed [repositories] #66

Merged
merged 4 commits into from
Apr 29, 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 changes: 2 additions & 2 deletions pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"descriptionHash": "BD27C508C954F5550843E190C0723A085224F85958A33EA2309EAC88A1A2038C33E8BB4B3A579FB2B243133976FAE23A8DD8790C5C23C1B210DB16433937E6C4",
"descriptionHash": "C328689D5C13A5E7F9650D998FA71CCD1C5EB5C6D6B4E04DFD388F5D09F249D2009511E7A974CA0EE0BD07DF7FBF3DD789AA9B1234D384B09092F960FD78DF2C",
"descriptionLocation": "../../../source-generator/schemas/downloaded.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0-preview.202404180001",
"kiotaVersion": "1.14.0-preview.202404250001",
"clientClassName": "ApiClient",
"clientNamespaceName": "github.com/octokit/go-sdk/pkg/github/",
"language": "Go",
Expand Down
111 changes: 111 additions & 0 deletions pkg/github/models/file_extension_restriction.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
package models

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

// File_extension_restriction note: file_extension_restriction is in beta and subject to change.Prevent commits that include files with specified file extensions from being pushed to the commit graph.
type File_extension_restriction 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 parameters property
parameters File_extension_restriction_parametersable
// The type property
typeEscaped *File_extension_restriction_type
}
// NewFile_extension_restriction instantiates a new File_extension_restriction and sets the default values.
func NewFile_extension_restriction()(*File_extension_restriction) {
m := &File_extension_restriction{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateFile_extension_restrictionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateFile_extension_restrictionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewFile_extension_restriction(), 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 *File_extension_restriction) 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 *File_extension_restriction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateFile_extension_restriction_parametersFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetParameters(val.(File_extension_restriction_parametersable))
}
return nil
}
res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseFile_extension_restriction_type)
if err != nil {
return err
}
if val != nil {
m.SetTypeEscaped(val.(*File_extension_restriction_type))
}
return nil
}
return res
}
// GetParameters gets the parameters property value. The parameters property
// returns a File_extension_restriction_parametersable when successful
func (m *File_extension_restriction) GetParameters()(File_extension_restriction_parametersable) {
return m.parameters
}
// GetTypeEscaped gets the type property value. The type property
// returns a *File_extension_restriction_type when successful
func (m *File_extension_restriction) GetTypeEscaped()(*File_extension_restriction_type) {
return m.typeEscaped
}
// Serialize serializes information the current object
func (m *File_extension_restriction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteObjectValue("parameters", m.GetParameters())
if err != nil {
return err
}
}
if m.GetTypeEscaped() != nil {
cast := (*m.GetTypeEscaped()).String()
err := writer.WriteStringValue("type", &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 *File_extension_restriction) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetParameters sets the parameters property value. The parameters property
func (m *File_extension_restriction) SetParameters(value File_extension_restriction_parametersable)() {
m.parameters = value
}
// SetTypeEscaped sets the type property value. The type property
func (m *File_extension_restriction) SetTypeEscaped(value *File_extension_restriction_type)() {
m.typeEscaped = value
}
type File_extension_restrictionable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetParameters()(File_extension_restriction_parametersable)
GetTypeEscaped()(*File_extension_restriction_type)
SetParameters(value File_extension_restriction_parametersable)()
SetTypeEscaped(value *File_extension_restriction_type)()
}
86 changes: 86 additions & 0 deletions pkg/github/models/file_extension_restriction_parameters.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package models

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

type File_extension_restriction_parameters 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 file extensions that are restricted from being pushed to the commit graph.
restricted_file_extensions []string
}
// NewFile_extension_restriction_parameters instantiates a new File_extension_restriction_parameters and sets the default values.
func NewFile_extension_restriction_parameters()(*File_extension_restriction_parameters) {
m := &File_extension_restriction_parameters{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateFile_extension_restriction_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateFile_extension_restriction_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewFile_extension_restriction_parameters(), 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 *File_extension_restriction_parameters) 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 *File_extension_restriction_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["restricted_file_extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
if v != nil {
res[i] = *(v.(*string))
}
}
m.SetRestrictedFileExtensions(res)
}
return nil
}
return res
}
// GetRestrictedFileExtensions gets the restricted_file_extensions property value. The file extensions that are restricted from being pushed to the commit graph.
// returns a []string when successful
func (m *File_extension_restriction_parameters) GetRestrictedFileExtensions()([]string) {
return m.restricted_file_extensions
}
// Serialize serializes information the current object
func (m *File_extension_restriction_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
if m.GetRestrictedFileExtensions() != nil {
err := writer.WriteCollectionOfStringValues("restricted_file_extensions", m.GetRestrictedFileExtensions())
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 *File_extension_restriction_parameters) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetRestrictedFileExtensions sets the restricted_file_extensions property value. The file extensions that are restricted from being pushed to the commit graph.
func (m *File_extension_restriction_parameters) SetRestrictedFileExtensions(value []string)() {
m.restricted_file_extensions = value
}
type File_extension_restriction_parametersable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetRestrictedFileExtensions()([]string)
SetRestrictedFileExtensions(value []string)()
}
33 changes: 33 additions & 0 deletions pkg/github/models/file_extension_restriction_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package models
import (
"errors"
)
type File_extension_restriction_type int

const (
FILE_EXTENSION_RESTRICTION_FILE_EXTENSION_RESTRICTION_TYPE File_extension_restriction_type = iota
)

func (i File_extension_restriction_type) String() string {
return []string{"file_extension_restriction"}[i]
}
func ParseFile_extension_restriction_type(v string) (any, error) {
result := FILE_EXTENSION_RESTRICTION_FILE_EXTENSION_RESTRICTION_TYPE
switch v {
case "file_extension_restriction":
result = FILE_EXTENSION_RESTRICTION_FILE_EXTENSION_RESTRICTION_TYPE
default:
return 0, errors.New("Unknown File_extension_restriction_type value: " + v)
}
return &result, nil
}
func SerializeFile_extension_restriction_type(values []File_extension_restriction_type) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i File_extension_restriction_type) isMultiValue() bool {
return false
}
111 changes: 111 additions & 0 deletions pkg/github/models/file_path_restriction.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
package models

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

// File_path_restriction note: file_path_restriction is in beta and subject to change.Prevent commits that include changes in specified file paths from being pushed to the commit graph.
type File_path_restriction 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 parameters property
parameters File_path_restriction_parametersable
// The type property
typeEscaped *File_path_restriction_type
}
// NewFile_path_restriction instantiates a new File_path_restriction and sets the default values.
func NewFile_path_restriction()(*File_path_restriction) {
m := &File_path_restriction{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateFile_path_restrictionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateFile_path_restrictionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewFile_path_restriction(), 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 *File_path_restriction) 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 *File_path_restriction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateFile_path_restriction_parametersFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetParameters(val.(File_path_restriction_parametersable))
}
return nil
}
res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseFile_path_restriction_type)
if err != nil {
return err
}
if val != nil {
m.SetTypeEscaped(val.(*File_path_restriction_type))
}
return nil
}
return res
}
// GetParameters gets the parameters property value. The parameters property
// returns a File_path_restriction_parametersable when successful
func (m *File_path_restriction) GetParameters()(File_path_restriction_parametersable) {
return m.parameters
}
// GetTypeEscaped gets the type property value. The type property
// returns a *File_path_restriction_type when successful
func (m *File_path_restriction) GetTypeEscaped()(*File_path_restriction_type) {
return m.typeEscaped
}
// Serialize serializes information the current object
func (m *File_path_restriction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteObjectValue("parameters", m.GetParameters())
if err != nil {
return err
}
}
if m.GetTypeEscaped() != nil {
cast := (*m.GetTypeEscaped()).String()
err := writer.WriteStringValue("type", &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 *File_path_restriction) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetParameters sets the parameters property value. The parameters property
func (m *File_path_restriction) SetParameters(value File_path_restriction_parametersable)() {
m.parameters = value
}
// SetTypeEscaped sets the type property value. The type property
func (m *File_path_restriction) SetTypeEscaped(value *File_path_restriction_type)() {
m.typeEscaped = value
}
type File_path_restrictionable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetParameters()(File_path_restriction_parametersable)
GetTypeEscaped()(*File_path_restriction_type)
SetParameters(value File_path_restriction_parametersable)()
SetTypeEscaped(value *File_path_restriction_type)()
}
Loading
Loading