|
| 1 | +// <auto-generated/> |
| 2 | +#pragma warning disable CS0618 |
| 3 | +using Microsoft.Kiota.Abstractions.Extensions; |
| 4 | +using Microsoft.Kiota.Abstractions.Serialization; |
| 5 | +using System.Collections.Generic; |
| 6 | +using System.IO; |
| 7 | +using System; |
| 8 | +namespace GitHub.Models |
| 9 | +{ |
| 10 | + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] |
| 11 | + #pragma warning disable CS1591 |
| 12 | + public partial class RunnerGroupsOrg : IAdditionalDataHolder, IParsable |
| 13 | + #pragma warning restore CS1591 |
| 14 | + { |
| 15 | + /// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary> |
| 16 | + public IDictionary<string, object> AdditionalData { get; set; } |
| 17 | + /// <summary>The allows_public_repositories property</summary> |
| 18 | + public bool? AllowsPublicRepositories { get; set; } |
| 19 | + /// <summary>The default property</summary> |
| 20 | + public bool? Default { get; set; } |
| 21 | + /// <summary>The hosted_runners_url property</summary> |
| 22 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 23 | +#nullable enable |
| 24 | + public string? HostedRunnersUrl { get; set; } |
| 25 | +#nullable restore |
| 26 | +#else |
| 27 | + public string HostedRunnersUrl { get; set; } |
| 28 | +#endif |
| 29 | + /// <summary>The id property</summary> |
| 30 | + public double? Id { get; set; } |
| 31 | + /// <summary>The inherited property</summary> |
| 32 | + public bool? Inherited { get; set; } |
| 33 | + /// <summary>The inherited_allows_public_repositories property</summary> |
| 34 | + public bool? InheritedAllowsPublicRepositories { get; set; } |
| 35 | + /// <summary>The name property</summary> |
| 36 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 37 | +#nullable enable |
| 38 | + public string? Name { get; set; } |
| 39 | +#nullable restore |
| 40 | +#else |
| 41 | + public string Name { get; set; } |
| 42 | +#endif |
| 43 | + /// <summary>If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.</summary> |
| 44 | + public bool? RestrictedToWorkflows { get; set; } |
| 45 | + /// <summary>The runners_url property</summary> |
| 46 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 47 | +#nullable enable |
| 48 | + public string? RunnersUrl { get; set; } |
| 49 | +#nullable restore |
| 50 | +#else |
| 51 | + public string RunnersUrl { get; set; } |
| 52 | +#endif |
| 53 | + /// <summary>Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected`</summary> |
| 54 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 55 | +#nullable enable |
| 56 | + public string? SelectedRepositoriesUrl { get; set; } |
| 57 | +#nullable restore |
| 58 | +#else |
| 59 | + public string SelectedRepositoriesUrl { get; set; } |
| 60 | +#endif |
| 61 | + /// <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> |
| 62 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 63 | +#nullable enable |
| 64 | + public List<string>? SelectedWorkflows { get; set; } |
| 65 | +#nullable restore |
| 66 | +#else |
| 67 | + public List<string> SelectedWorkflows { get; set; } |
| 68 | +#endif |
| 69 | + /// <summary>The visibility property</summary> |
| 70 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 71 | +#nullable enable |
| 72 | + public string? Visibility { get; set; } |
| 73 | +#nullable restore |
| 74 | +#else |
| 75 | + public string Visibility { get; set; } |
| 76 | +#endif |
| 77 | + /// <summary>If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified.</summary> |
| 78 | + public bool? WorkflowRestrictionsReadOnly { get; set; } |
| 79 | + /// <summary> |
| 80 | + /// Instantiates a new <see cref="global::GitHub.Models.RunnerGroupsOrg"/> and sets the default values. |
| 81 | + /// </summary> |
| 82 | + public RunnerGroupsOrg() |
| 83 | + { |
| 84 | + AdditionalData = new Dictionary<string, object>(); |
| 85 | + } |
| 86 | + /// <summary> |
| 87 | + /// Creates a new instance of the appropriate class based on discriminator value |
| 88 | + /// </summary> |
| 89 | + /// <returns>A <see cref="global::GitHub.Models.RunnerGroupsOrg"/></returns> |
| 90 | + /// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param> |
| 91 | + public static global::GitHub.Models.RunnerGroupsOrg CreateFromDiscriminatorValue(IParseNode parseNode) |
| 92 | + { |
| 93 | + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); |
| 94 | + return new global::GitHub.Models.RunnerGroupsOrg(); |
| 95 | + } |
| 96 | + /// <summary> |
| 97 | + /// The deserialization information for the current model |
| 98 | + /// </summary> |
| 99 | + /// <returns>A IDictionary<string, Action<IParseNode>></returns> |
| 100 | + public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() |
| 101 | + { |
| 102 | + return new Dictionary<string, Action<IParseNode>> |
| 103 | + { |
| 104 | + { "allows_public_repositories", n => { AllowsPublicRepositories = n.GetBoolValue(); } }, |
| 105 | + { "default", n => { Default = n.GetBoolValue(); } }, |
| 106 | + { "hosted_runners_url", n => { HostedRunnersUrl = n.GetStringValue(); } }, |
| 107 | + { "id", n => { Id = n.GetDoubleValue(); } }, |
| 108 | + { "inherited", n => { Inherited = n.GetBoolValue(); } }, |
| 109 | + { "inherited_allows_public_repositories", n => { InheritedAllowsPublicRepositories = n.GetBoolValue(); } }, |
| 110 | + { "name", n => { Name = n.GetStringValue(); } }, |
| 111 | + { "restricted_to_workflows", n => { RestrictedToWorkflows = n.GetBoolValue(); } }, |
| 112 | + { "runners_url", n => { RunnersUrl = n.GetStringValue(); } }, |
| 113 | + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, |
| 114 | + { "selected_workflows", n => { SelectedWorkflows = n.GetCollectionOfPrimitiveValues<string>()?.AsList(); } }, |
| 115 | + { "visibility", n => { Visibility = n.GetStringValue(); } }, |
| 116 | + { "workflow_restrictions_read_only", n => { WorkflowRestrictionsReadOnly = n.GetBoolValue(); } }, |
| 117 | + }; |
| 118 | + } |
| 119 | + /// <summary> |
| 120 | + /// Serializes information the current object |
| 121 | + /// </summary> |
| 122 | + /// <param name="writer">Serialization writer to use to serialize this model</param> |
| 123 | + public virtual void Serialize(ISerializationWriter writer) |
| 124 | + { |
| 125 | + _ = writer ?? throw new ArgumentNullException(nameof(writer)); |
| 126 | + writer.WriteBoolValue("allows_public_repositories", AllowsPublicRepositories); |
| 127 | + writer.WriteBoolValue("default", Default); |
| 128 | + writer.WriteStringValue("hosted_runners_url", HostedRunnersUrl); |
| 129 | + writer.WriteDoubleValue("id", Id); |
| 130 | + writer.WriteBoolValue("inherited", Inherited); |
| 131 | + writer.WriteBoolValue("inherited_allows_public_repositories", InheritedAllowsPublicRepositories); |
| 132 | + writer.WriteStringValue("name", Name); |
| 133 | + writer.WriteBoolValue("restricted_to_workflows", RestrictedToWorkflows); |
| 134 | + writer.WriteStringValue("runners_url", RunnersUrl); |
| 135 | + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); |
| 136 | + writer.WriteCollectionOfPrimitiveValues<string>("selected_workflows", SelectedWorkflows); |
| 137 | + writer.WriteStringValue("visibility", Visibility); |
| 138 | + writer.WriteBoolValue("workflow_restrictions_read_only", WorkflowRestrictionsReadOnly); |
| 139 | + writer.WriteAdditionalData(AdditionalData); |
| 140 | + } |
| 141 | + } |
| 142 | +} |
| 143 | +#pragma warning restore CS0618 |
0 commit comments