Skip to content

Commit

Permalink
Changes in generated code (#25)
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 27, 2024
1 parent 12e930a commit 9b88a21
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/GitHub/Models/CopilotOrganizationDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace GitHub.Models
{
/// <summary>
/// Information about the seat breakdown and policies set for an organization with a Copilot Business subscription.
/// Information about the seat breakdown and policies set for an organization with a Copilot Business or Copilot Enterprise subscription.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class CopilotOrganizationDetails : IAdditionalDataHolder, IParsable
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/Models/OrganizationFull.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace GitHub.Models
{
/// <summary>
/// Organization Full
/// Prevents users in the organization from using insecure methods of two-factor authentication to fulfill a two-factor requirement.GitHub currently defines SMS as an insecure method of two-factor authentication.If your users are managed by the enterprise this policy will not affect them. The first admin account of the enterprise will still be affected.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class OrganizationFull : IAdditionalDataHolder, IParsable
Expand Down
54 changes: 40 additions & 14 deletions src/GitHub/Models/Users.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,45 @@ 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>Whether this email address is the primary address.</summary>
public bool? Primary { get; set; }
/// <summary>The type of email address.</summary>
/// <summary>The fragment property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Type { get; set; }
public string? Fragment { get; set; }
#nullable restore
#else
public string Type { get; set; }
public string Fragment { get; set; }
#endif
/// <summary>The email address.</summary>
/// <summary>The matches property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Value { get; set; }
public List<global::GitHub.Models.Users_matches>? Matches { get; set; }
#nullable restore
#else
public string Value { get; set; }
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; }
#endif
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.Users"/> and sets the default values.
Expand All @@ -57,9 +79,11 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "primary", n => { Primary = n.GetBoolValue(); } },
{ "type", n => { Type = n.GetStringValue(); } },
{ "value", n => { Value = n.GetStringValue(); } },
{ "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(); } },
};
}
/// <summary>
Expand All @@ -69,9 +93,11 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteBoolValue("primary", Primary);
writer.WriteStringValue("type", Type);
writer.WriteStringValue("value", Value);
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.WriteAdditionalData(AdditionalData);
}
}
Expand Down
75 changes: 75 additions & 0 deletions src/GitHub/Models/Users_matches.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// <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.18.0")]
#pragma warning disable CS1591
public partial class Users_matches : 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 indices property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<int?>? Indices { get; set; }
#nullable restore
#else
public List<int?> Indices { get; set; }
#endif
/// <summary>The text property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Text { get; set; }
#nullable restore
#else
public string Text { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.Users_matches"/> and sets the default values.
/// </summary>
public Users_matches()
{
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.Users_matches"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::GitHub.Models.Users_matches CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::GitHub.Models.Users_matches();
}
/// <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>>
{
{ "indices", n => { Indices = n.GetCollectionOfPrimitiveValues<int?>()?.AsList(); } },
{ "text", n => { Text = n.GetStringValue(); } },
};
}
/// <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.WriteCollectionOfPrimitiveValues<int?>("indices", Indices);
writer.WriteStringValue("text", Text);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) :
{
}
/// <summary>
/// Gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
/// Gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
/// API method documentation <see href="https://docs.github.com/enterprise-cloud@latest//rest/codespaces/repository-secrets#get-a-repository-public-key" />
/// </summary>
/// <returns>A <see cref="global::GitHub.Models.CodespacesPublicKey"/></returns>
Expand All @@ -53,7 +53,7 @@ public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) :
return await RequestAdapter.SendAsync<global::GitHub.Models.CodespacesPublicKey>(requestInfo, global::GitHub.Models.CodespacesPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.Anyone with read access to the repository can use this endpoint.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
/// Gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public UpdateBranchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)
{
}
/// <summary>
/// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
/// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository.
/// API method documentation <see href="https://docs.github.com/enterprise-cloud@latest//rest/pulls/pulls#update-a-pull-request-branch" />
/// </summary>
/// <returns>A <see cref="global::GitHub.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutResponse"/></returns>
Expand Down Expand Up @@ -62,7 +62,7 @@ public UpdateBranchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)
return await RequestAdapter.SendAsync<global::GitHub.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutResponse>(requestInfo, global::GitHub.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
/// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</param>
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": "28846D5BC35F098F6CC043EBD2CD0315C25D925DC86BA346879A8319E9FAE68DC0D6F517E8C766773C3C2E526B85023F15C0276F6295FF9021BB198C58CC010C",
"descriptionHash": "824C10326A1DDCAD93CAF1528DE8AFF9E1CE0401CF9C9CE834BB8098351EDD76A3F7D4AFDBBABE854901BCB5A5D28AE3217A362A04BBBD687DF6A6B16F32F619",
"descriptionLocation": "../../../../../schemas/ghec.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.18.0",
Expand Down

0 comments on commit 9b88a21

Please sign in to comment.