Skip to content

Commit

Permalink
Regenerated API clients with Kiota
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 11, 2024
1 parent 51fa359 commit 6154e86
Show file tree
Hide file tree
Showing 36 changed files with 260 additions and 169 deletions.
11 changes: 6 additions & 5 deletions get-started/azure-auth/cli/src/Client/GetUserApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
using System.Text;
using System.Threading.Tasks;
using System;
namespace GetUserClient.ApiClient {
namespace GetUserClient.ApiClient
{
/// <summary>
/// The main entry point of the SDK, exposes the configuration and the fluent API.
/// </summary>
public class GetUserApiClient : BaseCliRequestBuilder
public class GetUserApiClient : BaseCliRequestBuilder
{
/// <summary>
/// The me property
Expand All @@ -29,7 +30,7 @@ public Command BuildMeNavCommand()
{
var command = new Command("me");
command.Description = "The me property";
var builder = new MeRequestBuilder(PathParameters);
var builder = new GetUserClient.ApiClient.Me.MeRequestBuilder(PathParameters);
var execCommands = new List<Command>();
execCommands.Add(builder.BuildGetCommand());
foreach (var cmd in execCommands)
Expand All @@ -39,7 +40,7 @@ public Command BuildMeNavCommand()
return command;
}
/// <summary>
/// Instantiates a new <see cref="GetUserApiClient"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.GetUserApiClient"/> and sets the default values.
/// </summary>
/// <returns>A <see cref="Command"/></returns>
public Command BuildRootCommand()
Expand All @@ -50,7 +51,7 @@ public Command BuildRootCommand()
return command;
}
/// <summary>
/// Instantiates a new <see cref="GetUserApiClient"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.GetUserApiClient"/> and sets the default values.
/// </summary>
public GetUserApiClient() : base("{+baseurl}", new Dictionary<string, object>())
{
Expand Down
9 changes: 5 additions & 4 deletions get-started/azure-auth/cli/src/Client/Me/MeRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
using System.Threading.Tasks;
using System.Threading;
using System;
namespace GetUserClient.ApiClient.Me {
namespace GetUserClient.ApiClient.Me
{
/// <summary>
/// Builds and executes requests for operations under \me
/// </summary>
public class MeRequestBuilder : BaseCliRequestBuilder
public class MeRequestBuilder : BaseCliRequestBuilder
{
/// <returns>A <see cref="Command"/></returns>
public Command BuildGetCommand()
Expand All @@ -44,14 +45,14 @@ public Command BuildGetCommand()
return command;
}
/// <summary>
/// Instantiates a new <see cref="MeRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.Me.MeRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
public MeRequestBuilder(Dictionary<string, object> pathParameters) : base("{+baseurl}/me", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="MeRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.Me.MeRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public MeRequestBuilder(string rawUrl) : base("{+baseurl}/me", rawUrl)
Expand Down
17 changes: 9 additions & 8 deletions get-started/azure-auth/cli/src/Client/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
using System.IO;
using System.Linq;
using System;
namespace GetUserClient.ApiClient.Models {
namespace GetUserClient.ApiClient.Models
{
#pragma warning disable CS1591
public class User : IAdditionalDataHolder, IParsable
public class User : 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>
Expand All @@ -28,7 +29,7 @@ public class User : IAdditionalDataHolder, IParsable
public string Id { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="User"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.Models.User"/> and sets the default values.
/// </summary>
public User()
{
Expand All @@ -37,12 +38,12 @@ public User()
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="User"/></returns>
/// <returns>A <see cref="GetUserClient.ApiClient.Models.User"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static User CreateFromDiscriminatorValue(IParseNode parseNode)
public static GetUserClient.ApiClient.Models.User CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new User();
return new GetUserClient.ApiClient.Models.User();
}
/// <summary>
/// The deserialization information for the current model
Expand All @@ -52,8 +53,8 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"displayName", n => { DisplayName = n.GetStringValue(); } },
{"id", n => { Id = n.GetStringValue(); } },
{ "displayName", n => { DisplayName = n.GetStringValue(); } },
{ "id", n => { Id = n.GetStringValue(); } },
};
}
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/cli/src/Client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
"kiotaVersion": "1.15.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "GetUserClient.ApiClient",
"language": "CLI",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
Expand Down
11 changes: 6 additions & 5 deletions get-started/azure-auth/dotnet/src/Client/GetUserApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
using System.Linq;
using System.Threading.Tasks;
using System;
namespace GetUserClient.ApiClient {
namespace GetUserClient.ApiClient
{
/// <summary>
/// The main entry point of the SDK, exposes the configuration and the fluent API.
/// </summary>
public class GetUserApiClient : BaseRequestBuilder
public class GetUserApiClient : BaseRequestBuilder
{
/// <summary>The me property</summary>
public MeRequestBuilder Me
public GetUserClient.ApiClient.Me.MeRequestBuilder Me
{
get => new MeRequestBuilder(PathParameters, RequestAdapter);
get => new GetUserClient.ApiClient.Me.MeRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="GetUserApiClient"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.GetUserApiClient"/> and sets the default values.
/// </summary>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public GetUserApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>())
Expand Down
25 changes: 13 additions & 12 deletions get-started/azure-auth/dotnet/src/Client/Me/MeRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,43 @@
using System.Threading.Tasks;
using System.Threading;
using System;
namespace GetUserClient.ApiClient.Me {
namespace GetUserClient.ApiClient.Me
{
/// <summary>
/// Builds and executes requests for operations under \me
/// </summary>
public class MeRequestBuilder : BaseRequestBuilder
public class MeRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new <see cref="MeRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.Me.MeRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public MeRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="MeRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.Me.MeRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public MeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me", rawUrl)
{
}
/// <returns>A <see cref="User"/></returns>
/// <returns>A <see cref="GetUserClient.ApiClient.Models.User"/></returns>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<User?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<GetUserClient.ApiClient.Models.User?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<User> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<GetUserClient.ApiClient.Models.User> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendAsync<User>(requestInfo, User.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<GetUserClient.ApiClient.Models.User>(requestInfo, GetUserClient.ApiClient.Models.User.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand All @@ -64,17 +65,17 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<De
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <returns>A <see cref="MeRequestBuilder"/></returns>
/// <returns>A <see cref="GetUserClient.ApiClient.Me.MeRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public MeRequestBuilder WithUrl(string rawUrl)
public GetUserClient.ApiClient.Me.MeRequestBuilder WithUrl(string rawUrl)
{
return new MeRequestBuilder(rawUrl, RequestAdapter);
return new GetUserClient.ApiClient.Me.MeRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
public class MeRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
public class MeRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
Expand Down
17 changes: 9 additions & 8 deletions get-started/azure-auth/dotnet/src/Client/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
using System.IO;
using System.Linq;
using System;
namespace GetUserClient.ApiClient.Models {
namespace GetUserClient.ApiClient.Models
{
#pragma warning disable CS1591
public class User : IAdditionalDataHolder, IParsable
public class User : 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>
Expand All @@ -28,7 +29,7 @@ public class User : IAdditionalDataHolder, IParsable
public string Id { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="User"/> and sets the default values.
/// Instantiates a new <see cref="GetUserClient.ApiClient.Models.User"/> and sets the default values.
/// </summary>
public User()
{
Expand All @@ -37,12 +38,12 @@ public User()
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="User"/></returns>
/// <returns>A <see cref="GetUserClient.ApiClient.Models.User"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static User CreateFromDiscriminatorValue(IParseNode parseNode)
public static GetUserClient.ApiClient.Models.User CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new User();
return new GetUserClient.ApiClient.Models.User();
}
/// <summary>
/// The deserialization information for the current model
Expand All @@ -52,8 +53,8 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"displayName", n => { DisplayName = n.GetStringValue(); } },
{"id", n => { Id = n.GetStringValue(); } },
{ "displayName", n => { DisplayName = n.GetStringValue(); } },
{ "id", n => { Id = n.GetStringValue(); } },
};
}
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/dotnet/src/Client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
"kiotaVersion": "1.15.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "GetUserClient.ApiClient",
"language": "CSharp",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/go/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
"kiotaVersion": "1.15.0",
"clientClassName": "GraphApiClient",
"clientNamespaceName": "getuser/client",
"language": "Go",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../../../../../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
"kiotaVersion": "1.15.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "getuserclient.apiclient",
"language": "Java",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
Expand Down
6 changes: 6 additions & 0 deletions get-started/azure-auth/php/client/GraphApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
use Microsoft\Kiota\Abstractions\ApiClientBuilder;
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
use Microsoft\Kiota\Abstractions\RequestAdapter;
use Microsoft\Kiota\Serialization\Form\FormParseNodeFactory;
use Microsoft\Kiota\Serialization\Form\FormSerializationWriterFactory;
use Microsoft\Kiota\Serialization\Json\JsonParseNodeFactory;
use Microsoft\Kiota\Serialization\Json\JsonSerializationWriterFactory;
use Microsoft\Kiota\Serialization\Multipart\MultipartSerializationWriterFactory;
use Microsoft\Kiota\Serialization\Text\TextParseNodeFactory;
use Microsoft\Kiota\Serialization\Text\TextSerializationWriterFactory;

Expand All @@ -31,8 +34,11 @@ public function __construct(RequestAdapter $requestAdapter) {
parent::__construct($requestAdapter, [], '{+baseurl}');
ApiClientBuilder::registerDefaultSerializer(JsonSerializationWriterFactory::class);
ApiClientBuilder::registerDefaultSerializer(TextSerializationWriterFactory::class);
ApiClientBuilder::registerDefaultSerializer(FormSerializationWriterFactory::class);
ApiClientBuilder::registerDefaultSerializer(MultipartSerializationWriterFactory::class);
ApiClientBuilder::registerDefaultDeserializer(JsonParseNodeFactory::class);
ApiClientBuilder::registerDefaultDeserializer(TextParseNodeFactory::class);
ApiClientBuilder::registerDefaultDeserializer(FormParseNodeFactory::class);
if (empty($this->requestAdapter->getBaseUrl())) {
$this->requestAdapter->setBaseUrl('https://graph.microsoft.com/v1.0');
}
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/php/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
"kiotaVersion": "1.15.0",
"clientClassName": "GraphApiClient",
"clientNamespaceName": "GetUser\\Client",
"language": "PHP",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/python/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
"kiotaVersion": "1.15.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "client",
"language": "Python",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",
Expand Down
Loading

0 comments on commit 6154e86

Please sign in to comment.