Skip to content

Commit

Permalink
feat: Adds RunnerGroupsOrg, SecurityAndAnalysis_secret_scanning_ai_de…
Browse files Browse the repository at this point in the history
…tection_status, RunnerGroups models, SecurityAndAnalysis[SecurityAndAnalysis] property, AlertsRequestBuilder[after. before] parameters
  • Loading branch information
octokitbot authored Oct 18, 2024
1 parent ff7ace8 commit d81df88
Show file tree
Hide file tree
Showing 24 changed files with 1,796 additions and 3 deletions.
143 changes: 143 additions & 0 deletions src/GitHub/Models/RunnerGroupsOrg.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace GitHub.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
#pragma warning disable CS1591
public partial class RunnerGroupsOrg : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
/// <summary>The allows_public_repositories property</summary>
public bool? AllowsPublicRepositories { get; set; }
/// <summary>The default property</summary>
public bool? Default { get; set; }
/// <summary>The hosted_runners_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? HostedRunnersUrl { get; set; }
#nullable restore
#else
public string HostedRunnersUrl { get; set; }
#endif
/// <summary>The id property</summary>
public double? Id { get; set; }
/// <summary>The inherited property</summary>
public bool? Inherited { get; set; }
/// <summary>The inherited_allows_public_repositories property</summary>
public bool? InheritedAllowsPublicRepositories { get; set; }
/// <summary>The name property</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>If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.</summary>
public bool? RestrictedToWorkflows { get; set; }
/// <summary>The runners_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? RunnersUrl { get; set; }
#nullable restore
#else
public string RunnersUrl { get; set; }
#endif
/// <summary>Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected`</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? SelectedRepositoriesUrl { get; set; }
#nullable restore
#else
public string SelectedRepositoriesUrl { get; set; }
#endif
/// <summary>List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<string>? SelectedWorkflows { get; set; }
#nullable restore
#else
public List<string> SelectedWorkflows { get; set; }
#endif
/// <summary>The visibility property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Visibility { get; set; }
#nullable restore
#else
public string Visibility { get; set; }
#endif
/// <summary>If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified.</summary>
public bool? WorkflowRestrictionsReadOnly { get; set; }
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.RunnerGroupsOrg"/> and sets the default values.
/// </summary>
public RunnerGroupsOrg()
{
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::GitHub.Models.RunnerGroupsOrg"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::GitHub.Models.RunnerGroupsOrg CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::GitHub.Models.RunnerGroupsOrg();
}
/// <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>>
{
{ "allows_public_repositories", n => { AllowsPublicRepositories = n.GetBoolValue(); } },
{ "default", n => { Default = n.GetBoolValue(); } },
{ "hosted_runners_url", n => { HostedRunnersUrl = n.GetStringValue(); } },
{ "id", n => { Id = n.GetDoubleValue(); } },
{ "inherited", n => { Inherited = n.GetBoolValue(); } },
{ "inherited_allows_public_repositories", n => { InheritedAllowsPublicRepositories = n.GetBoolValue(); } },
{ "name", n => { Name = n.GetStringValue(); } },
{ "restricted_to_workflows", n => { RestrictedToWorkflows = n.GetBoolValue(); } },
{ "runners_url", n => { RunnersUrl = n.GetStringValue(); } },
{ "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } },
{ "selected_workflows", n => { SelectedWorkflows = n.GetCollectionOfPrimitiveValues<string>()?.AsList(); } },
{ "visibility", n => { Visibility = n.GetStringValue(); } },
{ "workflow_restrictions_read_only", n => { WorkflowRestrictionsReadOnly = n.GetBoolValue(); } },
};
}
/// <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.WriteBoolValue("allows_public_repositories", AllowsPublicRepositories);
writer.WriteBoolValue("default", Default);
writer.WriteStringValue("hosted_runners_url", HostedRunnersUrl);
writer.WriteDoubleValue("id", Id);
writer.WriteBoolValue("inherited", Inherited);
writer.WriteBoolValue("inherited_allows_public_repositories", InheritedAllowsPublicRepositories);
writer.WriteStringValue("name", Name);
writer.WriteBoolValue("restricted_to_workflows", RestrictedToWorkflows);
writer.WriteStringValue("runners_url", RunnersUrl);
writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl);
writer.WriteCollectionOfPrimitiveValues<string>("selected_workflows", SelectedWorkflows);
writer.WriteStringValue("visibility", Visibility);
writer.WriteBoolValue("workflow_restrictions_read_only", WorkflowRestrictionsReadOnly);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618
10 changes: 10 additions & 0 deletions src/GitHub/Models/SecurityAndAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public partial class SecurityAndAnalysis : IAdditionalDataHolder, IParsable
#nullable restore
#else
public global::GitHub.Models.SecurityAndAnalysis_secret_scanning SecretScanning { get; set; }
#endif
/// <summary>The secret_scanning_ai_detection property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection? SecretScanningAiDetection { get; set; }
#nullable restore
#else
public global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection SecretScanningAiDetection { get; set; }
#endif
/// <summary>The secret_scanning_non_provider_patterns property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -82,6 +90,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{ "advanced_security", n => { AdvancedSecurity = n.GetObjectValue<global::GitHub.Models.SecurityAndAnalysis_advanced_security>(global::GitHub.Models.SecurityAndAnalysis_advanced_security.CreateFromDiscriminatorValue); } },
{ "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetObjectValue<global::GitHub.Models.SecurityAndAnalysis_dependabot_security_updates>(global::GitHub.Models.SecurityAndAnalysis_dependabot_security_updates.CreateFromDiscriminatorValue); } },
{ "secret_scanning", n => { SecretScanning = n.GetObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning>(global::GitHub.Models.SecurityAndAnalysis_secret_scanning.CreateFromDiscriminatorValue); } },
{ "secret_scanning_ai_detection", n => { SecretScanningAiDetection = n.GetObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection>(global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection.CreateFromDiscriminatorValue); } },
{ "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns>(global::GitHub.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns.CreateFromDiscriminatorValue); } },
{ "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning_push_protection>(global::GitHub.Models.SecurityAndAnalysis_secret_scanning_push_protection.CreateFromDiscriminatorValue); } },
};
Expand All @@ -96,6 +105,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteObjectValue<global::GitHub.Models.SecurityAndAnalysis_advanced_security>("advanced_security", AdvancedSecurity);
writer.WriteObjectValue<global::GitHub.Models.SecurityAndAnalysis_dependabot_security_updates>("dependabot_security_updates", DependabotSecurityUpdates);
writer.WriteObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning>("secret_scanning", SecretScanning);
writer.WriteObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection>("secret_scanning_ai_detection", SecretScanningAiDetection);
writer.WriteObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns>("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns);
writer.WriteObjectValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning_push_protection>("secret_scanning_push_protection", SecretScanningPushProtection);
writer.WriteAdditionalData(AdditionalData);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace GitHub.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
#pragma warning disable CS1591
public partial class SecurityAndAnalysis_secret_scanning_ai_detection : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
/// <summary>The status property</summary>
public global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection_status? Status { get; set; }
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection"/> and sets the default values.
/// </summary>
public SecurityAndAnalysis_secret_scanning_ai_detection()
{
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection();
}
/// <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>>
{
{ "status", n => { Status = n.GetEnumValue<global::GitHub.Models.SecurityAndAnalysis_secret_scanning_ai_detection_status>(); } },
};
}
/// <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.Models.SecurityAndAnalysis_secret_scanning_ai_detection_status>("status", Status);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
#pragma warning disable CS1591
public enum SecurityAndAnalysis_secret_scanning_ai_detection_status
#pragma warning restore CS1591
{
[EnumMember(Value = "enabled")]
#pragma warning disable CS1591
Enabled,
#pragma warning restore CS1591
[EnumMember(Value = "disabled")]
#pragma warning disable CS1591
Disabled,
#pragma warning restore CS1591
}
}
6 changes: 6 additions & 0 deletions src/GitHub/Orgs/Item/Actions/ActionsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using GitHub.Orgs.Item.Actions.Cache;
using GitHub.Orgs.Item.Actions.Oidc;
using GitHub.Orgs.Item.Actions.Permissions;
using GitHub.Orgs.Item.Actions.RunnerGroups;
using GitHub.Orgs.Item.Actions.Runners;
using GitHub.Orgs.Item.Actions.Secrets;
using GitHub.Orgs.Item.Actions.Variables;
Expand Down Expand Up @@ -35,6 +36,11 @@ public partial class ActionsRequestBuilder : BaseRequestBuilder
{
get => new global::GitHub.Orgs.Item.Actions.Permissions.PermissionsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The runnerGroups property</summary>
public global::GitHub.Orgs.Item.Actions.RunnerGroups.RunnerGroupsRequestBuilder RunnerGroups
{
get => new global::GitHub.Orgs.Item.Actions.RunnerGroups.RunnerGroupsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The runners property</summary>
public global::GitHub.Orgs.Item.Actions.Runners.RunnersRequestBuilder Runners
{
Expand Down
Loading

0 comments on commit d81df88

Please sign in to comment.