Skip to content

Commit

Permalink
Merge pull request #5268 from microsoft/regen/clients-1710421460
Browse files Browse the repository at this point in the history
Regenerated API clients with Kiota 1.12.0
  • Loading branch information
jasonjoh authored Mar 14, 2024
2 parents 9009243 + f65f822 commit 4a72a1e
Show file tree
Hide file tree
Showing 64 changed files with 281 additions and 280 deletions.
6 changes: 4 additions & 2 deletions get-started/azure-auth/cli/src/Client/GetUserApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class GetUserApiClient : BaseCliRequestBuilder {
/// <summary>
/// The me property
/// </summary>
/// <returns>A <see cref="Command"/></returns>
public Command BuildMeNavCommand() {
var command = new Command("me");
command.Description = "The me property";
Expand All @@ -36,16 +37,17 @@ public Command BuildMeNavCommand() {
return command;
}
/// <summary>
/// Instantiates a new GetUserApiClient and sets the default values.
/// Instantiates a new <see cref="GetUserApiClient"/> and sets the default values.
/// </summary>
/// <returns>A <see cref="Command"/></returns>
public Command BuildRootCommand() {
var command = new RootCommand();
command.Description = "Instantiates a new GetUserApiClient and sets the default values.";
command.AddCommand(BuildMeNavCommand());
return command;
}
/// <summary>
/// Instantiates a new GetUserApiClient and sets the default values.
/// Instantiates a new <see cref="GetUserApiClient"/> and sets the default values.
/// </summary>
public GetUserApiClient() : base("{+baseurl}", new Dictionary<string, object>()) {
}
Expand Down
6 changes: 4 additions & 2 deletions get-started/azure-auth/cli/src/Client/Me/MeRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace GetUserClient.ApiClient.Me {
/// Builds and executes requests for operations under \me
/// </summary>
public class MeRequestBuilder : BaseCliRequestBuilder {
/// <returns>A <see cref="Command"/></returns>
public Command BuildGetCommand() {
var command = new Command("get");
var outputOption = new Option<FormatterType>("--output", () => FormatterType.JSON);
Expand All @@ -41,17 +42,18 @@ public Command BuildGetCommand() {
return command;
}
/// <summary>
/// Instantiates a new MeRequestBuilder and sets the default values.
/// Instantiates a new <see cref="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 MeRequestBuilder and sets the default values.
/// Instantiates a new <see cref="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) {
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <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
Expand Down
4 changes: 3 additions & 1 deletion get-started/azure-auth/cli/src/Client/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ public class User : IAdditionalDataHolder, IParsable {
public string Id { get; set; }
#endif
/// <summary>
/// Instantiates a new user and sets the default values.
/// Instantiates a new <see cref="User"/> and sets the default values.
/// </summary>
public User() {
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="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) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
Expand All @@ -41,6 +42,7 @@ public static User CreateFromDiscriminatorValue(IParseNode parseNode) {
/// <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>> {
{"displayName", n => { DisplayName = n.GetStringValue(); } },
Expand Down
2 changes: 1 addition & 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,7 +2,7 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.1",
"kiotaVersion": "1.12.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "GetUserClient.ApiClient",
"language": "CLI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class GetUserApiClient : BaseRequestBuilder {
new MeRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new GetUserApiClient and sets the default values.
/// Instantiates a new <see cref="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
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ namespace GetUserClient.ApiClient.Me {
/// </summary>
public class MeRequestBuilder : BaseRequestBuilder {
/// <summary>
/// Instantiates a new MeRequestBuilder and sets the default values.
/// Instantiates a new <see cref="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 MeRequestBuilder and sets the default values.
/// Instantiates a new <see cref="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>
/// <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
Expand All @@ -39,6 +40,7 @@ public async Task<User> GetAsync(Action<RequestConfiguration<DefaultQueryParamet
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendAsync<User>(requestInfo, 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>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand All @@ -55,6 +57,7 @@ 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>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public MeRequestBuilder WithUrl(string rawUrl) {
return new MeRequestBuilder(rawUrl, RequestAdapter);
Expand Down
4 changes: 3 additions & 1 deletion get-started/azure-auth/dotnet/src/Client/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ public class User : IAdditionalDataHolder, IParsable {
public string Id { get; set; }
#endif
/// <summary>
/// Instantiates a new user and sets the default values.
/// Instantiates a new <see cref="User"/> and sets the default values.
/// </summary>
public User() {
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="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) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
Expand All @@ -41,6 +42,7 @@ public static User CreateFromDiscriminatorValue(IParseNode parseNode) {
/// <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>> {
{"displayName", n => { DisplayName = n.GetStringValue(); } },
Expand Down
2 changes: 1 addition & 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,7 +2,7 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.1",
"kiotaVersion": "1.12.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "GetUserClient.ApiClient",
"language": "CSharp",
Expand Down
1 change: 1 addition & 0 deletions get-started/azure-auth/go/client/graph_api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func NewGraphApiClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa
return m
}
// Me the me property
// returns a *MeRequestBuilder when successful
func (m *GraphApiClient) Me()(*i1e6e8d869c28dd4f8a4f911410f9299cd7cd087e16dead40558d14efc1888900.MeRequestBuilder) {
return i1e6e8d869c28dd4f8a4f911410f9299cd7cd087e16dead40558d14efc1888900.NewMeRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
2 changes: 1 addition & 1 deletion get-started/azure-auth/go/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.1",
"kiotaVersion": "1.12.0",
"clientClassName": "GraphApiClient",
"clientNamespaceName": "getuser/client",
"language": "Go",
Expand Down
3 changes: 3 additions & 0 deletions get-started/azure-auth/go/client/me/me_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func NewMeRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c9
urlParams["request-raw-url"] = rawUrl
return NewMeRequestBuilderInternal(urlParams, requestAdapter)
}
// returns a Userable when successful
func (m *MeRequestBuilder) Get(ctx context.Context, requestConfiguration *MeRequestBuilderGetRequestConfiguration)(i13d01ec67a100ea0422e7ae032f94dabb711674daaecc31801c41bed685e637a.Userable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
Expand All @@ -44,6 +45,7 @@ func (m *MeRequestBuilder) Get(ctx context.Context, requestConfiguration *MeRequ
}
return res.(i13d01ec67a100ea0422e7ae032f94dabb711674daaecc31801c41bed685e637a.Userable), nil
}
// returns a *RequestInformation when successful
func (m *MeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MeRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
Expand All @@ -54,6 +56,7 @@ func (m *MeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestC
return requestInfo, nil
}
// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
// returns a *MeRequestBuilder when successful
func (m *MeRequestBuilder) WithUrl(rawUrl string)(*MeRequestBuilder) {
return NewMeRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}
9 changes: 6 additions & 3 deletions get-started/azure-auth/go/client/models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)

// User
type User struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
Expand All @@ -13,26 +12,30 @@ type User struct {
// The id property
id *string
}
// NewUser instantiates a new user and sets the default values.
// NewUser instantiates a new User and sets the default values.
func NewUser()(*User) {
m := &User{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewUser(), nil
}
// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
// returns a map[string]any when successful
func (m *User) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetDisplayName gets the displayName property value. The displayName property
// returns a *string when successful
func (m *User) GetDisplayName()(*string) {
return m.displayName
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *User) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
Expand All @@ -58,6 +61,7 @@ func (m *User) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a
return res
}
// GetId gets the id property value. The id property
// returns a *string when successful
func (m *User) GetId()(*string) {
return m.id
}
Expand Down Expand Up @@ -95,7 +99,6 @@ func (m *User) SetDisplayName(value *string)() {
func (m *User) SetId(value *string)() {
m.id = value
}
// Userable
type Userable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
public class GetUserApiClient extends BaseRequestBuilder {
/**
* The me property
* @return a {@link MeRequestBuilder}
*/
@jakarta.annotation.Nonnull
public MeRequestBuilder me() {
return new MeRequestBuilder(pathParameters, requestAdapter);
}
/**
* Instantiates a new GetUserApiClient and sets the default values.
* Instantiates a new {@link GetUserApiClient} and sets the default values.
* @param requestAdapter The request adapter to use to execute the requests.
*/
public GetUserApiClient(@jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "../../../../../../../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.1",
"kiotaVersion": "1.12.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "getuserclient.apiclient",
"language": "Java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,47 @@
@jakarta.annotation.Generated("com.microsoft.kiota")
public class MeRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new MeRequestBuilder and sets the default values.
* Instantiates a new {@link MeRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
public MeRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/me", pathParameters);
}
/**
* Instantiates a new MeRequestBuilder and sets the default values.
* Instantiates a new {@link MeRequestBuilder} and sets the default values.
* @param rawUrl The raw URL to use for the request builder.
* @param requestAdapter The request adapter to use to execute the requests.
*/
public MeRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {
super(requestAdapter, "{+baseurl}/me", rawUrl);
}
/**
* @return a User
* @return a {@link User}
*/
@jakarta.annotation.Nullable
public User get() {
return get(null);
}
/**
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a User
* @return a {@link User}
*/
@jakarta.annotation.Nullable
public User get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
final RequestInformation requestInfo = toGetRequestInformation(requestConfiguration);
return this.requestAdapter.send(requestInfo, null, User::createFromDiscriminatorValue);
}
/**
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
return toGetRequestInformation(null);
}
/**
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
Expand All @@ -71,7 +71,7 @@ public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable f
/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param rawUrl The raw URL to use for the request builder.
* @return a MeRequestBuilder
* @return a {@link MeRequestBuilder}
*/
@jakarta.annotation.Nonnull
public MeRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
Expand Down
Loading

0 comments on commit 4a72a1e

Please sign in to comment.