Skip to content

Commit

Permalink
feat: Updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Dec 23, 2024
1 parent ea4210e commit 2c9557f
Show file tree
Hide file tree
Showing 107 changed files with 4,103 additions and 906 deletions.
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
// <auto-generated/>
#pragma warning disable CS0618
using GitHub.Enterprises.Item.Copilot.Billing.Seats;
using GitHub.Enterprises.Item.CodeSecurity.Configurations;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System;
namespace GitHub.Enterprises.Item.Copilot.Billing
namespace GitHub.Enterprises.Item.CodeSecurity
{
/// <summary>
/// Builds and executes requests for operations under \enterprises\{enterprise}\copilot\billing
/// Builds and executes requests for operations under \enterprises\{enterprise}\code-security
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public partial class BillingRequestBuilder : BaseRequestBuilder
public partial class CodeSecurityRequestBuilder : BaseRequestBuilder
{
/// <summary>The seats property</summary>
public global::GitHub.Enterprises.Item.Copilot.Billing.Seats.SeatsRequestBuilder Seats
/// <summary>The configurations property</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder Configurations
{
get => new global::GitHub.Enterprises.Item.Copilot.Billing.Seats.SeatsRequestBuilder(PathParameters, RequestAdapter);
get => new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Enterprises.Item.Copilot.Billing.BillingRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::GitHub.Enterprises.Item.CodeSecurity.CodeSecurityRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public BillingRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/billing", pathParameters)
public CodeSecurityRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Enterprises.Item.Copilot.Billing.BillingRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::GitHub.Enterprises.Item.CodeSecurity.CodeSecurityRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/billing", rawUrl)
public CodeSecurityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security", rawUrl)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
// <auto-generated/>
#pragma warning disable CS0618
using GitHub.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace GitHub.Enterprises.Item.CodeSecurity.Configurations
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
#pragma warning disable CS1591
public partial class ConfigurationsPostRequestBody : IParsable
#pragma warning restore CS1591
{
/// <summary>The enablement status of GitHub Advanced Security</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security? AdvancedSecurity { get; set; }
/// <summary>The enablement status of code scanning default setup</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; }
/// <summary>Feature options for code scanning default setup</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public global::GitHub.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; }
#nullable restore
#else
public global::GitHub.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; }
#endif
/// <summary>The enablement status of Dependabot alerts</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts? DependabotAlerts { get; set; }
/// <summary>The enablement status of Dependabot security updates</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates? DependabotSecurityUpdates { get; set; }
/// <summary>The enablement status of Dependency Graph</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph? DependencyGraph { get; set; }
/// <summary>The enablement status of Automatic dependency submission</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; }
/// <summary>Feature options for Automatic dependency submission</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; }
#nullable restore
#else
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; }
#endif
/// <summary>A description of the code security configuration</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Description { get; set; }
#nullable restore
#else
public string Description { get; set; }
#endif
/// <summary>The enforcement status for a security configuration</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement? Enforcement { get; set; }
/// <summary>The name of the code security configuration. Must be unique within the enterprise.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Name { get; set; }
#nullable restore
#else
public string Name { get; set; }
#endif
/// <summary>The enablement status of private vulnerability reporting</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; }
/// <summary>The enablement status of secret scanning</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning? SecretScanning { get; set; }
/// <summary>The enablement status of secret scanning non provider patterns</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; }
/// <summary>The enablement status of secret scanning push protection</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection? SecretScanningPushProtection { get; set; }
/// <summary>The enablement status of secret scanning validity checks</summary>
public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; }
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody"/> and sets the default values.
/// </summary>
public ConfigurationsPostRequestBody()
{
AdvancedSecurity = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security.Disabled;
CodeScanningDefaultSetup = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup.Disabled;
DependabotAlerts = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts.Disabled;
DependabotSecurityUpdates = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates.Disabled;
DependencyGraph = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph.Enabled;
DependencyGraphAutosubmitAction = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.Disabled;
Enforcement = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement.Enforced;
PrivateVulnerabilityReporting = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting.Disabled;
SecretScanning = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning.Disabled;
SecretScanningNonProviderPatterns = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.Disabled;
SecretScanningPushProtection = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection.Disabled;
SecretScanningValidityChecks = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks.Disabled;
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "advanced_security", n => { AdvancedSecurity = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security>(); } },
{ "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup>(); } },
{ "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue<global::GitHub.Models.CodeScanningDefaultSetupOptions>(global::GitHub.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } },
{ "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts>(); } },
{ "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates>(); } },
{ "dependency_graph", n => { DependencyGraph = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph>(); } },
{ "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action>(); } },
{ "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options>(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } },
{ "description", n => { Description = n.GetStringValue(); } },
{ "enforcement", n => { Enforcement = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement>(); } },
{ "name", n => { Name = n.GetStringValue(); } },
{ "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting>(); } },
{ "secret_scanning", n => { SecretScanning = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning>(); } },
{ "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns>(); } },
{ "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection>(); } },
{ "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks>(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security>("advanced_security", AdvancedSecurity);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup>("code_scanning_default_setup", CodeScanningDefaultSetup);
writer.WriteObjectValue<global::GitHub.Models.CodeScanningDefaultSetupOptions>("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts>("dependabot_alerts", DependabotAlerts);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates>("dependabot_security_updates", DependabotSecurityUpdates);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph>("dependency_graph", DependencyGraph);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action>("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction);
writer.WriteObjectValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options>("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions);
writer.WriteStringValue("description", Description);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement>("enforcement", Enforcement);
writer.WriteStringValue("name", Name);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting>("private_vulnerability_reporting", PrivateVulnerabilityReporting);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning>("secret_scanning", SecretScanning);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns>("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection>("secret_scanning_push_protection", SecretScanningPushProtection);
writer.WriteEnumValue<global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks>("secret_scanning_validity_checks", SecretScanningValidityChecks);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Enterprises.Item.CodeSecurity.Configurations
{
/// <summary>The enablement status of GitHub Advanced Security</summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public enum ConfigurationsPostRequestBody_advanced_security
{
[EnumMember(Value = "enabled")]
#pragma warning disable CS1591
Enabled,
#pragma warning restore CS1591
[EnumMember(Value = "disabled")]
#pragma warning disable CS1591
Disabled,
#pragma warning restore CS1591
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Enterprises.Item.CodeSecurity.Configurations
{
/// <summary>The enablement status of code scanning default setup</summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public enum ConfigurationsPostRequestBody_code_scanning_default_setup
{
[EnumMember(Value = "enabled")]
#pragma warning disable CS1591
Enabled,
#pragma warning restore CS1591
[EnumMember(Value = "disabled")]
#pragma warning disable CS1591
Disabled,
#pragma warning restore CS1591
[EnumMember(Value = "not_set")]
#pragma warning disable CS1591
Not_set,
#pragma warning restore CS1591
}
}
Loading

0 comments on commit 2c9557f

Please sign in to comment.