Skip to content

Commit

Permalink
feat: Updates users (#77)
Browse files Browse the repository at this point in the history
* New updates to generated code

* New updates to generated code
  • Loading branch information
octokitbot authored Sep 30, 2024
1 parent 9703aef commit 927e88a
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 123 deletions.
2 changes: 1 addition & 1 deletion src/GitHub.Octokit.GHES.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.2" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.0" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.12.4" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.12.4" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.12.4" />
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/Models/OrgRulesetConditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace GitHub.Models
{
/// <summary>
/// Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.
/// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class OrgRulesetConditions : IAdditionalDataHolder, IParsable
Expand Down
3 changes: 2 additions & 1 deletion src/GitHub/Models/RepositoryRulesetBypassActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ public partial class RepositoryRulesetBypassActor : IAdditionalDataHolder, IPars
public global::GitHub.Models.RepositoryRulesetBypassActor_actor_type? ActorType { get; set; }
/// <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>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.</summary>
/// <summary>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. Also, `pull_request` is only applicable to branch rulesets.</summary>
public global::GitHub.Models.RepositoryRulesetBypassActor_bypass_mode? BypassMode { get; set; }
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.RepositoryRulesetBypassActor"/> and sets the default values.
/// </summary>
public RepositoryRulesetBypassActor()
{
AdditionalData = new Dictionary<string, object>();
BypassMode = global::GitHub.Models.RepositoryRulesetBypassActor_bypass_mode.Always;
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System;
namespace GitHub.Models
{
/// <summary>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.</summary>
/// <summary>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. Also, `pull_request` is only applicable to branch rulesets.</summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public enum RepositoryRulesetBypassActor_bypass_mode
{
Expand Down
54 changes: 14 additions & 40 deletions src/GitHub/Models/Users.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,23 @@ public partial class Users : IAdditionalDataHolder, IParsable
{
/// <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 fragment property</summary>
/// <summary>Whether this email address is the primary address.</summary>
public bool? Primary { get; set; }
/// <summary>The type of email address.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Fragment { get; set; }
public string? Type { get; set; }
#nullable restore
#else
public string Fragment { get; set; }
public string Type { get; set; }
#endif
/// <summary>The matches property</summary>
/// <summary>The email address.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<global::GitHub.Models.Users_matches>? Matches { get; set; }
public string? Value { get; set; }
#nullable restore
#else
public List<global::GitHub.Models.Users_matches> Matches { get; set; }
#endif
/// <summary>The object_type property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? ObjectType { get; set; }
#nullable restore
#else
public string ObjectType { get; set; }
#endif
/// <summary>The object_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? ObjectUrl { get; set; }
#nullable restore
#else
public string ObjectUrl { get; set; }
#endif
/// <summary>The property property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Property { get; set; }
#nullable restore
#else
public string Property { get; set; }
public string Value { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.Users"/> and sets the default values.
Expand All @@ -79,11 +57,9 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "fragment", n => { Fragment = n.GetStringValue(); } },
{ "matches", n => { Matches = n.GetCollectionOfObjectValues<global::GitHub.Models.Users_matches>(global::GitHub.Models.Users_matches.CreateFromDiscriminatorValue)?.AsList(); } },
{ "object_type", n => { ObjectType = n.GetStringValue(); } },
{ "object_url", n => { ObjectUrl = n.GetStringValue(); } },
{ "property", n => { Property = n.GetStringValue(); } },
{ "primary", n => { Primary = n.GetBoolValue(); } },
{ "type", n => { Type = n.GetStringValue(); } },
{ "value", n => { Value = n.GetStringValue(); } },
};
}
/// <summary>
Expand All @@ -93,11 +69,9 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("fragment", Fragment);
writer.WriteCollectionOfObjectValues<global::GitHub.Models.Users_matches>("matches", Matches);
writer.WriteStringValue("object_type", ObjectType);
writer.WriteStringValue("object_url", ObjectUrl);
writer.WriteStringValue("property", Property);
writer.WriteBoolValue("primary", Primary);
writer.WriteStringValue("type", Type);
writer.WriteStringValue("value", Value);
writer.WriteAdditionalData(AdditionalData);
}
}
Expand Down
75 changes: 0 additions & 75 deletions src/GitHub/Models/Users_matches.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsab
#else
public List<global::GitHub.Models.RepositoryRulesetBypassActor> BypassActors { get; set; }
#endif
/// <summary>Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.</summary>
/// <summary>Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable
#else
public List<global::GitHub.Models.RepositoryRulesetBypassActor> BypassActors { get; set; }
#endif
/// <summary>Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.</summary>
/// <summary>Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "74F535465F8C80AD4EAC12ED7F48EA48BE8FB9A3A04AF726140643312436081CA74E05C7BA5354C118E75C5D6FA4FA0A2DFE539C8B18DB026459DF3A909A7FCA",
"descriptionHash": "42342DB5DA0A2E38D39851FF9B2762416C72313AD8D9F96413AC131558CC65D9D73E2F462F39A044D278D93D0EA99C3AC5344EE58C4EA17062CC84EF94D57E91",
"descriptionLocation": "../../../../../schemas/ghes-3.13.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.18.0",
Expand Down
2 changes: 1 addition & 1 deletion test/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" PrivateAssets="all" />
<PackageReference Include="Moq" Version="4.20.72" />
</ItemGroup>
Expand Down

0 comments on commit 927e88a

Please sign in to comment.