Skip to content

Commit

Permalink
New updates to generated code (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Oct 15, 2024
1 parent e4434dc commit c6419ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 115 deletions.
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.

0 comments on commit c6419ff

Please sign in to comment.