From 8b567542de46aec85aa1e016fa572ff807819b55 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Mon, 29 Apr 2024 18:33:16 -0500 Subject: [PATCH] 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) * New updates to generated code * New updates to generated code * New updates to generated code --------- Co-authored-by: Octokit Bot Co-authored-by: Keegan Campbell --- pkg/github/kiota-lock.json | 4 +- .../models/file_extension_restriction.go | 111 ++++++ .../file_extension_restriction_parameters.go | 86 +++++ .../models/file_extension_restriction_type.go | 33 ++ pkg/github/models/file_path_restriction.go | 111 ++++++ .../file_path_restriction_parameters.go | 86 +++++ .../models/file_path_restriction_type.go | 33 ++ pkg/github/models/max_file_path_length.go | 111 ++++++ .../models/max_file_path_length_parameters.go | 80 ++++ .../models/max_file_path_length_type.go | 33 ++ pkg/github/models/max_file_size.go | 111 ++++++ pkg/github/models/max_file_size_parameters.go | 80 ++++ pkg/github/models/max_file_size_type.go | 33 ++ pkg/github/models/repository_rule.go | 364 +++++++++++++++++- pkg/github/models/repository_ruleset.go | 6 +- .../models/repository_ruleset_bypass_actor.go | 18 +- ...ository_ruleset_bypass_actor_actor_type.go | 7 +- ...sitory_ruleset_bypass_actor_bypass_mode.go | 2 +- .../models/repository_ruleset_target.go | 7 +- .../with_ruleset_put_request_body_target.go | 7 +- .../rulesets_post_request_body_target.go | 7 +- .../with_ruleset_put_request_body_target.go | 7 +- .../rulesets_post_request_body_target.go | 7 +- ...item_pulls_item_commits_request_builder.go | 6 +- ...m_item_pulls_item_files_request_builder.go | 6 +- .../repos/item_item_pulls_request_builder.go | 10 +- ...s_with_pull_number_item_request_builder.go | 4 +- 27 files changed, 1328 insertions(+), 42 deletions(-) create mode 100644 pkg/github/models/file_extension_restriction.go create mode 100644 pkg/github/models/file_extension_restriction_parameters.go create mode 100644 pkg/github/models/file_extension_restriction_type.go create mode 100644 pkg/github/models/file_path_restriction.go create mode 100644 pkg/github/models/file_path_restriction_parameters.go create mode 100644 pkg/github/models/file_path_restriction_type.go create mode 100644 pkg/github/models/max_file_path_length.go create mode 100644 pkg/github/models/max_file_path_length_parameters.go create mode 100644 pkg/github/models/max_file_path_length_type.go create mode 100644 pkg/github/models/max_file_size.go create mode 100644 pkg/github/models/max_file_size_parameters.go create mode 100644 pkg/github/models/max_file_size_type.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index b7d6e67c..e4109016 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -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", diff --git a/pkg/github/models/file_extension_restriction.go b/pkg/github/models/file_extension_restriction.go new file mode 100644 index 00000000..cf261b71 --- /dev/null +++ b/pkg/github/models/file_extension_restriction.go @@ -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)() +} diff --git a/pkg/github/models/file_extension_restriction_parameters.go b/pkg/github/models/file_extension_restriction_parameters.go new file mode 100644 index 00000000..45e09bc8 --- /dev/null +++ b/pkg/github/models/file_extension_restriction_parameters.go @@ -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)() +} diff --git a/pkg/github/models/file_extension_restriction_type.go b/pkg/github/models/file_extension_restriction_type.go new file mode 100644 index 00000000..d74668c4 --- /dev/null +++ b/pkg/github/models/file_extension_restriction_type.go @@ -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 +} diff --git a/pkg/github/models/file_path_restriction.go b/pkg/github/models/file_path_restriction.go new file mode 100644 index 00000000..d45a9641 --- /dev/null +++ b/pkg/github/models/file_path_restriction.go @@ -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)() +} diff --git a/pkg/github/models/file_path_restriction_parameters.go b/pkg/github/models/file_path_restriction_parameters.go new file mode 100644 index 00000000..860c651b --- /dev/null +++ b/pkg/github/models/file_path_restriction_parameters.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type File_path_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 paths that are restricted from being pushed to the commit graph. + restricted_file_paths []string +} +// NewFile_path_restriction_parameters instantiates a new File_path_restriction_parameters and sets the default values. +func NewFile_path_restriction_parameters()(*File_path_restriction_parameters) { + m := &File_path_restriction_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFile_path_restriction_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFile_path_restriction_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFile_path_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_path_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_path_restriction_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["restricted_file_paths"] = 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.SetRestrictedFilePaths(res) + } + return nil + } + return res +} +// GetRestrictedFilePaths gets the restricted_file_paths property value. The file paths that are restricted from being pushed to the commit graph. +// returns a []string when successful +func (m *File_path_restriction_parameters) GetRestrictedFilePaths()([]string) { + return m.restricted_file_paths +} +// Serialize serializes information the current object +func (m *File_path_restriction_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetRestrictedFilePaths() != nil { + err := writer.WriteCollectionOfStringValues("restricted_file_paths", m.GetRestrictedFilePaths()) + 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_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRestrictedFilePaths sets the restricted_file_paths property value. The file paths that are restricted from being pushed to the commit graph. +func (m *File_path_restriction_parameters) SetRestrictedFilePaths(value []string)() { + m.restricted_file_paths = value +} +type File_path_restriction_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRestrictedFilePaths()([]string) + SetRestrictedFilePaths(value []string)() +} diff --git a/pkg/github/models/file_path_restriction_type.go b/pkg/github/models/file_path_restriction_type.go new file mode 100644 index 00000000..b73a3696 --- /dev/null +++ b/pkg/github/models/file_path_restriction_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type File_path_restriction_type int + +const ( + FILE_PATH_RESTRICTION_FILE_PATH_RESTRICTION_TYPE File_path_restriction_type = iota +) + +func (i File_path_restriction_type) String() string { + return []string{"file_path_restriction"}[i] +} +func ParseFile_path_restriction_type(v string) (any, error) { + result := FILE_PATH_RESTRICTION_FILE_PATH_RESTRICTION_TYPE + switch v { + case "file_path_restriction": + result = FILE_PATH_RESTRICTION_FILE_PATH_RESTRICTION_TYPE + default: + return 0, errors.New("Unknown File_path_restriction_type value: " + v) + } + return &result, nil +} +func SerializeFile_path_restriction_type(values []File_path_restriction_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i File_path_restriction_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/max_file_path_length.go b/pkg/github/models/max_file_path_length.go new file mode 100644 index 00000000..ec4fe6f8 --- /dev/null +++ b/pkg/github/models/max_file_path_length.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Max_file_path_length note: max_file_path_length is in beta and subject to change.Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. +type Max_file_path_length 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 Max_file_path_length_parametersable + // The type property + typeEscaped *Max_file_path_length_type +} +// NewMax_file_path_length instantiates a new Max_file_path_length and sets the default values. +func NewMax_file_path_length()(*Max_file_path_length) { + m := &Max_file_path_length{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_path_lengthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_path_lengthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_path_length(), 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 *Max_file_path_length) 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 *Max_file_path_length) 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(CreateMax_file_path_length_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(Max_file_path_length_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMax_file_path_length_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Max_file_path_length_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a Max_file_path_length_parametersable when successful +func (m *Max_file_path_length) GetParameters()(Max_file_path_length_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Max_file_path_length_type when successful +func (m *Max_file_path_length) GetTypeEscaped()(*Max_file_path_length_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Max_file_path_length) 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 *Max_file_path_length) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *Max_file_path_length) SetParameters(value Max_file_path_length_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Max_file_path_length) SetTypeEscaped(value *Max_file_path_length_type)() { + m.typeEscaped = value +} +type Max_file_path_lengthable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(Max_file_path_length_parametersable) + GetTypeEscaped()(*Max_file_path_length_type) + SetParameters(value Max_file_path_length_parametersable)() + SetTypeEscaped(value *Max_file_path_length_type)() +} diff --git a/pkg/github/models/max_file_path_length_parameters.go b/pkg/github/models/max_file_path_length_parameters.go new file mode 100644 index 00000000..bde936d9 --- /dev/null +++ b/pkg/github/models/max_file_path_length_parameters.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Max_file_path_length_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 maximum amount of characters allowed in file paths + max_file_path_length *int32 +} +// NewMax_file_path_length_parameters instantiates a new Max_file_path_length_parameters and sets the default values. +func NewMax_file_path_length_parameters()(*Max_file_path_length_parameters) { + m := &Max_file_path_length_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_path_length_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_path_length_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_path_length_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 *Max_file_path_length_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 *Max_file_path_length_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["max_file_path_length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxFilePathLength(val) + } + return nil + } + return res +} +// GetMaxFilePathLength gets the max_file_path_length property value. The maximum amount of characters allowed in file paths +// returns a *int32 when successful +func (m *Max_file_path_length_parameters) GetMaxFilePathLength()(*int32) { + return m.max_file_path_length +} +// Serialize serializes information the current object +func (m *Max_file_path_length_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("max_file_path_length", m.GetMaxFilePathLength()) + 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 *Max_file_path_length_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMaxFilePathLength sets the max_file_path_length property value. The maximum amount of characters allowed in file paths +func (m *Max_file_path_length_parameters) SetMaxFilePathLength(value *int32)() { + m.max_file_path_length = value +} +type Max_file_path_length_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxFilePathLength()(*int32) + SetMaxFilePathLength(value *int32)() +} diff --git a/pkg/github/models/max_file_path_length_type.go b/pkg/github/models/max_file_path_length_type.go new file mode 100644 index 00000000..daaf0629 --- /dev/null +++ b/pkg/github/models/max_file_path_length_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type Max_file_path_length_type int + +const ( + MAX_FILE_PATH_LENGTH_MAX_FILE_PATH_LENGTH_TYPE Max_file_path_length_type = iota +) + +func (i Max_file_path_length_type) String() string { + return []string{"max_file_path_length"}[i] +} +func ParseMax_file_path_length_type(v string) (any, error) { + result := MAX_FILE_PATH_LENGTH_MAX_FILE_PATH_LENGTH_TYPE + switch v { + case "max_file_path_length": + result = MAX_FILE_PATH_LENGTH_MAX_FILE_PATH_LENGTH_TYPE + default: + return 0, errors.New("Unknown Max_file_path_length_type value: " + v) + } + return &result, nil +} +func SerializeMax_file_path_length_type(values []Max_file_path_length_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Max_file_path_length_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/max_file_size.go b/pkg/github/models/max_file_size.go new file mode 100644 index 00000000..9bf5bb59 --- /dev/null +++ b/pkg/github/models/max_file_size.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Max_file_size note: max_file_size is in beta and subject to change.Prevent commits that exceed a specified file size limit from being pushed to the commit. +type Max_file_size 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 Max_file_size_parametersable + // The type property + typeEscaped *Max_file_size_type +} +// NewMax_file_size instantiates a new Max_file_size and sets the default values. +func NewMax_file_size()(*Max_file_size) { + m := &Max_file_size{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_sizeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_sizeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_size(), 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 *Max_file_size) 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 *Max_file_size) 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(CreateMax_file_size_parametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParameters(val.(Max_file_size_parametersable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMax_file_size_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*Max_file_size_type)) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters property +// returns a Max_file_size_parametersable when successful +func (m *Max_file_size) GetParameters()(Max_file_size_parametersable) { + return m.parameters +} +// GetTypeEscaped gets the type property value. The type property +// returns a *Max_file_size_type when successful +func (m *Max_file_size) GetTypeEscaped()(*Max_file_size_type) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *Max_file_size) 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 *Max_file_size) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *Max_file_size) SetParameters(value Max_file_size_parametersable)() { + m.parameters = value +} +// SetTypeEscaped sets the type property value. The type property +func (m *Max_file_size) SetTypeEscaped(value *Max_file_size_type)() { + m.typeEscaped = value +} +type Max_file_sizeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()(Max_file_size_parametersable) + GetTypeEscaped()(*Max_file_size_type) + SetParameters(value Max_file_size_parametersable)() + SetTypeEscaped(value *Max_file_size_type)() +} diff --git a/pkg/github/models/max_file_size_parameters.go b/pkg/github/models/max_file_size_parameters.go new file mode 100644 index 00000000..9bb37856 --- /dev/null +++ b/pkg/github/models/max_file_size_parameters.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Max_file_size_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 maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). + max_file_size *int32 +} +// NewMax_file_size_parameters instantiates a new Max_file_size_parameters and sets the default values. +func NewMax_file_size_parameters()(*Max_file_size_parameters) { + m := &Max_file_size_parameters{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMax_file_size_parametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMax_file_size_parametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMax_file_size_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 *Max_file_size_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 *Max_file_size_parameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["max_file_size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxFileSize(val) + } + return nil + } + return res +} +// GetMaxFileSize gets the max_file_size property value. The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). +// returns a *int32 when successful +func (m *Max_file_size_parameters) GetMaxFileSize()(*int32) { + return m.max_file_size +} +// Serialize serializes information the current object +func (m *Max_file_size_parameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("max_file_size", m.GetMaxFileSize()) + 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 *Max_file_size_parameters) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetMaxFileSize sets the max_file_size property value. The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). +func (m *Max_file_size_parameters) SetMaxFileSize(value *int32)() { + m.max_file_size = value +} +type Max_file_size_parametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxFileSize()(*int32) + SetMaxFileSize(value *int32)() +} diff --git a/pkg/github/models/max_file_size_type.go b/pkg/github/models/max_file_size_type.go new file mode 100644 index 00000000..f4b53a3f --- /dev/null +++ b/pkg/github/models/max_file_size_type.go @@ -0,0 +1,33 @@ +package models +import ( + "errors" +) +type Max_file_size_type int + +const ( + MAX_FILE_SIZE_MAX_FILE_SIZE_TYPE Max_file_size_type = iota +) + +func (i Max_file_size_type) String() string { + return []string{"max_file_size"}[i] +} +func ParseMax_file_size_type(v string) (any, error) { + result := MAX_FILE_SIZE_MAX_FILE_SIZE_TYPE + switch v { + case "max_file_size": + result = MAX_FILE_SIZE_MAX_FILE_SIZE_TYPE + default: + return 0, errors.New("Unknown Max_file_size_type value: " + v) + } + return &result, nil +} +func SerializeMax_file_size_type(values []Max_file_size_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i Max_file_size_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/repository_rule.go b/pkg/github/models/repository_rule.go index 6ed5ab0e..db7ae999 100644 --- a/pkg/github/models/repository_rule.go +++ b/pkg/github/models/repository_rule.go @@ -4,8 +4,16 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// RepositoryRule composed type wrapper for classes RepositoryRuleBranchNamePatternable, RepositoryRuleCommitAuthorEmailPatternable, RepositoryRuleCommitMessagePatternable, RepositoryRuleCommitterEmailPatternable, RepositoryRuleCreationable, RepositoryRuleDeletionable, RepositoryRuleNonFastForwardable, RepositoryRulePullRequestable, RepositoryRuleRequiredDeploymentsable, RepositoryRuleRequiredLinearHistoryable, RepositoryRuleRequiredSignaturesable, RepositoryRuleRequiredStatusChecksable, RepositoryRuleTagNamePatternable, RepositoryRuleUpdateable, RepositoryRuleWorkflowsable +// RepositoryRule composed type wrapper for classes File_extension_restrictionable, File_path_restrictionable, Max_file_path_lengthable, Max_file_sizeable, RepositoryRuleBranchNamePatternable, RepositoryRuleCommitAuthorEmailPatternable, RepositoryRuleCommitMessagePatternable, RepositoryRuleCommitterEmailPatternable, RepositoryRuleCreationable, RepositoryRuleDeletionable, RepositoryRuleNonFastForwardable, RepositoryRulePullRequestable, RepositoryRuleRequiredDeploymentsable, RepositoryRuleRequiredLinearHistoryable, RepositoryRuleRequiredSignaturesable, RepositoryRuleRequiredStatusChecksable, RepositoryRuleTagNamePatternable, RepositoryRuleUpdateable, RepositoryRuleWorkflowsable type RepositoryRule struct { + // Composed type representation for type File_extension_restrictionable + file_extension_restriction File_extension_restrictionable + // Composed type representation for type File_path_restrictionable + file_path_restriction File_path_restrictionable + // Composed type representation for type Max_file_path_lengthable + max_file_path_length Max_file_path_lengthable + // Composed type representation for type Max_file_sizeable + max_file_size Max_file_sizeable // Composed type representation for type RepositoryRuleBranchNamePatternable repositoryRuleBranchNamePattern RepositoryRuleBranchNamePatternable // Composed type representation for type RepositoryRuleCommitAuthorEmailPatternable @@ -18,6 +26,38 @@ type RepositoryRule struct { repositoryRuleCreation RepositoryRuleCreationable // Composed type representation for type RepositoryRuleDeletionable repositoryRuleDeletion RepositoryRuleDeletionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction File_extension_restrictionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction0 File_extension_restrictionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction1 File_extension_restrictionable + // Composed type representation for type File_extension_restrictionable + repositoryRuleFile_extension_restriction2 File_extension_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction File_path_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction0 File_path_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction1 File_path_restrictionable + // Composed type representation for type File_path_restrictionable + repositoryRuleFile_path_restriction2 File_path_restrictionable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length Max_file_path_lengthable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length0 Max_file_path_lengthable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length1 Max_file_path_lengthable + // Composed type representation for type Max_file_path_lengthable + repositoryRuleMax_file_path_length2 Max_file_path_lengthable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size Max_file_sizeable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size0 Max_file_sizeable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size1 Max_file_sizeable + // Composed type representation for type Max_file_sizeable + repositoryRuleMax_file_size2 Max_file_sizeable // Composed type representation for type RepositoryRuleNonFastForwardable repositoryRuleNonFastForward RepositoryRuleNonFastForwardable // Composed type representation for type RepositoryRulePullRequestable @@ -188,11 +228,31 @@ func CreateRepositoryRuleFromDiscriminatorValue(parseNode i878a80d2330e89d268963 func (m *RepositoryRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) } +// GetFileExtensionRestriction gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetFileExtensionRestriction()(File_extension_restrictionable) { + return m.file_extension_restriction +} +// GetFilePathRestriction gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetFilePathRestriction()(File_path_restrictionable) { + return m.file_path_restriction +} // GetIsComposedType determines if the current object is a wrapper around a composed type // returns a bool when successful func (m *RepositoryRule) GetIsComposedType()(bool) { return true } +// GetMaxFilePathLength gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetMaxFilePathLength()(Max_file_path_lengthable) { + return m.max_file_path_length +} +// GetMaxFileSize gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetMaxFileSize()(Max_file_sizeable) { + return m.max_file_size +} // GetRepositoryRuleBranchNamePattern gets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable // returns a RepositoryRuleBranchNamePatternable when successful func (m *RepositoryRule) GetRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) { @@ -223,6 +283,86 @@ func (m *RepositoryRule) GetRepositoryRuleCreation()(RepositoryRuleCreationable) func (m *RepositoryRule) GetRepositoryRuleDeletion()(RepositoryRuleDeletionable) { return m.repositoryRuleDeletion } +// GetRepositoryRuleFileExtensionRestriction gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction +} +// GetRepositoryRuleFileExtensionRestriction0 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction0()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction0 +} +// GetRepositoryRuleFileExtensionRestriction1 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction1()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction1 +} +// GetRepositoryRuleFileExtensionRestriction2 gets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +// returns a File_extension_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFileExtensionRestriction2()(File_extension_restrictionable) { + return m.repositoryRuleFile_extension_restriction2 +} +// GetRepositoryRuleFilePathRestriction gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction +} +// GetRepositoryRuleFilePathRestriction0 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction0()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction0 +} +// GetRepositoryRuleFilePathRestriction1 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction1()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction1 +} +// GetRepositoryRuleFilePathRestriction2 gets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +// returns a File_path_restrictionable when successful +func (m *RepositoryRule) GetRepositoryRuleFilePathRestriction2()(File_path_restrictionable) { + return m.repositoryRuleFile_path_restriction2 +} +// GetRepositoryRuleMaxFilePathLength gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length +} +// GetRepositoryRuleMaxFilePathLength0 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength0()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length0 +} +// GetRepositoryRuleMaxFilePathLength1 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength1()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length1 +} +// GetRepositoryRuleMaxFilePathLength2 gets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +// returns a Max_file_path_lengthable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFilePathLength2()(Max_file_path_lengthable) { + return m.repositoryRuleMax_file_path_length2 +} +// GetRepositoryRuleMaxFileSize gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size +} +// GetRepositoryRuleMaxFileSize0 gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize0()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size0 +} +// GetRepositoryRuleMaxFileSize1 gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize1()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size1 +} +// GetRepositoryRuleMaxFileSize2 gets the max_file_size property value. Composed type representation for type Max_file_sizeable +// returns a Max_file_sizeable when successful +func (m *RepositoryRule) GetRepositoryRuleMaxFileSize2()(Max_file_sizeable) { + return m.repositoryRuleMax_file_size2 +} // GetRepositoryRuleNonFastForward gets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable // returns a RepositoryRuleNonFastForwardable when successful func (m *RepositoryRule) GetRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) { @@ -570,7 +710,27 @@ func (m *RepositoryRule) GetRepositoryRuleWorkflows()(RepositoryRuleWorkflowsabl } // Serialize serializes information the current object func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetRepositoryRuleBranchNamePattern() != nil { + if m.GetFileExtensionRestriction() != nil { + err := writer.WriteObjectValue("", m.GetFileExtensionRestriction()) + if err != nil { + return err + } + } else if m.GetFilePathRestriction() != nil { + err := writer.WriteObjectValue("", m.GetFilePathRestriction()) + if err != nil { + return err + } + } else if m.GetMaxFilePathLength() != nil { + err := writer.WriteObjectValue("", m.GetMaxFilePathLength()) + if err != nil { + return err + } + } else if m.GetMaxFileSize() != nil { + err := writer.WriteObjectValue("", m.GetMaxFileSize()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleBranchNamePattern() != nil { err := writer.WriteObjectValue("", m.GetRepositoryRuleBranchNamePattern()) if err != nil { return err @@ -600,6 +760,86 @@ func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a if err != nil { return err } + } else if m.GetRepositoryRuleFileExtensionRestriction() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFileExtensionRestriction0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFileExtensionRestriction1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFileExtensionRestriction2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFileExtensionRestriction2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleFilePathRestriction2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleFilePathRestriction2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFilePathLength2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFilePathLength2()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize0() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize0()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize1() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize1()) + if err != nil { + return err + } + } else if m.GetRepositoryRuleMaxFileSize2() != nil { + err := writer.WriteObjectValue("", m.GetRepositoryRuleMaxFileSize2()) + if err != nil { + return err + } } else if m.GetRepositoryRuleNonFastForward() != nil { err := writer.WriteObjectValue("", m.GetRepositoryRuleNonFastForward()) if err != nil { @@ -948,6 +1188,22 @@ func (m *RepositoryRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a } return nil } +// SetFileExtensionRestriction sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetFileExtensionRestriction(value File_extension_restrictionable)() { + m.file_extension_restriction = value +} +// SetFilePathRestriction sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetFilePathRestriction(value File_path_restrictionable)() { + m.file_path_restriction = value +} +// SetMaxFilePathLength sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetMaxFilePathLength(value Max_file_path_lengthable)() { + m.max_file_path_length = value +} +// SetMaxFileSize sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetMaxFileSize(value Max_file_sizeable)() { + m.max_file_size = value +} // SetRepositoryRuleBranchNamePattern sets the repositoryRuleBranchNamePattern property value. Composed type representation for type RepositoryRuleBranchNamePatternable func (m *RepositoryRule) SetRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() { m.repositoryRuleBranchNamePattern = value @@ -972,6 +1228,70 @@ func (m *RepositoryRule) SetRepositoryRuleCreation(value RepositoryRuleCreationa func (m *RepositoryRule) SetRepositoryRuleDeletion(value RepositoryRuleDeletionable)() { m.repositoryRuleDeletion = value } +// SetRepositoryRuleFileExtensionRestriction sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction = value +} +// SetRepositoryRuleFileExtensionRestriction0 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction0(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction0 = value +} +// SetRepositoryRuleFileExtensionRestriction1 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction1(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction1 = value +} +// SetRepositoryRuleFileExtensionRestriction2 sets the file_extension_restriction property value. Composed type representation for type File_extension_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFileExtensionRestriction2(value File_extension_restrictionable)() { + m.repositoryRuleFile_extension_restriction2 = value +} +// SetRepositoryRuleFilePathRestriction sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction = value +} +// SetRepositoryRuleFilePathRestriction0 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction0(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction0 = value +} +// SetRepositoryRuleFilePathRestriction1 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction1(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction1 = value +} +// SetRepositoryRuleFilePathRestriction2 sets the file_path_restriction property value. Composed type representation for type File_path_restrictionable +func (m *RepositoryRule) SetRepositoryRuleFilePathRestriction2(value File_path_restrictionable)() { + m.repositoryRuleFile_path_restriction2 = value +} +// SetRepositoryRuleMaxFilePathLength sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length = value +} +// SetRepositoryRuleMaxFilePathLength0 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength0(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length0 = value +} +// SetRepositoryRuleMaxFilePathLength1 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength1(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length1 = value +} +// SetRepositoryRuleMaxFilePathLength2 sets the max_file_path_length property value. Composed type representation for type Max_file_path_lengthable +func (m *RepositoryRule) SetRepositoryRuleMaxFilePathLength2(value Max_file_path_lengthable)() { + m.repositoryRuleMax_file_path_length2 = value +} +// SetRepositoryRuleMaxFileSize sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size = value +} +// SetRepositoryRuleMaxFileSize0 sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize0(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size0 = value +} +// SetRepositoryRuleMaxFileSize1 sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize1(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size1 = value +} +// SetRepositoryRuleMaxFileSize2 sets the max_file_size property value. Composed type representation for type Max_file_sizeable +func (m *RepositoryRule) SetRepositoryRuleMaxFileSize2(value Max_file_sizeable)() { + m.repositoryRuleMax_file_size2 = value +} // SetRepositoryRuleNonFastForward sets the repositoryRuleNonFastForward property value. Composed type representation for type RepositoryRuleNonFastForwardable func (m *RepositoryRule) SetRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() { m.repositoryRuleNonFastForward = value @@ -1250,12 +1570,32 @@ func (m *RepositoryRule) SetRepositoryRuleWorkflows(value RepositoryRuleWorkflow } type RepositoryRuleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileExtensionRestriction()(File_extension_restrictionable) + GetFilePathRestriction()(File_path_restrictionable) + GetMaxFilePathLength()(Max_file_path_lengthable) + GetMaxFileSize()(Max_file_sizeable) GetRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) GetRepositoryRuleCommitAuthorEmailPattern()(RepositoryRuleCommitAuthorEmailPatternable) GetRepositoryRuleCommitMessagePattern()(RepositoryRuleCommitMessagePatternable) GetRepositoryRuleCommitterEmailPattern()(RepositoryRuleCommitterEmailPatternable) GetRepositoryRuleCreation()(RepositoryRuleCreationable) GetRepositoryRuleDeletion()(RepositoryRuleDeletionable) + GetRepositoryRuleFileExtensionRestriction()(File_extension_restrictionable) + GetRepositoryRuleFileExtensionRestriction0()(File_extension_restrictionable) + GetRepositoryRuleFileExtensionRestriction1()(File_extension_restrictionable) + GetRepositoryRuleFileExtensionRestriction2()(File_extension_restrictionable) + GetRepositoryRuleFilePathRestriction()(File_path_restrictionable) + GetRepositoryRuleFilePathRestriction0()(File_path_restrictionable) + GetRepositoryRuleFilePathRestriction1()(File_path_restrictionable) + GetRepositoryRuleFilePathRestriction2()(File_path_restrictionable) + GetRepositoryRuleMaxFilePathLength()(Max_file_path_lengthable) + GetRepositoryRuleMaxFilePathLength0()(Max_file_path_lengthable) + GetRepositoryRuleMaxFilePathLength1()(Max_file_path_lengthable) + GetRepositoryRuleMaxFilePathLength2()(Max_file_path_lengthable) + GetRepositoryRuleMaxFileSize()(Max_file_sizeable) + GetRepositoryRuleMaxFileSize0()(Max_file_sizeable) + GetRepositoryRuleMaxFileSize1()(Max_file_sizeable) + GetRepositoryRuleMaxFileSize2()(Max_file_sizeable) GetRepositoryRuleNonFastForward()(RepositoryRuleNonFastForwardable) GetRepositoryRulePullRequest()(RepositoryRulePullRequestable) GetRepositoryRuleRepositoryRuleBranchNamePattern()(RepositoryRuleBranchNamePatternable) @@ -1325,12 +1665,32 @@ type RepositoryRuleable interface { GetRepositoryRuleTagNamePattern()(RepositoryRuleTagNamePatternable) GetRepositoryRuleUpdate()(RepositoryRuleUpdateable) GetRepositoryRuleWorkflows()(RepositoryRuleWorkflowsable) + SetFileExtensionRestriction(value File_extension_restrictionable)() + SetFilePathRestriction(value File_path_restrictionable)() + SetMaxFilePathLength(value Max_file_path_lengthable)() + SetMaxFileSize(value Max_file_sizeable)() SetRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() SetRepositoryRuleCommitAuthorEmailPattern(value RepositoryRuleCommitAuthorEmailPatternable)() SetRepositoryRuleCommitMessagePattern(value RepositoryRuleCommitMessagePatternable)() SetRepositoryRuleCommitterEmailPattern(value RepositoryRuleCommitterEmailPatternable)() SetRepositoryRuleCreation(value RepositoryRuleCreationable)() SetRepositoryRuleDeletion(value RepositoryRuleDeletionable)() + SetRepositoryRuleFileExtensionRestriction(value File_extension_restrictionable)() + SetRepositoryRuleFileExtensionRestriction0(value File_extension_restrictionable)() + SetRepositoryRuleFileExtensionRestriction1(value File_extension_restrictionable)() + SetRepositoryRuleFileExtensionRestriction2(value File_extension_restrictionable)() + SetRepositoryRuleFilePathRestriction(value File_path_restrictionable)() + SetRepositoryRuleFilePathRestriction0(value File_path_restrictionable)() + SetRepositoryRuleFilePathRestriction1(value File_path_restrictionable)() + SetRepositoryRuleFilePathRestriction2(value File_path_restrictionable)() + SetRepositoryRuleMaxFilePathLength(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFilePathLength0(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFilePathLength1(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFilePathLength2(value Max_file_path_lengthable)() + SetRepositoryRuleMaxFileSize(value Max_file_sizeable)() + SetRepositoryRuleMaxFileSize0(value Max_file_sizeable)() + SetRepositoryRuleMaxFileSize1(value Max_file_sizeable)() + SetRepositoryRuleMaxFileSize2(value Max_file_sizeable)() SetRepositoryRuleNonFastForward(value RepositoryRuleNonFastForwardable)() SetRepositoryRulePullRequest(value RepositoryRulePullRequestable)() SetRepositoryRuleRepositoryRuleBranchNamePattern(value RepositoryRuleBranchNamePatternable)() diff --git a/pkg/github/models/repository_ruleset.go b/pkg/github/models/repository_ruleset.go index f8376a93..5aa2b329 100644 --- a/pkg/github/models/repository_ruleset.go +++ b/pkg/github/models/repository_ruleset.go @@ -33,7 +33,7 @@ type RepositoryRuleset struct { source *string // The type of the source of the ruleset source_type *RepositoryRuleset_source_type - // The target of the ruleset + // The target of the ruleset**Note**: The `push` target is in beta and is subject to change. target *RepositoryRuleset_target // The updated_at property updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time @@ -359,7 +359,7 @@ func (m *RepositoryRuleset) GetSource()(*string) { func (m *RepositoryRuleset) GetSourceType()(*RepositoryRuleset_source_type) { return m.source_type } -// GetTarget gets the target property value. The target of the ruleset +// GetTarget gets the target property value. The target of the ruleset**Note**: The `push` target is in beta and is subject to change. // returns a *RepositoryRuleset_target when successful func (m *RepositoryRuleset) GetTarget()(*RepositoryRuleset_target) { return m.target @@ -531,7 +531,7 @@ func (m *RepositoryRuleset) SetSource(value *string)() { func (m *RepositoryRuleset) SetSourceType(value *RepositoryRuleset_source_type)() { m.source_type = value } -// SetTarget sets the target property value. The target of the ruleset +// SetTarget sets the target property value. The target of the ruleset**Note**: The `push` target is in beta and is subject to change. func (m *RepositoryRuleset) SetTarget(value *RepositoryRuleset_target)() { m.target = value } diff --git a/pkg/github/models/repository_ruleset_bypass_actor.go b/pkg/github/models/repository_ruleset_bypass_actor.go index 7bdba566..9f383c46 100644 --- a/pkg/github/models/repository_ruleset_bypass_actor.go +++ b/pkg/github/models/repository_ruleset_bypass_actor.go @@ -6,13 +6,13 @@ import ( // RepositoryRulesetBypassActor an actor that can bypass rules in a ruleset type RepositoryRulesetBypassActor struct { - // The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. + // The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. actor_id *int32 - // The type of actor that can bypass a ruleset + // The type of actor that can bypass a ruleset. actor_type *RepositoryRulesetBypassActor_actor_type // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. + // When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. bypass_mode *RepositoryRulesetBypassActor_bypass_mode } // NewRepositoryRulesetBypassActor instantiates a new RepositoryRulesetBypassActor and sets the default values. @@ -27,12 +27,12 @@ func NewRepositoryRulesetBypassActor()(*RepositoryRulesetBypassActor) { func CreateRepositoryRulesetBypassActorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewRepositoryRulesetBypassActor(), nil } -// GetActorId gets the actor_id property value. The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. +// GetActorId gets the actor_id property value. The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. // returns a *int32 when successful func (m *RepositoryRulesetBypassActor) GetActorId()(*int32) { return m.actor_id } -// GetActorType gets the actor_type property value. The type of actor that can bypass a ruleset +// GetActorType gets the actor_type property value. The type of actor that can bypass a ruleset. // returns a *RepositoryRulesetBypassActor_actor_type when successful func (m *RepositoryRulesetBypassActor) GetActorType()(*RepositoryRulesetBypassActor_actor_type) { return m.actor_type @@ -42,7 +42,7 @@ func (m *RepositoryRulesetBypassActor) GetActorType()(*RepositoryRulesetBypassAc func (m *RepositoryRulesetBypassActor) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetBypassMode gets the bypass_mode property value. When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. +// GetBypassMode gets the bypass_mode property value. When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. // returns a *RepositoryRulesetBypassActor_bypass_mode when successful func (m *RepositoryRulesetBypassActor) GetBypassMode()(*RepositoryRulesetBypassActor_bypass_mode) { return m.bypass_mode @@ -113,11 +113,11 @@ func (m *RepositoryRulesetBypassActor) Serialize(writer i878a80d2330e89d26896388 } return nil } -// SetActorId sets the actor_id property value. The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. +// SetActorId sets the actor_id property value. The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. func (m *RepositoryRulesetBypassActor) SetActorId(value *int32)() { m.actor_id = value } -// SetActorType sets the actor_type property value. The type of actor that can bypass a ruleset +// SetActorType sets the actor_type property value. The type of actor that can bypass a ruleset. func (m *RepositoryRulesetBypassActor) SetActorType(value *RepositoryRulesetBypassActor_actor_type)() { m.actor_type = value } @@ -125,7 +125,7 @@ func (m *RepositoryRulesetBypassActor) SetActorType(value *RepositoryRulesetBypa func (m *RepositoryRulesetBypassActor) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetBypassMode sets the bypass_mode property value. When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. +// SetBypassMode sets the bypass_mode property value. When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. func (m *RepositoryRulesetBypassActor) SetBypassMode(value *RepositoryRulesetBypassActor_bypass_mode)() { m.bypass_mode = value } diff --git a/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go index 98d2a911..e6b3f602 100644 --- a/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go +++ b/pkg/github/models/repository_ruleset_bypass_actor_actor_type.go @@ -2,7 +2,7 @@ package models import ( "errors" ) -// The type of actor that can bypass a ruleset +// The type of actor that can bypass a ruleset. type RepositoryRulesetBypassActor_actor_type int const ( @@ -10,10 +10,11 @@ const ( ORGANIZATIONADMIN_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE REPOSITORYROLE_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE TEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + DEPLOYKEY_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE ) func (i RepositoryRulesetBypassActor_actor_type) String() string { - return []string{"Integration", "OrganizationAdmin", "RepositoryRole", "Team"}[i] + return []string{"Integration", "OrganizationAdmin", "RepositoryRole", "Team", "DeployKey"}[i] } func ParseRepositoryRulesetBypassActor_actor_type(v string) (any, error) { result := INTEGRATION_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE @@ -26,6 +27,8 @@ func ParseRepositoryRulesetBypassActor_actor_type(v string) (any, error) { result = REPOSITORYROLE_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE case "Team": result = TEAM_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE + case "DeployKey": + result = DEPLOYKEY_REPOSITORYRULESETBYPASSACTOR_ACTOR_TYPE default: return 0, errors.New("Unknown RepositoryRulesetBypassActor_actor_type value: " + v) } diff --git a/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go b/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go index 0e140150..93484ad4 100644 --- a/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go +++ b/pkg/github/models/repository_ruleset_bypass_actor_bypass_mode.go @@ -2,7 +2,7 @@ package models import ( "errors" ) -// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. +// When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. type RepositoryRulesetBypassActor_bypass_mode int const ( diff --git a/pkg/github/models/repository_ruleset_target.go b/pkg/github/models/repository_ruleset_target.go index fbce06b1..682eb98b 100644 --- a/pkg/github/models/repository_ruleset_target.go +++ b/pkg/github/models/repository_ruleset_target.go @@ -2,16 +2,17 @@ package models import ( "errors" ) -// The target of the ruleset +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type RepositoryRuleset_target int const ( BRANCH_REPOSITORYRULESET_TARGET RepositoryRuleset_target = iota TAG_REPOSITORYRULESET_TARGET + PUSH_REPOSITORYRULESET_TARGET ) func (i RepositoryRuleset_target) String() string { - return []string{"branch", "tag"}[i] + return []string{"branch", "tag", "push"}[i] } func ParseRepositoryRuleset_target(v string) (any, error) { result := BRANCH_REPOSITORYRULESET_TARGET @@ -20,6 +21,8 @@ func ParseRepositoryRuleset_target(v string) (any, error) { result = BRANCH_REPOSITORYRULESET_TARGET case "tag": result = TAG_REPOSITORYRULESET_TARGET + case "push": + result = PUSH_REPOSITORYRULESET_TARGET default: return 0, errors.New("Unknown RepositoryRuleset_target value: " + v) } diff --git a/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go b/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go index 88b5e9ee..2e18033f 100644 --- a/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go +++ b/pkg/github/orgs/item/rulesets/item/with_ruleset_put_request_body_target.go @@ -2,16 +2,17 @@ package item import ( "errors" ) -// The target of the ruleset. +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type WithRuleset_PutRequestBody_target int const ( BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET WithRuleset_PutRequestBody_target = iota TAG_WITHRULESET_PUTREQUESTBODY_TARGET + PUSH_WITHRULESET_PUTREQUESTBODY_TARGET ) func (i WithRuleset_PutRequestBody_target) String() string { - return []string{"branch", "tag"}[i] + return []string{"branch", "tag", "push"}[i] } func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { result := BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET @@ -20,6 +21,8 @@ func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { result = BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET case "tag": result = TAG_WITHRULESET_PUTREQUESTBODY_TARGET + case "push": + result = PUSH_WITHRULESET_PUTREQUESTBODY_TARGET default: return 0, errors.New("Unknown WithRuleset_PutRequestBody_target value: " + v) } diff --git a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go index 429fe47b..210257c5 100644 --- a/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go +++ b/pkg/github/orgs/item/rulesets/rulesets_post_request_body_target.go @@ -2,16 +2,17 @@ package rulesets import ( "errors" ) -// The target of the ruleset. +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type RulesetsPostRequestBody_target int const ( BRANCH_RULESETSPOSTREQUESTBODY_TARGET RulesetsPostRequestBody_target = iota TAG_RULESETSPOSTREQUESTBODY_TARGET + PUSH_RULESETSPOSTREQUESTBODY_TARGET ) func (i RulesetsPostRequestBody_target) String() string { - return []string{"branch", "tag"}[i] + return []string{"branch", "tag", "push"}[i] } func ParseRulesetsPostRequestBody_target(v string) (any, error) { result := BRANCH_RULESETSPOSTREQUESTBODY_TARGET @@ -20,6 +21,8 @@ func ParseRulesetsPostRequestBody_target(v string) (any, error) { result = BRANCH_RULESETSPOSTREQUESTBODY_TARGET case "tag": result = TAG_RULESETSPOSTREQUESTBODY_TARGET + case "push": + result = PUSH_RULESETSPOSTREQUESTBODY_TARGET default: return 0, errors.New("Unknown RulesetsPostRequestBody_target value: " + v) } diff --git a/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go b/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go index 88b5e9ee..2e18033f 100644 --- a/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go +++ b/pkg/github/repos/item/item/rulesets/item/with_ruleset_put_request_body_target.go @@ -2,16 +2,17 @@ package item import ( "errors" ) -// The target of the ruleset. +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type WithRuleset_PutRequestBody_target int const ( BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET WithRuleset_PutRequestBody_target = iota TAG_WITHRULESET_PUTREQUESTBODY_TARGET + PUSH_WITHRULESET_PUTREQUESTBODY_TARGET ) func (i WithRuleset_PutRequestBody_target) String() string { - return []string{"branch", "tag"}[i] + return []string{"branch", "tag", "push"}[i] } func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { result := BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET @@ -20,6 +21,8 @@ func ParseWithRuleset_PutRequestBody_target(v string) (any, error) { result = BRANCH_WITHRULESET_PUTREQUESTBODY_TARGET case "tag": result = TAG_WITHRULESET_PUTREQUESTBODY_TARGET + case "push": + result = PUSH_WITHRULESET_PUTREQUESTBODY_TARGET default: return 0, errors.New("Unknown WithRuleset_PutRequestBody_target value: " + v) } diff --git a/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go b/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go index 429fe47b..210257c5 100644 --- a/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go +++ b/pkg/github/repos/item/item/rulesets/rulesets_post_request_body_target.go @@ -2,16 +2,17 @@ package rulesets import ( "errors" ) -// The target of the ruleset. +// The target of the ruleset**Note**: The `push` target is in beta and is subject to change. type RulesetsPostRequestBody_target int const ( BRANCH_RULESETSPOSTREQUESTBODY_TARGET RulesetsPostRequestBody_target = iota TAG_RULESETSPOSTREQUESTBODY_TARGET + PUSH_RULESETSPOSTREQUESTBODY_TARGET ) func (i RulesetsPostRequestBody_target) String() string { - return []string{"branch", "tag"}[i] + return []string{"branch", "tag", "push"}[i] } func ParseRulesetsPostRequestBody_target(v string) (any, error) { result := BRANCH_RULESETSPOSTREQUESTBODY_TARGET @@ -20,6 +21,8 @@ func ParseRulesetsPostRequestBody_target(v string) (any, error) { result = BRANCH_RULESETSPOSTREQUESTBODY_TARGET case "tag": result = TAG_RULESETSPOSTREQUESTBODY_TARGET + case "push": + result = PUSH_RULESETSPOSTREQUESTBODY_TARGET default: return 0, errors.New("Unknown RulesetsPostRequestBody_target value: " + v) } diff --git a/pkg/github/repos/item_item_pulls_item_commits_request_builder.go b/pkg/github/repos/item_item_pulls_item_commits_request_builder.go index c46f81ab..69bfbb56 100644 --- a/pkg/github/repos/item_item_pulls_item_commits_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_commits_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemItemPullsItemCommitsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemPullsItemCommitsRequestBuilderGetQueryParameters lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// ItemItemPullsItemCommitsRequestBuilderGetQueryParameters lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. type ItemItemPullsItemCommitsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,7 @@ func NewItemItemPullsItemCommitsRequestBuilder(rawUrl string, requestAdapter i2a urlParams["request-raw-url"] = rawUrl return NewItemItemPullsItemCommitsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// Get lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a []Commitable when successful // [API method documentation] // @@ -52,7 +52,7 @@ func (m *ItemItemPullsItemCommitsRequestBuilder) Get(ctx context.Context, reques } return val, nil } -// ToGetRequestInformation lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// ToGetRequestInformation lists a maximum of 250 commits for a pull request. To receive a completecommit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsItemCommitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemCommitsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_pulls_item_files_request_builder.go b/pkg/github/repos/item_item_pulls_item_files_request_builder.go index 71769b24..1286f639 100644 --- a/pkg/github/repos/item_item_pulls_item_files_request_builder.go +++ b/pkg/github/repos/item_item_pulls_item_files_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemItemPullsItemFilesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemPullsItemFilesRequestBuilderGetQueryParameters lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// ItemItemPullsItemFilesRequestBuilderGetQueryParameters lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. type ItemItemPullsItemFilesRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,7 @@ func NewItemItemPullsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4 urlParams["request-raw-url"] = rawUrl return NewItemItemPullsItemFilesRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// Get lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a []DiffEntryable when successful // returns a ValidationError error when the service returns a 422 status code // returns a BasicError error when the service returns a 500 status code @@ -60,7 +60,7 @@ func (m *ItemItemPullsItemFilesRequestBuilder) Get(ctx context.Context, requestC } return val, nil } -// ToGetRequestInformation lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// ToGetRequestInformation lists the files in a specified pull request.**Note:** Responses include a maximum of 3000 files. The paginated responsereturns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsItemFilesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_pulls_request_builder.go b/pkg/github/repos/item_item_pulls_request_builder.go index 5bee95dd..01ac8858 100644 --- a/pkg/github/repos/item_item_pulls_request_builder.go +++ b/pkg/github/repos/item_item_pulls_request_builder.go @@ -12,7 +12,7 @@ import ( type ItemItemPullsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemPullsRequestBuilderGetQueryParameters lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.- **`application/vnd.github.patch`**: For more information, see "[git-format-patch](https://git-scm.com/docs/git-format-patch)" in the Git documentation. +// ItemItemPullsRequestBuilderGetQueryParameters lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. type ItemItemPullsRequestBuilderGetQueryParameters struct { // Filter pulls by base branch name. Example: `gh-pages`. Base *string `uriparametername:"base"` @@ -57,7 +57,7 @@ func NewItemItemPullsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee urlParams["request-raw-url"] = rawUrl return NewItemItemPullsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.- **`application/vnd.github.patch`**: For more information, see "[git-format-patch](https://git-scm.com/docs/git-format-patch)" in the Git documentation. +// Get lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a []PullRequestSimpleable when successful // returns a ValidationError error when the service returns a 422 status code // [API method documentation] @@ -83,7 +83,7 @@ func (m *ItemItemPullsRequestBuilder) Get(ctx context.Context, requestConfigurat } return val, nil } -// Post draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// Post draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a PullRequestable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -108,7 +108,7 @@ func (m *ItemItemPullsRequestBuilder) Post(ctx context.Context, body ItemItemPul } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PullRequestable), nil } -// ToGetRequestInformation lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.- **`application/vnd.github.patch`**: For more information, see "[git-format-patch](https://git-scm.com/docs/git-format-patch)" in the Git documentation. +// ToGetRequestInformation lists pull requests in a specified repository.Draft pull requests are available in public repositories with GitHubFree and GitHub Free for organizations, GitHub Pro, and legacy per-repository billingplans, and in public and private repositories with GitHub Team and GitHub EnterpriseCloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)in the GitHub Help documentation.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemPullsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -116,7 +116,7 @@ func (m *ItemItemPullsRequestBuilder) ToGetRequestInformation(ctx context.Contex requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// ToPostRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemPullsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go b/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go index 23293a8a..0739e0df 100644 --- a/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go +++ b/pkg/github/repos/item_item_pulls_with_pull_number_item_request_builder.go @@ -77,7 +77,7 @@ func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Get(ctx context.Context func (m *ItemItemPullsWithPull_numberItemRequestBuilder) Merge()(*ItemItemPullsItemMergeRequestBuilder) { return NewItemItemPullsItemMergeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// Patch draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a PullRequestable when successful // returns a BasicError error when the service returns a 403 status code // returns a ValidationError error when the service returns a 422 status code @@ -120,7 +120,7 @@ func (m *ItemItemPullsWithPull_numberItemRequestBuilder) ToGetRequestInformation requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. +// ToPatchRequestInformation draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemPullsWithPull_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemPullsItemWithPull_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)