chore: updates petstore clients to 1.16

This commit is contained in:
Vincent Biret 2024-07-05 13:26:28 -04:00
Родитель 6a0bcae874
Коммит 1154e28628
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 32426322EDFFB7E3
106 изменённых файлов: 1600 добавлений и 876 удалений

Просмотреть файл

@ -1,11 +1,16 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
public class ApiResponse : IParsable {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class ApiResponse : IParsable
#pragma warning restore CS1591
{
/// <summary>The code property</summary>
public int? Code { get; set; }
/// <summary>The message property</summary>
@ -27,26 +32,32 @@ namespace KiotaSamples.PetStoreSdk.Models {
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.ApiResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static ApiResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
public static global::KiotaSamples.PetStoreSdk.Models.ApiResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new ApiResponse();
return new global::KiotaSamples.PetStoreSdk.Models.ApiResponse();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"code", n => { Code = n.GetIntValue(); } },
{"message", n => { Message = n.GetStringValue(); } },
{"type", n => { Type = n.GetStringValue(); } },
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "code", n => { Code = n.GetIntValue(); } },
{ "message", n => { Message = n.GetStringValue(); } },
{ "type", n => { Type = 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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteIntValue("code", Code);
writer.WriteStringValue("message", Message);

Просмотреть файл

@ -1,11 +1,16 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
public class Category : IParsable {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class Category : IParsable
#pragma warning restore CS1591
{
/// <summary>The id property</summary>
public long? Id { get; set; }
/// <summary>The name property</summary>
@ -19,25 +24,31 @@ namespace KiotaSamples.PetStoreSdk.Models {
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.Category"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static Category CreateFromDiscriminatorValue(IParseNode parseNode) {
public static global::KiotaSamples.PetStoreSdk.Models.Category CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new Category();
return new global::KiotaSamples.PetStoreSdk.Models.Category();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"id", n => { Id = n.GetLongValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "id", n => { Id = n.GetLongValue(); } },
{ "name", n => { Name = 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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteLongValue("id", Id);
writer.WriteStringValue("name", Name);

Просмотреть файл

@ -1,11 +1,16 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
public class Order : IParsable {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class Order : IParsable
#pragma warning restore CS1591
{
/// <summary>The complete property</summary>
public bool? Complete { get; set; }
/// <summary>The id property</summary>
@ -17,40 +22,46 @@ namespace KiotaSamples.PetStoreSdk.Models {
/// <summary>The shipDate property</summary>
public DateTimeOffset? ShipDate { get; set; }
/// <summary>Order Status</summary>
public Order_status? Status { get; set; }
public global::KiotaSamples.PetStoreSdk.Models.Order_status? Status { get; set; }
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.Order"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static Order CreateFromDiscriminatorValue(IParseNode parseNode) {
public static global::KiotaSamples.PetStoreSdk.Models.Order CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new Order();
return new global::KiotaSamples.PetStoreSdk.Models.Order();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"complete", n => { Complete = n.GetBoolValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"petId", n => { PetId = n.GetLongValue(); } },
{"quantity", n => { Quantity = n.GetIntValue(); } },
{"shipDate", n => { ShipDate = n.GetDateTimeOffsetValue(); } },
{"status", n => { Status = n.GetEnumValue<Order_status>(); } },
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "complete", n => { Complete = n.GetBoolValue(); } },
{ "id", n => { Id = n.GetLongValue(); } },
{ "petId", n => { PetId = n.GetLongValue(); } },
{ "quantity", n => { Quantity = n.GetIntValue(); } },
{ "shipDate", n => { ShipDate = n.GetDateTimeOffsetValue(); } },
{ "status", n => { Status = n.GetEnumValue<global::KiotaSamples.PetStoreSdk.Models.Order_status>(); } },
};
}
/// <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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteBoolValue("complete", Complete);
writer.WriteLongValue("id", Id);
writer.WriteLongValue("petId", PetId);
writer.WriteIntValue("quantity", Quantity);
writer.WriteDateTimeOffsetValue("shipDate", ShipDate);
writer.WriteEnumValue<Order_status>("status", Status);
writer.WriteEnumValue<global::KiotaSamples.PetStoreSdk.Models.Order_status>("status", Status);
}
}
}

Просмотреть файл

@ -1,14 +1,23 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
/// <summary>Order Status</summary>
public enum Order_status {
public enum Order_status
{
[EnumMember(Value = "placed")]
#pragma warning disable CS1591
Placed,
#pragma warning restore CS1591
[EnumMember(Value = "approved")]
#pragma warning disable CS1591
Approved,
#pragma warning restore CS1591
[EnumMember(Value = "delivered")]
#pragma warning disable CS1591
Delivered,
#pragma warning restore CS1591
}
}

Просмотреть файл

@ -1,18 +1,23 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
public class Pet : IParsable {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class Pet : IParsable
#pragma warning restore CS1591
{
/// <summary>The category property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public KiotaSamples.PetStoreSdk.Models.Category? Category { get; set; }
public global::KiotaSamples.PetStoreSdk.Models.Category? Category { get; set; }
#nullable restore
#else
public KiotaSamples.PetStoreSdk.Models.Category Category { get; set; }
public global::KiotaSamples.PetStoreSdk.Models.Category Category { get; set; }
#endif
/// <summary>The id property</summary>
public long? Id { get; set; }
@ -33,48 +38,54 @@ namespace KiotaSamples.PetStoreSdk.Models {
public List<string> PhotoUrls { get; set; }
#endif
/// <summary>pet status in the store</summary>
public Pet_status? Status { get; set; }
public global::KiotaSamples.PetStoreSdk.Models.Pet_status? Status { get; set; }
/// <summary>The tags property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<Tag>? Tags { get; set; }
public List<global::KiotaSamples.PetStoreSdk.Models.Tag>? Tags { get; set; }
#nullable restore
#else
public List<Tag> Tags { get; set; }
public List<global::KiotaSamples.PetStoreSdk.Models.Tag> Tags { get; set; }
#endif
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.Pet"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static Pet CreateFromDiscriminatorValue(IParseNode parseNode) {
public static global::KiotaSamples.PetStoreSdk.Models.Pet CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new Pet();
return new global::KiotaSamples.PetStoreSdk.Models.Pet();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"category", n => { Category = n.GetObjectValue<KiotaSamples.PetStoreSdk.Models.Category>(KiotaSamples.PetStoreSdk.Models.Category.CreateFromDiscriminatorValue); } },
{"id", n => { Id = n.GetLongValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"photoUrls", n => { PhotoUrls = n.GetCollectionOfPrimitiveValues<string>()?.ToList(); } },
{"status", n => { Status = n.GetEnumValue<Pet_status>(); } },
{"tags", n => { Tags = n.GetCollectionOfObjectValues<Tag>(Tag.CreateFromDiscriminatorValue)?.ToList(); } },
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "category", n => { Category = n.GetObjectValue<global::KiotaSamples.PetStoreSdk.Models.Category>(global::KiotaSamples.PetStoreSdk.Models.Category.CreateFromDiscriminatorValue); } },
{ "id", n => { Id = n.GetLongValue(); } },
{ "name", n => { Name = n.GetStringValue(); } },
{ "photoUrls", n => { PhotoUrls = n.GetCollectionOfPrimitiveValues<string>()?.AsList(); } },
{ "status", n => { Status = n.GetEnumValue<global::KiotaSamples.PetStoreSdk.Models.Pet_status>(); } },
{ "tags", n => { Tags = n.GetCollectionOfObjectValues<global::KiotaSamples.PetStoreSdk.Models.Tag>(global::KiotaSamples.PetStoreSdk.Models.Tag.CreateFromDiscriminatorValue)?.AsList(); } },
};
}
/// <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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteObjectValue<KiotaSamples.PetStoreSdk.Models.Category>("category", Category);
writer.WriteObjectValue<global::KiotaSamples.PetStoreSdk.Models.Category>("category", Category);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("name", Name);
writer.WriteCollectionOfPrimitiveValues<string>("photoUrls", PhotoUrls);
writer.WriteEnumValue<Pet_status>("status", Status);
writer.WriteCollectionOfObjectValues<Tag>("tags", Tags);
writer.WriteEnumValue<global::KiotaSamples.PetStoreSdk.Models.Pet_status>("status", Status);
writer.WriteCollectionOfObjectValues<global::KiotaSamples.PetStoreSdk.Models.Tag>("tags", Tags);
}
}
}

Просмотреть файл

@ -1,14 +1,23 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
/// <summary>pet status in the store</summary>
public enum Pet_status {
public enum Pet_status
{
[EnumMember(Value = "available")]
#pragma warning disable CS1591
Available,
#pragma warning restore CS1591
[EnumMember(Value = "pending")]
#pragma warning disable CS1591
Pending,
#pragma warning restore CS1591
[EnumMember(Value = "sold")]
#pragma warning disable CS1591
Sold,
#pragma warning restore CS1591
}
}

Просмотреть файл

@ -1,11 +1,16 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
public class Tag : IParsable {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class Tag : IParsable
#pragma warning restore CS1591
{
/// <summary>The id property</summary>
public long? Id { get; set; }
/// <summary>The name property</summary>
@ -19,25 +24,31 @@ namespace KiotaSamples.PetStoreSdk.Models {
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.Tag"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static Tag CreateFromDiscriminatorValue(IParseNode parseNode) {
public static global::KiotaSamples.PetStoreSdk.Models.Tag CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new Tag();
return new global::KiotaSamples.PetStoreSdk.Models.Tag();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"id", n => { Id = n.GetLongValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "id", n => { Id = n.GetLongValue(); } },
{ "name", n => { Name = 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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteLongValue("id", Id);
writer.WriteStringValue("name", Name);

Просмотреть файл

@ -1,11 +1,16 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Models {
public class User : IParsable {
namespace KiotaSamples.PetStoreSdk.Models
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class User : IParsable
#pragma warning restore CS1591
{
/// <summary>The email property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@ -61,31 +66,37 @@ namespace KiotaSamples.PetStoreSdk.Models {
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.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 global::KiotaSamples.PetStoreSdk.Models.User CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new User();
return new global::KiotaSamples.PetStoreSdk.Models.User();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"email", n => { Email = n.GetStringValue(); } },
{"firstName", n => { FirstName = n.GetStringValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"lastName", n => { LastName = n.GetStringValue(); } },
{"password", n => { Password = n.GetStringValue(); } },
{"phone", n => { Phone = n.GetStringValue(); } },
{"userStatus", n => { UserStatus = n.GetIntValue(); } },
{"username", n => { Username = n.GetStringValue(); } },
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "email", n => { Email = n.GetStringValue(); } },
{ "firstName", n => { FirstName = n.GetStringValue(); } },
{ "id", n => { Id = n.GetLongValue(); } },
{ "lastName", n => { LastName = n.GetStringValue(); } },
{ "password", n => { Password = n.GetStringValue(); } },
{ "phone", n => { Phone = n.GetStringValue(); } },
{ "userStatus", n => { UserStatus = n.GetIntValue(); } },
{ "username", n => { Username = 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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("email", Email);
writer.WriteStringValue("firstName", FirstName);

Просмотреть файл

@ -1,58 +1,69 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Pet.FindByStatus {
namespace KiotaSamples.PetStoreSdk.Pet.FindByStatus
{
/// <summary>
/// Builds and executes requests for operations under \pet\findByStatus
/// </summary>
public class FindByStatusRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class FindByStatusRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new FindByStatusRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder"/> 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 FindByStatusRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByStatus?status={status}", pathParameters) {
public FindByStatusRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByStatus?status={status}", pathParameters)
{
}
/// <summary>
/// Instantiates a new FindByStatusRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder"/> 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 FindByStatusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByStatus?status={status}", rawUrl) {
public FindByStatusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByStatus?status={status}", rawUrl)
{
}
/// <summary>
/// Multiple status values can be provided with comma separated strings
/// </summary>
/// <returns>A List&lt;global::KiotaSamples.PetStoreSdk.Models.Pet&gt;</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<List<KiotaSamples.PetStoreSdk.Models.Pet>?> GetAsync(Action<RequestConfiguration<FindByStatusRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<List<global::KiotaSamples.PetStoreSdk.Models.Pet>?> GetAsync(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder.FindByStatusRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<List<KiotaSamples.PetStoreSdk.Models.Pet>> GetAsync(Action<RequestConfiguration<FindByStatusRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<List<global::KiotaSamples.PetStoreSdk.Models.Pet>> GetAsync(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder.FindByStatusRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var collectionResult = await RequestAdapter.SendCollectionAsync<KiotaSamples.PetStoreSdk.Models.Pet>(requestInfo, KiotaSamples.PetStoreSdk.Models.Pet.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
var collectionResult = await RequestAdapter.SendCollectionAsync<global::KiotaSamples.PetStoreSdk.Models.Pet>(requestInfo, global::KiotaSamples.PetStoreSdk.Models.Pet.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.AsList();
}
/// <summary>
/// Multiple status values can be provided with comma separated strings
/// </summary>
/// <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
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<FindByStatusRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder.FindByStatusRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<FindByStatusRequestBuilderGetQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder.FindByStatusRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -62,15 +73,20 @@ namespace KiotaSamples.PetStoreSdk.Pet.FindByStatus {
/// <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="global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public FindByStatusRequestBuilder WithUrl(string rawUrl) {
return new FindByStatusRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Multiple status values can be provided with comma separated strings
/// </summary>
public class FindByStatusRequestBuilderGetQueryParameters {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class FindByStatusRequestBuilderGetQueryParameters
{
/// <summary>Status values that need to be considered for filter</summary>
[Obsolete("This property is deprecated, use StatusAsGetStatusQueryParameterType instead")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("status")]
@ -79,13 +95,25 @@ namespace KiotaSamples.PetStoreSdk.Pet.FindByStatus {
#else
[QueryParameter("status")]
public string[] Status { get; set; }
#endif
/// <summary>Status values that need to be considered for filter</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("status")]
public global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.GetStatusQueryParameterType[]? StatusAsGetStatusQueryParameterType { get; set; }
#nullable restore
#else
[QueryParameter("status")]
public global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.GetStatusQueryParameterType[] StatusAsGetStatusQueryParameterType { get; set; }
#endif
}
/// <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 FindByStatusRequestBuilderGetRequestConfiguration : RequestConfiguration<FindByStatusRequestBuilderGetQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class FindByStatusRequestBuilderGetRequestConfiguration : RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder.FindByStatusRequestBuilderGetQueryParameters>
{
}
}
}

Просмотреть файл

@ -0,0 +1,24 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace KiotaSamples.PetStoreSdk.Pet.FindByStatus
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public enum GetStatusQueryParameterType
#pragma warning restore CS1591
{
[EnumMember(Value = "available")]
#pragma warning disable CS1591
Available,
#pragma warning restore CS1591
[EnumMember(Value = "pending")]
#pragma warning disable CS1591
Pending,
#pragma warning restore CS1591
[EnumMember(Value = "sold")]
#pragma warning disable CS1591
Sold,
#pragma warning restore CS1591
}
}

Просмотреть файл

@ -1,60 +1,71 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Pet.FindByTags {
namespace KiotaSamples.PetStoreSdk.Pet.FindByTags
{
/// <summary>
/// Builds and executes requests for operations under \pet\findByTags
/// </summary>
public class FindByTagsRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class FindByTagsRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new FindByTagsRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder"/> 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 FindByTagsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByTags?tags={tags}", pathParameters) {
public FindByTagsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByTags?tags={tags}", pathParameters)
{
}
/// <summary>
/// Instantiates a new FindByTagsRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder"/> 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 FindByTagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByTags?tags={tags}", rawUrl) {
public FindByTagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/findByTags?tags={tags}", rawUrl)
{
}
/// <summary>
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
/// <returns>A List&lt;global::KiotaSamples.PetStoreSdk.Models.Pet&gt;</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>
[Obsolete("")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<List<KiotaSamples.PetStoreSdk.Models.Pet>?> GetAsync(Action<RequestConfiguration<FindByTagsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<List<global::KiotaSamples.PetStoreSdk.Models.Pet>?> GetAsync(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder.FindByTagsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<List<KiotaSamples.PetStoreSdk.Models.Pet>> GetAsync(Action<RequestConfiguration<FindByTagsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<List<global::KiotaSamples.PetStoreSdk.Models.Pet>> GetAsync(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder.FindByTagsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var collectionResult = await RequestAdapter.SendCollectionAsync<KiotaSamples.PetStoreSdk.Models.Pet>(requestInfo, KiotaSamples.PetStoreSdk.Models.Pet.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
var collectionResult = await RequestAdapter.SendCollectionAsync<global::KiotaSamples.PetStoreSdk.Models.Pet>(requestInfo, global::KiotaSamples.PetStoreSdk.Models.Pet.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.AsList();
}
/// <summary>
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
[Obsolete("")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<FindByTagsRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder.FindByTagsRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<FindByTagsRequestBuilderGetQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder.FindByTagsRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -64,15 +75,19 @@ namespace KiotaSamples.PetStoreSdk.Pet.FindByTags {
/// <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="global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
[Obsolete("")]
public FindByTagsRequestBuilder WithUrl(string rawUrl) {
return new FindByTagsRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
public class FindByTagsRequestBuilderGetQueryParameters {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class FindByTagsRequestBuilderGetQueryParameters
{
/// <summary>Tags to filter by</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@ -88,7 +103,9 @@ namespace KiotaSamples.PetStoreSdk.Pet.FindByTags {
/// 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 FindByTagsRequestBuilderGetRequestConfiguration : RequestConfiguration<FindByTagsRequestBuilderGetQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class FindByTagsRequestBuilderGetRequestConfiguration : RequestConfiguration<global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder.FindByTagsRequestBuilderGetQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,57 +1,68 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Pet.Item.UploadImage {
namespace KiotaSamples.PetStoreSdk.Pet.Item.UploadImage
{
/// <summary>
/// Builds and executes requests for operations under \pet\{petId}\uploadImage
/// </summary>
public class UploadImageRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class UploadImageRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new UploadImageRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.Item.UploadImage.UploadImageRequestBuilder"/> 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 UploadImageRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}/uploadImage", pathParameters) {
public UploadImageRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}/uploadImage", pathParameters)
{
}
/// <summary>
/// Instantiates a new UploadImageRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.Item.UploadImage.UploadImageRequestBuilder"/> 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 UploadImageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}/uploadImage", rawUrl) {
public UploadImageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}/uploadImage", rawUrl)
{
}
/// <summary>
/// uploads an image
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.ApiResponse"/></returns>
/// <param name="body">Binary request body</param>
/// <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<ApiResponse?> PostAsync(Stream body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.ApiResponse?> PostAsync(Stream body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<ApiResponse> PostAsync(Stream body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.ApiResponse> PostAsync(Stream body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
return await RequestAdapter.SendAsync<ApiResponse>(requestInfo, ApiResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::KiotaSamples.PetStoreSdk.Models.ApiResponse>(requestInfo, global::KiotaSamples.PetStoreSdk.Models.ApiResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">Binary request body</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 RequestInformation ToPostRequestInformation(Stream body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(Stream body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(Stream body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(Stream body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@ -63,15 +74,19 @@ namespace KiotaSamples.PetStoreSdk.Pet.Item.UploadImage {
/// <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="global::KiotaSamples.PetStoreSdk.Pet.Item.UploadImage.UploadImageRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public UploadImageRequestBuilder WithUrl(string rawUrl) {
return new UploadImageRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.Item.UploadImage.UploadImageRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Pet.Item.UploadImage.UploadImageRequestBuilder(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 UploadImageRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class UploadImageRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,48 +1,57 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using KiotaSamples.PetStoreSdk.Pet.Item.UploadImage;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Pet.Item {
namespace KiotaSamples.PetStoreSdk.Pet.Item
{
/// <summary>
/// Builds and executes requests for operations under \pet\{petId}
/// </summary>
public class WithPetItemRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithPetItemRequestBuilder : BaseRequestBuilder
{
/// <summary>The uploadImage property</summary>
public UploadImageRequestBuilder UploadImage { get =>
new UploadImageRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.Item.UploadImage.UploadImageRequestBuilder UploadImage
{
get => new global::KiotaSamples.PetStoreSdk.Pet.Item.UploadImage.UploadImageRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new WithPetItemRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder"/> 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 WithPetItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}", pathParameters) {
public WithPetItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}", pathParameters)
{
}
/// <summary>
/// Instantiates a new WithPetItemRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder"/> 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 WithPetItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}", rawUrl) {
public WithPetItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet/{petId}", rawUrl)
{
}
/// <summary>
/// Deletes a pet
/// </summary>
/// <returns>A <see cref="Stream"/></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<Stream?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
@ -50,42 +59,51 @@ namespace KiotaSamples.PetStoreSdk.Pet.Item {
/// <summary>
/// Returns a single pet
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.Pet"/></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<KiotaSamples.PetStoreSdk.Models.Pet?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.Pet?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<KiotaSamples.PetStoreSdk.Models.Pet> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.Pet> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendAsync<KiotaSamples.PetStoreSdk.Models.Pet>(requestInfo, KiotaSamples.PetStoreSdk.Models.Pet.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::KiotaSamples.PetStoreSdk.Models.Pet>(requestInfo, global::KiotaSamples.PetStoreSdk.Models.Pet.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
/// <returns>A <see cref="Stream"/></returns>
/// <param name="body">The request body</param>
/// <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<Stream?> PostAsync(WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> PostAsync(global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> PostAsync(WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> PostAsync(global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, 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
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -95,27 +113,33 @@ namespace KiotaSamples.PetStoreSdk.Pet.Item {
/// <summary>
/// Returns a single pet
/// </summary>
/// <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
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
return requestInfo;
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPostRequestInformation(WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetPostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@ -127,27 +151,35 @@ namespace KiotaSamples.PetStoreSdk.Pet.Item {
/// <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="global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public WithPetItemRequestBuilder WithUrl(string rawUrl) {
return new WithPetItemRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder(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 WithPetItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithPetItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <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 WithPetItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithPetItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <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 WithPetItemRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithPetItemRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,11 +1,16 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Pet.Item {
public class WithPetPostRequestBody : IParsable {
namespace KiotaSamples.PetStoreSdk.Pet.Item
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class WithPetPostRequestBody : IParsable
#pragma warning restore CS1591
{
/// <summary>Updated name of the pet</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@ -25,25 +30,31 @@ namespace KiotaSamples.PetStoreSdk.Pet.Item {
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetPostRequestBody"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static WithPetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) {
public static global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new WithPetPostRequestBody();
return new global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetPostRequestBody();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"name", n => { Name = n.GetStringValue(); } },
{"status", n => { Status = n.GetStringValue(); } },
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "name", n => { Name = n.GetStringValue(); } },
{ "status", n => { Status = 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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("name", Name);
writer.WriteStringValue("status", Status);

Просмотреть файл

@ -3,68 +3,88 @@ using KiotaSamples.PetStoreSdk.Models;
using KiotaSamples.PetStoreSdk.Pet.FindByStatus;
using KiotaSamples.PetStoreSdk.Pet.FindByTags;
using KiotaSamples.PetStoreSdk.Pet.Item;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Pet {
namespace KiotaSamples.PetStoreSdk.Pet
{
/// <summary>
/// Builds and executes requests for operations under \pet
/// </summary>
public class PetRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class PetRequestBuilder : BaseRequestBuilder
{
/// <summary>The findByStatus property</summary>
public FindByStatusRequestBuilder FindByStatus { get =>
new FindByStatusRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder FindByStatus
{
get => new global::KiotaSamples.PetStoreSdk.Pet.FindByStatus.FindByStatusRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The findByTags property</summary>
public FindByTagsRequestBuilder FindByTags { get =>
new FindByTagsRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder FindByTags
{
get => new global::KiotaSamples.PetStoreSdk.Pet.FindByTags.FindByTagsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Gets an item from the KiotaSamples.PetStoreSdk.pet.item collection</summary>
/// <param name="position">ID of pet to return</param>
public WithPetItemRequestBuilder this[long position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("petId", position);
return new WithPetItemRequestBuilder(urlTplParams, RequestAdapter);
} }
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder"/></returns>
public global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder this[long position]
{
get
{
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("petId", position);
return new global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder(urlTplParams, RequestAdapter);
}
}
/// <summary>Gets an item from the KiotaSamples.PetStoreSdk.pet.item collection</summary>
/// <param name="position">ID of pet to return</param>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder"/></returns>
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
public WithPetItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("petId", position);
return new WithPetItemRequestBuilder(urlTplParams, RequestAdapter);
} }
public global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder this[string position]
{
get
{
var urlTplParams = new Dictionary<string, object>(PathParameters);
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("petId", position);
return new global::KiotaSamples.PetStoreSdk.Pet.Item.WithPetItemRequestBuilder(urlTplParams, RequestAdapter);
}
}
/// <summary>
/// Instantiates a new PetRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.PetRequestBuilder"/> 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 PetRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet", pathParameters) {
public PetRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet", pathParameters)
{
}
/// <summary>
/// Instantiates a new PetRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Pet.PetRequestBuilder"/> 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 PetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet", rawUrl) {
public PetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/pet", rawUrl)
{
}
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <returns>A <see cref="Stream"/></returns>
/// <param name="body">The request body</param>
/// <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<Stream?> PostAsync(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> PostAsync(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> PostAsync(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> PostAsync(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
@ -73,28 +93,34 @@ namespace KiotaSamples.PetStoreSdk.Pet {
/// <summary>
/// Update an existing pet
/// </summary>
/// <returns>A <see cref="Stream"/></returns>
/// <param name="body">The request body</param>
/// <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<Stream?> PutAsync(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> PutAsync(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> PutAsync(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> PutAsync(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPostRequestInformation(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@ -103,14 +129,17 @@ namespace KiotaSamples.PetStoreSdk.Pet {
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
return requestInfo;
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPutRequestInformation(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPutRequestInformation(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPutRequestInformation(KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPutRequestInformation(global::KiotaSamples.PetStoreSdk.Models.Pet body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
@ -122,21 +151,27 @@ namespace KiotaSamples.PetStoreSdk.Pet {
/// <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="global::KiotaSamples.PetStoreSdk.Pet.PetRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public PetRequestBuilder WithUrl(string rawUrl) {
return new PetRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.PetRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Pet.PetRequestBuilder(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 PetRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class PetRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <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 PetRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class PetRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -9,38 +9,45 @@ using Microsoft.Kiota.Serialization.Json;
using Microsoft.Kiota.Serialization.Text;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System;
namespace KiotaSamples.PetStoreSdk {
namespace KiotaSamples.PetStoreSdk
{
/// <summary>
/// The main entry point of the SDK, exposes the configuration and the fluent API.
/// </summary>
public class PetstoreApiClient : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class PetstoreApiClient : BaseRequestBuilder
{
/// <summary>The pet property</summary>
public PetRequestBuilder Pet { get =>
new PetRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Pet.PetRequestBuilder Pet
{
get => new global::KiotaSamples.PetStoreSdk.Pet.PetRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The store property</summary>
public StoreRequestBuilder Store { get =>
new StoreRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Store.StoreRequestBuilder Store
{
get => new global::KiotaSamples.PetStoreSdk.Store.StoreRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The user property</summary>
public UserRequestBuilder User { get =>
new UserRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.UserRequestBuilder User
{
get => new global::KiotaSamples.PetStoreSdk.User.UserRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new PetstoreApiClient and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.PetstoreApiClient"/> and sets the default values.
/// </summary>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public PetstoreApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>()) {
public PetstoreApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>())
{
ApiClientBuilder.RegisterDefaultSerializer<JsonSerializationWriterFactory>();
ApiClientBuilder.RegisterDefaultSerializer<TextSerializationWriterFactory>();
ApiClientBuilder.RegisterDefaultSerializer<FormSerializationWriterFactory>();
ApiClientBuilder.RegisterDefaultDeserializer<JsonParseNodeFactory>();
ApiClientBuilder.RegisterDefaultDeserializer<TextParseNodeFactory>();
ApiClientBuilder.RegisterDefaultDeserializer<FormParseNodeFactory>();
if (string.IsNullOrEmpty(RequestAdapter.BaseUrl)) {
if (string.IsNullOrEmpty(RequestAdapter.BaseUrl))
{
RequestAdapter.BaseUrl = "https://petstore.swagger.io/v2";
}
PathParameters.TryAdd("baseurl", RequestAdapter.BaseUrl);

Просмотреть файл

@ -1,31 +1,42 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Store.Inventory {
public class InventoryGetResponse : IParsable {
namespace KiotaSamples.PetStoreSdk.Store.Inventory
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class InventoryGetResponse : IParsable
#pragma warning restore CS1591
{
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static InventoryGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
public static global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new InventoryGetResponse();
return new global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
};
}
/// <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) {
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
}
}

Просмотреть файл

@ -1,72 +1,86 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Store.Inventory {
namespace KiotaSamples.PetStoreSdk.Store.Inventory
{
/// <summary>
/// Builds and executes requests for operations under \store\inventory
/// </summary>
public class InventoryRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class InventoryRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new InventoryRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryRequestBuilder"/> 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 InventoryRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/inventory", pathParameters) {
public InventoryRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/inventory", pathParameters)
{
}
/// <summary>
/// Instantiates a new InventoryRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryRequestBuilder"/> 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 InventoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/inventory", rawUrl) {
public InventoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/inventory", rawUrl)
{
}
/// <summary>
/// Returns a map of status codes to quantities
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse"/></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<InventoryGetResponse?> GetAsInventoryGetResponseAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse?> GetAsInventoryGetResponseAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<InventoryGetResponse> GetAsInventoryGetResponseAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse> GetAsInventoryGetResponseAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendAsync<InventoryGetResponse>(requestInfo, InventoryGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse>(requestInfo, global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Returns a map of status codes to quantities
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse"/></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>
[Obsolete("This method is obsolete. Use GetAsInventoryGetResponse instead.")]
[Obsolete("This method is obsolete. Use GetAsInventoryGetResponseAsync instead.")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<InventoryResponse?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<InventoryResponse> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendAsync<InventoryResponse>(requestInfo, InventoryResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse>(requestInfo, global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Returns a map of status codes to quantities
/// </summary>
/// <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
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -76,15 +90,19 @@ namespace KiotaSamples.PetStoreSdk.Store.Inventory {
/// <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="global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public InventoryRequestBuilder WithUrl(string rawUrl) {
return new InventoryRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryRequestBuilder(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 InventoryRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class InventoryRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,19 +1,26 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace KiotaSamples.PetStoreSdk.Store.Inventory {
[Obsolete("This class is obsolete. Use inventoryGetResponse instead.")]
public class InventoryResponse : InventoryGetResponse, IParsable {
namespace KiotaSamples.PetStoreSdk.Store.Inventory
{
[Obsolete("This class is obsolete. Use InventoryGetResponse instead.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
#pragma warning disable CS1591
public partial class InventoryResponse : global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryGetResponse, IParsable
#pragma warning restore CS1591
{
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new InventoryResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
public static new global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new InventoryResponse();
return new global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryResponse();
}
}
}

Просмотреть файл

@ -1,43 +1,51 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Store.Order.Item {
namespace KiotaSamples.PetStoreSdk.Store.Order.Item
{
/// <summary>
/// Builds and executes requests for operations under \store\order\{orderId}
/// </summary>
public class WithOrderItemRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithOrderItemRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new WithOrderItemRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder"/> 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 WithOrderItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order/{orderId}", pathParameters) {
public WithOrderItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order/{orderId}", pathParameters)
{
}
/// <summary>
/// Instantiates a new WithOrderItemRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder"/> 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 WithOrderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order/{orderId}", rawUrl) {
public WithOrderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order/{orderId}", rawUrl)
{
}
/// <summary>
/// For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
/// </summary>
/// <returns>A <see cref="Stream"/></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<Stream?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
@ -45,28 +53,34 @@ namespace KiotaSamples.PetStoreSdk.Store.Order.Item {
/// <summary>
/// For valid response try integer IDs with value &gt;= 1 and &lt;= 10. Other values will generated exceptions
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.Order"/></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<KiotaSamples.PetStoreSdk.Models.Order?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.Order?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<KiotaSamples.PetStoreSdk.Models.Order> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.Order> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendAsync<KiotaSamples.PetStoreSdk.Models.Order>(requestInfo, KiotaSamples.PetStoreSdk.Models.Order.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::KiotaSamples.PetStoreSdk.Models.Order>(requestInfo, global::KiotaSamples.PetStoreSdk.Models.Order.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
/// </summary>
/// <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
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -76,13 +90,16 @@ namespace KiotaSamples.PetStoreSdk.Store.Order.Item {
/// <summary>
/// For valid response try integer IDs with value &gt;= 1 and &lt;= 10. Other values will generated exceptions
/// </summary>
/// <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
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -92,21 +109,27 @@ namespace KiotaSamples.PetStoreSdk.Store.Order.Item {
/// <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="global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public WithOrderItemRequestBuilder WithUrl(string rawUrl) {
return new WithOrderItemRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder(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 WithOrderItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithOrderItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <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 WithOrderItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithOrderItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,73 +1,94 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using KiotaSamples.PetStoreSdk.Store.Order.Item;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.Store.Order {
namespace KiotaSamples.PetStoreSdk.Store.Order
{
/// <summary>
/// Builds and executes requests for operations under \store\order
/// </summary>
public class OrderRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class OrderRequestBuilder : BaseRequestBuilder
{
/// <summary>Gets an item from the KiotaSamples.PetStoreSdk.store.order.item collection</summary>
/// <param name="position">ID of pet that needs to be fetched</param>
public WithOrderItemRequestBuilder this[long position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("orderId", position);
return new WithOrderItemRequestBuilder(urlTplParams, RequestAdapter);
} }
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder"/></returns>
public global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder this[long position]
{
get
{
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("orderId", position);
return new global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder(urlTplParams, RequestAdapter);
}
}
/// <summary>Gets an item from the KiotaSamples.PetStoreSdk.store.order.item collection</summary>
/// <param name="position">ID of pet that needs to be fetched</param>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder"/></returns>
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
public WithOrderItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("orderId", position);
return new WithOrderItemRequestBuilder(urlTplParams, RequestAdapter);
} }
public global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder this[string position]
{
get
{
var urlTplParams = new Dictionary<string, object>(PathParameters);
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("orderId", position);
return new global::KiotaSamples.PetStoreSdk.Store.Order.Item.WithOrderItemRequestBuilder(urlTplParams, RequestAdapter);
}
}
/// <summary>
/// Instantiates a new OrderRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.Order.OrderRequestBuilder"/> 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 OrderRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order", pathParameters) {
public OrderRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order", pathParameters)
{
}
/// <summary>
/// Instantiates a new OrderRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.Order.OrderRequestBuilder"/> 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 OrderRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order", rawUrl) {
public OrderRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store/order", rawUrl)
{
}
/// <summary>
/// Place an order for a pet
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.Models.Order"/></returns>
/// <param name="body">The request body</param>
/// <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<KiotaSamples.PetStoreSdk.Models.Order?> PostAsync(KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.Order?> PostAsync(global::KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<KiotaSamples.PetStoreSdk.Models.Order> PostAsync(KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.Order> PostAsync(global::KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
return await RequestAdapter.SendAsync<KiotaSamples.PetStoreSdk.Models.Order>(requestInfo, KiotaSamples.PetStoreSdk.Models.Order.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::KiotaSamples.PetStoreSdk.Models.Order>(requestInfo, global::KiotaSamples.PetStoreSdk.Models.Order.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPostRequestInformation(KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Models.Order body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@ -79,15 +100,19 @@ namespace KiotaSamples.PetStoreSdk.Store.Order {
/// <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="global::KiotaSamples.PetStoreSdk.Store.Order.OrderRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public OrderRequestBuilder WithUrl(string rawUrl) {
return new OrderRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Store.Order.OrderRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.Store.Order.OrderRequestBuilder(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 OrderRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class OrderRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,38 +1,45 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Store.Inventory;
using KiotaSamples.PetStoreSdk.Store.Order;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System;
namespace KiotaSamples.PetStoreSdk.Store {
namespace KiotaSamples.PetStoreSdk.Store
{
/// <summary>
/// Builds and executes requests for operations under \store
/// </summary>
public class StoreRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class StoreRequestBuilder : BaseRequestBuilder
{
/// <summary>The inventory property</summary>
public InventoryRequestBuilder Inventory { get =>
new InventoryRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryRequestBuilder Inventory
{
get => new global::KiotaSamples.PetStoreSdk.Store.Inventory.InventoryRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The order property</summary>
public OrderRequestBuilder Order { get =>
new OrderRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.Store.Order.OrderRequestBuilder Order
{
get => new global::KiotaSamples.PetStoreSdk.Store.Order.OrderRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new StoreRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.StoreRequestBuilder"/> 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 StoreRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store", pathParameters) {
public StoreRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store", pathParameters)
{
}
/// <summary>
/// Instantiates a new StoreRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.Store.StoreRequestBuilder"/> 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 StoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store", rawUrl) {
public StoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/store", rawUrl)
{
}
}
}

Просмотреть файл

@ -1,57 +1,68 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.User.CreateWithArray {
namespace KiotaSamples.PetStoreSdk.User.CreateWithArray
{
/// <summary>
/// Builds and executes requests for operations under \user\createWithArray
/// </summary>
public class CreateWithArrayRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class CreateWithArrayRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new CreateWithArrayRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.CreateWithArray.CreateWithArrayRequestBuilder"/> 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 CreateWithArrayRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithArray", pathParameters) {
public CreateWithArrayRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithArray", pathParameters)
{
}
/// <summary>
/// Instantiates a new CreateWithArrayRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.CreateWithArray.CreateWithArrayRequestBuilder"/> 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 CreateWithArrayRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithArray", rawUrl) {
public CreateWithArrayRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithArray", rawUrl)
{
}
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <returns>A <see cref="Stream"/></returns>
/// <param name="body">The request body</param>
/// <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<Stream?> PostAsync(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> PostAsync(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> PostAsync(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> PostAsync(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPostRequestInformation(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@ -63,15 +74,19 @@ namespace KiotaSamples.PetStoreSdk.User.CreateWithArray {
/// <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="global::KiotaSamples.PetStoreSdk.User.CreateWithArray.CreateWithArrayRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public CreateWithArrayRequestBuilder WithUrl(string rawUrl) {
return new CreateWithArrayRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.CreateWithArray.CreateWithArrayRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.User.CreateWithArray.CreateWithArrayRequestBuilder(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 CreateWithArrayRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class CreateWithArrayRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,57 +1,68 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.User.CreateWithList {
namespace KiotaSamples.PetStoreSdk.User.CreateWithList
{
/// <summary>
/// Builds and executes requests for operations under \user\createWithList
/// </summary>
public class CreateWithListRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class CreateWithListRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new CreateWithListRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.CreateWithList.CreateWithListRequestBuilder"/> 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 CreateWithListRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithList", pathParameters) {
public CreateWithListRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithList", pathParameters)
{
}
/// <summary>
/// Instantiates a new CreateWithListRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.CreateWithList.CreateWithListRequestBuilder"/> 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 CreateWithListRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithList", rawUrl) {
public CreateWithListRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/createWithList", rawUrl)
{
}
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <returns>A <see cref="Stream"/></returns>
/// <param name="body">The request body</param>
/// <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<Stream?> PostAsync(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> PostAsync(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> PostAsync(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> PostAsync(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPostRequestInformation(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(List<KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(List<global::KiotaSamples.PetStoreSdk.Models.User> body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@ -63,15 +74,19 @@ namespace KiotaSamples.PetStoreSdk.User.CreateWithList {
/// <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="global::KiotaSamples.PetStoreSdk.User.CreateWithList.CreateWithListRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public CreateWithListRequestBuilder WithUrl(string rawUrl) {
return new CreateWithListRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.CreateWithList.CreateWithListRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.User.CreateWithList.CreateWithListRequestBuilder(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 CreateWithListRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class CreateWithListRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,43 +1,51 @@
// <auto-generated/>
using KiotaSamples.PetStoreSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.User.Item {
namespace KiotaSamples.PetStoreSdk.User.Item
{
/// <summary>
/// Builds and executes requests for operations under \user\{username}
/// </summary>
public class WithUsernameItemRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new WithUsernameItemRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder"/> 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 WithUsernameItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{username}", pathParameters) {
public WithUsernameItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{username}", pathParameters)
{
}
/// <summary>
/// Instantiates a new WithUsernameItemRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder"/> 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 WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{username}", rawUrl) {
public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{username}", rawUrl)
{
}
/// <summary>
/// This can only be done by the logged in user.
/// </summary>
/// <returns>A <see cref="Stream"/></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<Stream?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
@ -45,30 +53,36 @@ namespace KiotaSamples.PetStoreSdk.User.Item {
/// <summary>
/// Get user by user name
/// </summary>
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.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<KiotaSamples.PetStoreSdk.Models.User?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.User?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<KiotaSamples.PetStoreSdk.Models.User> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<global::KiotaSamples.PetStoreSdk.Models.User> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendAsync<KiotaSamples.PetStoreSdk.Models.User>(requestInfo, KiotaSamples.PetStoreSdk.Models.User.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::KiotaSamples.PetStoreSdk.Models.User>(requestInfo, global::KiotaSamples.PetStoreSdk.Models.User.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// This can only be done by the logged in user.
/// </summary>
/// <returns>A <see cref="Stream"/></returns>
/// <param name="body">The request body</param>
/// <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<Stream?> PutAsync(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> PutAsync(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> PutAsync(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> PutAsync(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
@ -77,26 +91,32 @@ namespace KiotaSamples.PetStoreSdk.User.Item {
/// <summary>
/// This can only be done by the logged in user.
/// </summary>
/// <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
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
return requestInfo;
}
/// <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
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -106,14 +126,17 @@ namespace KiotaSamples.PetStoreSdk.User.Item {
/// <summary>
/// This can only be done by the logged in user.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPutRequestInformation(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPutRequestInformation(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPutRequestInformation(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPutRequestInformation(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
@ -125,27 +148,35 @@ namespace KiotaSamples.PetStoreSdk.User.Item {
/// <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="global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public WithUsernameItemRequestBuilder WithUrl(string rawUrl) {
return new WithUsernameItemRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder(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 WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <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 WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <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 WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,53 +1,64 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.User.Login {
namespace KiotaSamples.PetStoreSdk.User.Login
{
/// <summary>
/// Builds and executes requests for operations under \user\login
/// </summary>
public class LoginRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class LoginRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new LoginRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder"/> 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 LoginRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/login?password={password}&username={username}", pathParameters) {
public LoginRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/login?password={password}&username={username}", pathParameters)
{
}
/// <summary>
/// Instantiates a new LoginRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder"/> 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 LoginRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/login?password={password}&username={username}", rawUrl) {
public LoginRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/login?password={password}&username={username}", rawUrl)
{
}
/// <summary>
/// Logs user into the system
/// </summary>
/// <returns>A <see cref="string"/></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<string?> GetAsync(Action<RequestConfiguration<LoginRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<string?> GetAsync(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder.LoginRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<string> GetAsync(Action<RequestConfiguration<LoginRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<string> GetAsync(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder.LoginRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, 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
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<LoginRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder.LoginRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<LoginRequestBuilderGetQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder.LoginRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -57,14 +68,18 @@ namespace KiotaSamples.PetStoreSdk.User.Login {
/// <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="global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public LoginRequestBuilder WithUrl(string rawUrl) {
return new LoginRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Logs user into the system
/// </summary>
public class LoginRequestBuilderGetQueryParameters {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class LoginRequestBuilderGetQueryParameters
{
/// <summary>The password for login in clear text</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@ -90,7 +105,9 @@ namespace KiotaSamples.PetStoreSdk.User.Login {
/// 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 LoginRequestBuilderGetRequestConfiguration : RequestConfiguration<LoginRequestBuilderGetQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class LoginRequestBuilderGetRequestConfiguration : RequestConfiguration<global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder.LoginRequestBuilderGetQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,53 +1,64 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.User.Logout {
namespace KiotaSamples.PetStoreSdk.User.Logout
{
/// <summary>
/// Builds and executes requests for operations under \user\logout
/// </summary>
public class LogoutRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class LogoutRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new LogoutRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.Logout.LogoutRequestBuilder"/> 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 LogoutRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/logout", pathParameters) {
public LogoutRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/logout", pathParameters)
{
}
/// <summary>
/// Instantiates a new LogoutRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.Logout.LogoutRequestBuilder"/> 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 LogoutRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/logout", rawUrl) {
public LogoutRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/logout", rawUrl)
{
}
/// <summary>
/// Logs out current logged in user session
/// </summary>
/// <returns>A <see cref="Stream"/></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<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, 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
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@ -57,15 +68,19 @@ namespace KiotaSamples.PetStoreSdk.User.Logout {
/// <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="global::KiotaSamples.PetStoreSdk.User.Logout.LogoutRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public LogoutRequestBuilder WithUrl(string rawUrl) {
return new LogoutRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.Logout.LogoutRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.User.Logout.LogoutRequestBuilder(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 LogoutRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class LogoutRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -5,68 +5,85 @@ using KiotaSamples.PetStoreSdk.User.CreateWithList;
using KiotaSamples.PetStoreSdk.User.Item;
using KiotaSamples.PetStoreSdk.User.Login;
using KiotaSamples.PetStoreSdk.User.Logout;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace KiotaSamples.PetStoreSdk.User {
namespace KiotaSamples.PetStoreSdk.User
{
/// <summary>
/// Builds and executes requests for operations under \user
/// </summary>
public class UserRequestBuilder : BaseRequestBuilder {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class UserRequestBuilder : BaseRequestBuilder
{
/// <summary>The createWithArray property</summary>
public CreateWithArrayRequestBuilder CreateWithArray { get =>
new CreateWithArrayRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.CreateWithArray.CreateWithArrayRequestBuilder CreateWithArray
{
get => new global::KiotaSamples.PetStoreSdk.User.CreateWithArray.CreateWithArrayRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The createWithList property</summary>
public CreateWithListRequestBuilder CreateWithList { get =>
new CreateWithListRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.CreateWithList.CreateWithListRequestBuilder CreateWithList
{
get => new global::KiotaSamples.PetStoreSdk.User.CreateWithList.CreateWithListRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The login property</summary>
public LoginRequestBuilder Login { get =>
new LoginRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder Login
{
get => new global::KiotaSamples.PetStoreSdk.User.Login.LoginRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The logout property</summary>
public LogoutRequestBuilder Logout { get =>
new LogoutRequestBuilder(PathParameters, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.Logout.LogoutRequestBuilder Logout
{
get => new global::KiotaSamples.PetStoreSdk.User.Logout.LogoutRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Gets an item from the KiotaSamples.PetStoreSdk.user.item collection</summary>
/// <param name="position">The name that needs to be fetched. Use user1 for testing. </param>
public WithUsernameItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("username", position);
return new WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter);
} }
/// <returns>A <see cref="global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder"/></returns>
public global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder this[string position]
{
get
{
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("username", position);
return new global::KiotaSamples.PetStoreSdk.User.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter);
}
}
/// <summary>
/// Instantiates a new UserRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.UserRequestBuilder"/> 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 UserRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user", pathParameters) {
public UserRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user", pathParameters)
{
}
/// <summary>
/// Instantiates a new UserRequestBuilder and sets the default values.
/// Instantiates a new <see cref="global::KiotaSamples.PetStoreSdk.User.UserRequestBuilder"/> 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 UserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user", rawUrl) {
public UserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user", rawUrl)
{
}
/// <summary>
/// This can only be done by the logged in user.
/// </summary>
/// <returns>A <see cref="Stream"/></returns>
/// <param name="body">The request body</param>
/// <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<Stream?> PostAsync(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream?> PostAsync(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Stream> PostAsync(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
public async Task<Stream> PostAsync(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
@ -75,14 +92,17 @@ namespace KiotaSamples.PetStoreSdk.User {
/// <summary>
/// This can only be done by the logged in user.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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 RequestInformation ToPostRequestInformation(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
public RequestInformation ToPostRequestInformation(global::KiotaSamples.PetStoreSdk.Models.User body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@ -94,15 +114,19 @@ namespace KiotaSamples.PetStoreSdk.User {
/// <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="global::KiotaSamples.PetStoreSdk.User.UserRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public UserRequestBuilder WithUrl(string rawUrl) {
return new UserRequestBuilder(rawUrl, RequestAdapter);
public global::KiotaSamples.PetStoreSdk.User.UserRequestBuilder WithUrl(string rawUrl)
{
return new global::KiotaSamples.PetStoreSdk.User.UserRequestBuilder(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 UserRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.16.0")]
public partial class UserRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}

Просмотреть файл

@ -1,14 +1,15 @@
{
"descriptionHash": "21A9B6E38B80E99E32EB4CB2A98A1A4AA91E1F660659E1E645A3DFFAF40D04A8373849DAA537F8368DF54172E69B7751A4AADE385768C9D4527574817FCE1FDC",
"descriptionHash": "20D825D2128F12BBE8B3E6D3FE63DA30E940B2D09BA6D6AF0DA3896F7FD6BF7DF77DA57D800812AEAB089DB3A640D63BFDE361C4FA134E29C31C909B22E00D5C",
"descriptionLocation": "https://petstore.swagger.io/v2/swagger.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.0",
"kiotaVersion": "1.16.0",
"clientClassName": "PetstoreApiClient",
"clientNamespaceName": "KiotaSamples.PetStoreSdk",
"language": "CSharp",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": false,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",

Просмотреть файл

@ -35,14 +35,17 @@ func NewApiClient(requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa52901
return m
}
// Pet the pet property
// returns a *PetRequestBuilder when successful
func (m *ApiClient) Pet()(*if5191a3b08f2ce6dfdeab2abbf317a97232aa6a8a9ced702da7454d6f82d5050.PetRequestBuilder) {
return if5191a3b08f2ce6dfdeab2abbf317a97232aa6a8a9ced702da7454d6f82d5050.NewPetRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// Store the store property
// returns a *StoreRequestBuilder when successful
func (m *ApiClient) Store()(*i30fc20112facbd93862049bcbeffb8938df51d762c36a3f68cc5f482741730d9.StoreRequestBuilder) {
return i30fc20112facbd93862049bcbeffb8938df51d762c36a3f68cc5f482741730d9.NewStoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// User the user property
// returns a *UserRequestBuilder when successful
func (m *ApiClient) User()(*i3c37a61d7272de22ab30735a6fa0fcf0b883a5c82cf706fd10365a3203e1235b.UserRequestBuilder) {
return i3c37a61d7272de22ab30735a6fa0fcf0b883a5c82cf706fd10365a3203e1235b.NewUserRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}

Просмотреть файл

@ -1,14 +1,15 @@
{
"descriptionHash": "21A9B6E38B80E99E32EB4CB2A98A1A4AA91E1F660659E1E645A3DFFAF40D04A8373849DAA537F8368DF54172E69B7751A4AADE385768C9D4527574817FCE1FDC",
"descriptionHash": "20D825D2128F12BBE8B3E6D3FE63DA30E940B2D09BA6D6AF0DA3896F7FD6BF7DF77DA57D800812AEAB089DB3A640D63BFDE361C4FA134E29C31C909B22E00D5C",
"descriptionLocation": "https://petstore.swagger.io/v2/swagger.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.0",
"kiotaVersion": "1.16.0",
"clientClassName": "ApiClient",
"clientNamespaceName": "github.com/microsoft/kiota-samples/petstore/go/utilities/",
"language": "Go",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",

Просмотреть файл

@ -4,7 +4,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// ApiResponse
type ApiResponse struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
@ -23,18 +22,22 @@ func NewApiResponse()(*ApiResponse) {
return m
}
// CreateApiResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateApiResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewApiResponse(), 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 *ApiResponse) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetCode gets the code property value. The code property
// returns a *int32 when successful
func (m *ApiResponse) GetCode()(*int32) {
return m.code
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *ApiResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
@ -70,10 +73,12 @@ func (m *ApiResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26
return res
}
// GetMessage gets the message property value. The message property
// returns a *string when successful
func (m *ApiResponse) GetMessage()(*string) {
return m.message
}
// GetTypeEscaped gets the type property value. The type property
// returns a *string when successful
func (m *ApiResponse) GetTypeEscaped()(*string) {
return m.typeEscaped
}
@ -121,7 +126,6 @@ func (m *ApiResponse) SetMessage(value *string)() {
func (m *ApiResponse) SetTypeEscaped(value *string)() {
m.typeEscaped = value
}
// ApiResponseable
type ApiResponseable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -4,7 +4,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// Category
type Category struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
@ -21,14 +20,17 @@ func NewCategory()(*Category) {
return m
}
// CreateCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewCategory(), 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 *Category) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Category) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
@ -54,10 +56,12 @@ func (m *Category) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896
return res
}
// GetId gets the id property value. The id property
// returns a *int64 when successful
func (m *Category) GetId()(*int64) {
return m.id
}
// GetName gets the name property value. The name property
// returns a *string when successful
func (m *Category) GetName()(*string) {
return m.name
}
@ -95,7 +99,6 @@ func (m *Category) SetId(value *int64)() {
func (m *Category) SetName(value *string)() {
m.name = value
}
// Categoryable
type Categoryable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -5,7 +5,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// Order
type Order struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
@ -30,18 +29,22 @@ func NewOrder()(*Order) {
return m
}
// CreateOrderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateOrderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewOrder(), 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 *Order) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetComplete gets the complete property value. The complete property
// returns a *bool when successful
func (m *Order) GetComplete()(*bool) {
return m.complete
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Order) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["complete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
@ -107,22 +110,27 @@ func (m *Order) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388
return res
}
// GetId gets the id property value. The id property
// returns a *int64 when successful
func (m *Order) GetId()(*int64) {
return m.id
}
// GetPetId gets the petId property value. The petId property
// returns a *int64 when successful
func (m *Order) GetPetId()(*int64) {
return m.petId
}
// GetQuantity gets the quantity property value. The quantity property
// returns a *int32 when successful
func (m *Order) GetQuantity()(*int32) {
return m.quantity
}
// GetShipDate gets the shipDate property value. The shipDate property
// returns a *Time when successful
func (m *Order) GetShipDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.shipDate
}
// GetStatus gets the status property value. Order Status
// returns a *Order_status when successful
func (m *Order) GetStatus()(*Order_status) {
return m.status
}
@ -201,7 +209,6 @@ func (m *Order) SetShipDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a1639
func (m *Order) SetStatus(value *Order_status)() {
m.status = value
}
// Orderable
type Orderable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -1,7 +1,4 @@
package models
import (
"errors"
)
// Order Status
type Order_status int
@ -24,7 +21,7 @@ func ParseOrder_status(v string) (any, error) {
case "delivered":
result = DELIVERED_ORDER_STATUS
default:
return 0, errors.New("Unknown Order_status value: " + v)
return nil, nil
}
return &result, nil
}

Просмотреть файл

@ -4,7 +4,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// Pet
type Pet struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
@ -29,18 +28,22 @@ func NewPet()(*Pet) {
return m
}
// CreatePetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreatePetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewPet(), 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 *Pet) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetCategory gets the category property value. The category property
// returns a Categoryable when successful
func (m *Pet) GetCategory()(Categoryable) {
return m.category
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Pet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
@ -118,22 +121,27 @@ func (m *Pet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3
return res
}
// GetId gets the id property value. The id property
// returns a *int64 when successful
func (m *Pet) GetId()(*int64) {
return m.id
}
// GetName gets the name property value. The name property
// returns a *string when successful
func (m *Pet) GetName()(*string) {
return m.name
}
// GetPhotoUrls gets the photoUrls property value. The photoUrls property
// returns a []string when successful
func (m *Pet) GetPhotoUrls()([]string) {
return m.photoUrls
}
// GetStatus gets the status property value. pet status in the store
// returns a *Pet_status when successful
func (m *Pet) GetStatus()(*Pet_status) {
return m.status
}
// GetTags gets the tags property value. The tags property
// returns a []Tagable when successful
func (m *Pet) GetTags()([]Tagable) {
return m.tags
}
@ -218,7 +226,6 @@ func (m *Pet) SetStatus(value *Pet_status)() {
func (m *Pet) SetTags(value []Tagable)() {
m.tags = value
}
// Petable
type Petable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -1,7 +1,4 @@
package models
import (
"errors"
)
// pet status in the store
type Pet_status int
@ -24,7 +21,7 @@ func ParsePet_status(v string) (any, error) {
case "sold":
result = SOLD_PET_STATUS
default:
return 0, errors.New("Unknown Pet_status value: " + v)
return nil, nil
}
return &result, nil
}

Просмотреть файл

@ -4,7 +4,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// Tag
type Tag struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
@ -21,14 +20,17 @@ func NewTag()(*Tag) {
return m
}
// CreateTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewTag(), 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 *Tag) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Tag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
@ -54,10 +56,12 @@ func (m *Tag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3
return res
}
// GetId gets the id property value. The id property
// returns a *int64 when successful
func (m *Tag) GetId()(*int64) {
return m.id
}
// GetName gets the name property value. The name property
// returns a *string when successful
func (m *Tag) GetName()(*string) {
return m.name
}
@ -95,7 +99,6 @@ func (m *Tag) SetId(value *int64)() {
func (m *Tag) SetName(value *string)() {
m.name = value
}
// Tagable
type Tagable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -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
@ -33,18 +32,22 @@ func NewUser()(*User) {
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
}
// GetEmail gets the email property value. The email property
// returns a *string when successful
func (m *User) GetEmail()(*string) {
return m.email
}
// 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["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
@ -130,30 +133,37 @@ func (m *User) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a
return res
}
// GetFirstName gets the firstName property value. The firstName property
// returns a *string when successful
func (m *User) GetFirstName()(*string) {
return m.firstName
}
// GetId gets the id property value. The id property
// returns a *int64 when successful
func (m *User) GetId()(*int64) {
return m.id
}
// GetLastName gets the lastName property value. The lastName property
// returns a *string when successful
func (m *User) GetLastName()(*string) {
return m.lastName
}
// GetPassword gets the password property value. The password property
// returns a *string when successful
func (m *User) GetPassword()(*string) {
return m.password
}
// GetPhone gets the phone property value. The phone property
// returns a *string when successful
func (m *User) GetPhone()(*string) {
return m.phone
}
// GetUsername gets the username property value. The username property
// returns a *string when successful
func (m *User) GetUsername()(*string) {
return m.username
}
// GetUserStatus gets the userStatus property value. User Status
// returns a *int32 when successful
func (m *User) GetUserStatus()(*int32) {
return m.userStatus
}
@ -251,7 +261,6 @@ func (m *User) SetUsername(value *string)() {
func (m *User) SetUserStatus(value *int32)() {
m.userStatus = value
}
// Userable
type Userable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -4,6 +4,7 @@ import (
"context"
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398 "github.com/microsoft/kiota-samples/petstore/go/utilities/models"
i01fa6ea29b6cfe613045be406b47b662b5f8c510b65673a105a1b4b6eb08fe62 "github.com/microsoft/kiota-samples/petstore/go/utilities/pet/findbystatus"
)
// FindByStatusRequestBuilder builds and executes requests for operations under \pet\findByStatus
@ -13,7 +14,10 @@ type FindByStatusRequestBuilder struct {
// FindByStatusRequestBuilderGetQueryParameters multiple status values can be provided with comma separated strings
type FindByStatusRequestBuilderGetQueryParameters struct {
// Status values that need to be considered for filter
// Deprecated: This property is deprecated, use StatusAsGetStatusQueryParameterType instead
Status []string `uriparametername:"status"`
// Status values that need to be considered for filter
StatusAsGetStatusQueryParameterType []i01fa6ea29b6cfe613045be406b47b662b5f8c510b65673a105a1b4b6eb08fe62.GetStatusQueryParameterType `uriparametername:"status"`
}
// FindByStatusRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
type FindByStatusRequestBuilderGetRequestConfiguration struct {
@ -38,6 +42,7 @@ func NewFindByStatusRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2
return NewFindByStatusRequestBuilderInternal(urlParams, requestAdapter)
}
// Get multiple status values can be provided with comma separated strings
// returns a []Petable when successful
func (m *FindByStatusRequestBuilder) Get(ctx context.Context, requestConfiguration *FindByStatusRequestBuilderGetRequestConfiguration)([]idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -56,6 +61,7 @@ func (m *FindByStatusRequestBuilder) Get(ctx context.Context, requestConfigurati
return val, nil
}
// ToGetRequestInformation multiple status values can be provided with comma separated strings
// returns a *RequestInformation when successful
func (m *FindByStatusRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *FindByStatusRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -69,6 +75,7 @@ func (m *FindByStatusRequestBuilder) ToGetRequestInformation(ctx context.Context
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 *FindByStatusRequestBuilder when successful
func (m *FindByStatusRequestBuilder) WithUrl(rawUrl string)(*FindByStatusRequestBuilder) {
return NewFindByStatusRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -39,6 +39,7 @@ func NewFindByTagsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263
}
// Get multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
// Deprecated:
// returns a []Petable when successful
func (m *FindByTagsRequestBuilder) Get(ctx context.Context, requestConfiguration *FindByTagsRequestBuilderGetRequestConfiguration)([]idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -58,6 +59,7 @@ func (m *FindByTagsRequestBuilder) Get(ctx context.Context, requestConfiguration
}
// ToGetRequestInformation multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
// Deprecated:
// returns a *RequestInformation when successful
func (m *FindByTagsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *FindByTagsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -72,6 +74,7 @@ func (m *FindByTagsRequestBuilder) ToGetRequestInformation(ctx context.Context,
}
// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
// Deprecated:
// returns a *FindByTagsRequestBuilder when successful
func (m *FindByTagsRequestBuilder) WithUrl(rawUrl string)(*FindByTagsRequestBuilder) {
return NewFindByTagsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -0,0 +1,36 @@
package findbystatus
type GetStatusQueryParameterType int
const (
AVAILABLE_GETSTATUSQUERYPARAMETERTYPE GetStatusQueryParameterType = iota
PENDING_GETSTATUSQUERYPARAMETERTYPE
SOLD_GETSTATUSQUERYPARAMETERTYPE
)
func (i GetStatusQueryParameterType) String() string {
return []string{"available", "pending", "sold"}[i]
}
func ParseGetStatusQueryParameterType(v string) (any, error) {
result := AVAILABLE_GETSTATUSQUERYPARAMETERTYPE
switch v {
case "available":
result = AVAILABLE_GETSTATUSQUERYPARAMETERTYPE
case "pending":
result = PENDING_GETSTATUSQUERYPARAMETERTYPE
case "sold":
result = SOLD_GETSTATUSQUERYPARAMETERTYPE
default:
return nil, nil
}
return &result, nil
}
func SerializeGetStatusQueryParameterType(values []GetStatusQueryParameterType) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i GetStatusQueryParameterType) isMultiValue() bool {
return false
}

Просмотреть файл

@ -17,20 +17,21 @@ type ItemUploadImageRequestBuilderPostRequestConfiguration struct {
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewItemUploadImageRequestBuilderInternal instantiates a new UploadImageRequestBuilder and sets the default values.
// NewItemUploadImageRequestBuilderInternal instantiates a new ItemUploadImageRequestBuilder and sets the default values.
func NewItemUploadImageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemUploadImageRequestBuilder) {
m := &ItemUploadImageRequestBuilder{
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/pet/{petId}/uploadImage", pathParameters),
}
return m
}
// NewItemUploadImageRequestBuilder instantiates a new UploadImageRequestBuilder and sets the default values.
// NewItemUploadImageRequestBuilder instantiates a new ItemUploadImageRequestBuilder and sets the default values.
func NewItemUploadImageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemUploadImageRequestBuilder) {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewItemUploadImageRequestBuilderInternal(urlParams, requestAdapter)
}
// Post uploads an image
// returns a ApiResponseable when successful
func (m *ItemUploadImageRequestBuilder) Post(ctx context.Context, body []byte, requestConfiguration *ItemUploadImageRequestBuilderPostRequestConfiguration)(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.ApiResponseable, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -45,6 +46,7 @@ func (m *ItemUploadImageRequestBuilder) Post(ctx context.Context, body []byte, r
}
return res.(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.ApiResponseable), nil
}
// returns a *RequestInformation when successful
func (m *ItemUploadImageRequestBuilder) ToPostRequestInformation(ctx context.Context, body []byte, requestConfiguration *ItemUploadImageRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -56,6 +58,7 @@ func (m *ItemUploadImageRequestBuilder) ToPostRequestInformation(ctx context.Con
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 *ItemUploadImageRequestBuilder when successful
func (m *ItemUploadImageRequestBuilder) WithUrl(rawUrl string)(*ItemUploadImageRequestBuilder) {
return NewItemUploadImageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -4,7 +4,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// ItemWithPetPostRequestBody
type ItemWithPetPostRequestBody struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
@ -21,14 +20,17 @@ func NewItemWithPetPostRequestBody()(*ItemWithPetPostRequestBody) {
return m
}
// CreateItemWithPetPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateItemWithPetPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemWithPetPostRequestBody(), 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 *ItemWithPetPostRequestBody) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *ItemWithPetPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
@ -54,10 +56,12 @@ func (m *ItemWithPetPostRequestBody) GetFieldDeserializers()(map[string]func(i87
return res
}
// GetName gets the name property value. Updated name of the pet
// returns a *string when successful
func (m *ItemWithPetPostRequestBody) GetName()(*string) {
return m.name
}
// GetStatus gets the status property value. Updated status of the pet
// returns a *string when successful
func (m *ItemWithPetPostRequestBody) GetStatus()(*string) {
return m.status
}
@ -95,7 +99,6 @@ func (m *ItemWithPetPostRequestBody) SetName(value *string)() {
func (m *ItemWithPetPostRequestBody) SetStatus(value *string)() {
m.status = value
}
// ItemWithPetPostRequestBodyable
type ItemWithPetPostRequestBodyable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -27,6 +27,7 @@ type PetRequestBuilderPutRequestConfiguration struct {
}
// ByPetId gets an item from the github.com/microsoft/kiota-samples/petstore/go/utilities/.pet.item collection
// Deprecated: This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.
// returns a *WithPetItemRequestBuilder when successful
func (m *PetRequestBuilder) ByPetId(petId string)(*WithPetItemRequestBuilder) {
urlTplParams := make(map[string]string)
for idx, item := range m.BaseRequestBuilder.PathParameters {
@ -38,6 +39,7 @@ func (m *PetRequestBuilder) ByPetId(petId string)(*WithPetItemRequestBuilder) {
return NewWithPetItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter)
}
// ByPetIdInt64 gets an item from the github.com/microsoft/kiota-samples/petstore/go/utilities/.pet.item collection
// returns a *WithPetItemRequestBuilder when successful
func (m *PetRequestBuilder) ByPetIdInt64(petId int64)(*WithPetItemRequestBuilder) {
urlTplParams := make(map[string]string)
for idx, item := range m.BaseRequestBuilder.PathParameters {
@ -60,14 +62,17 @@ func NewPetRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c
return NewPetRequestBuilderInternal(urlParams, requestAdapter)
}
// FindByStatus the findByStatus property
// returns a *FindByStatusRequestBuilder when successful
func (m *PetRequestBuilder) FindByStatus()(*FindByStatusRequestBuilder) {
return NewFindByStatusRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// FindByTags the findByTags property
// returns a *FindByTagsRequestBuilder when successful
func (m *PetRequestBuilder) FindByTags()(*FindByTagsRequestBuilder) {
return NewFindByTagsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// Post add a new pet to the store
// returns a []byte when successful
func (m *PetRequestBuilder) Post(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable, requestConfiguration *PetRequestBuilderPostRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -83,6 +88,7 @@ func (m *PetRequestBuilder) Post(ctx context.Context, body idf4cc4a16f466bc4d402
return res.([]byte), nil
}
// Put update an existing pet
// returns a []byte when successful
func (m *PetRequestBuilder) Put(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable, requestConfiguration *PetRequestBuilderPutRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -97,6 +103,7 @@ func (m *PetRequestBuilder) Put(ctx context.Context, body idf4cc4a16f466bc4d4025
}
return res.([]byte), nil
}
// returns a *RequestInformation when successful
func (m *PetRequestBuilder) ToPostRequestInformation(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable, requestConfiguration *PetRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -110,6 +117,7 @@ func (m *PetRequestBuilder) ToPostRequestInformation(ctx context.Context, body i
}
return requestInfo, nil
}
// returns a *RequestInformation when successful
func (m *PetRequestBuilder) ToPutRequestInformation(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable, requestConfiguration *PetRequestBuilderPutRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -124,6 +132,7 @@ func (m *PetRequestBuilder) ToPutRequestInformation(ctx context.Context, body id
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 *PetRequestBuilder when successful
func (m *PetRequestBuilder) WithUrl(rawUrl string)(*PetRequestBuilder) {
return NewPetRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -45,6 +45,7 @@ func NewWithPetItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26
return NewWithPetItemRequestBuilderInternal(urlParams, requestAdapter)
}
// Delete deletes a pet
// returns a []byte when successful
func (m *WithPetItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WithPetItemRequestBuilderDeleteRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -60,6 +61,7 @@ func (m *WithPetItemRequestBuilder) Delete(ctx context.Context, requestConfigura
return res.([]byte), nil
}
// Get returns a single pet
// returns a Petable when successful
func (m *WithPetItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WithPetItemRequestBuilderGetRequestConfiguration)(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -75,6 +77,7 @@ func (m *WithPetItemRequestBuilder) Get(ctx context.Context, requestConfiguratio
return res.(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Petable), nil
}
// Post updates a pet in the store with form data
// returns a []byte when successful
func (m *WithPetItemRequestBuilder) Post(ctx context.Context, body ItemWithPetPostRequestBodyable, requestConfiguration *WithPetItemRequestBuilderPostRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -89,6 +92,7 @@ func (m *WithPetItemRequestBuilder) Post(ctx context.Context, body ItemWithPetPo
}
return res.([]byte), nil
}
// returns a *RequestInformation when successful
func (m *WithPetItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WithPetItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -99,6 +103,7 @@ func (m *WithPetItemRequestBuilder) ToDeleteRequestInformation(ctx context.Conte
return requestInfo, nil
}
// ToGetRequestInformation returns a single pet
// returns a *RequestInformation when successful
func (m *WithPetItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WithPetItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -108,6 +113,7 @@ func (m *WithPetItemRequestBuilder) ToGetRequestInformation(ctx context.Context,
requestInfo.Headers.TryAdd("Accept", "application/json")
return requestInfo, nil
}
// returns a *RequestInformation when successful
func (m *WithPetItemRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemWithPetPostRequestBodyable, requestConfiguration *WithPetItemRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -122,10 +128,12 @@ func (m *WithPetItemRequestBuilder) ToPostRequestInformation(ctx context.Context
return requestInfo, nil
}
// UploadImage the uploadImage property
// returns a *ItemUploadImageRequestBuilder when successful
func (m *WithPetItemRequestBuilder) UploadImage()(*ItemUploadImageRequestBuilder) {
return NewItemUploadImageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
// returns a *WithPetItemRequestBuilder when successful
func (m *WithPetItemRequestBuilder) WithUrl(rawUrl string)(*WithPetItemRequestBuilder) {
return NewWithPetItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -4,7 +4,6 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// InventoryGetResponse
type InventoryGetResponse struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
@ -17,14 +16,17 @@ func NewInventoryGetResponse()(*InventoryGetResponse) {
return m
}
// CreateInventoryGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateInventoryGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewInventoryGetResponse(), 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 *InventoryGetResponse) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *InventoryGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
return res
@ -43,7 +45,6 @@ func (m *InventoryGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487ee
func (m *InventoryGetResponse) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// InventoryGetResponseable
type InventoryGetResponseable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -31,6 +31,7 @@ func NewInventoryRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633
}
// Get returns a map of status codes to quantities
// Deprecated: This method is obsolete. Use GetAsInventoryGetResponse instead.
// returns a InventoryResponseable when successful
func (m *InventoryRequestBuilder) Get(ctx context.Context, requestConfiguration *InventoryRequestBuilderGetRequestConfiguration)(InventoryResponseable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -46,6 +47,7 @@ func (m *InventoryRequestBuilder) Get(ctx context.Context, requestConfiguration
return res.(InventoryResponseable), nil
}
// GetAsInventoryGetResponse returns a map of status codes to quantities
// returns a InventoryGetResponseable when successful
func (m *InventoryRequestBuilder) GetAsInventoryGetResponse(ctx context.Context, requestConfiguration *InventoryRequestBuilderGetRequestConfiguration)(InventoryGetResponseable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -61,6 +63,7 @@ func (m *InventoryRequestBuilder) GetAsInventoryGetResponse(ctx context.Context,
return res.(InventoryGetResponseable), nil
}
// ToGetRequestInformation returns a map of status codes to quantities
// returns a *RequestInformation when successful
func (m *InventoryRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *InventoryRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -71,6 +74,7 @@ func (m *InventoryRequestBuilder) ToGetRequestInformation(ctx context.Context, r
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 *InventoryRequestBuilder when successful
func (m *InventoryRequestBuilder) WithUrl(rawUrl string)(*InventoryRequestBuilder) {
return NewInventoryRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -4,8 +4,7 @@ import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// InventoryResponse
// Deprecated: This class is obsolete. Use inventoryGetResponse instead.
// Deprecated: This class is obsolete. Use InventoryGetResponseable instead.
type InventoryResponse struct {
InventoryGetResponse
}
@ -17,11 +16,11 @@ func NewInventoryResponse()(*InventoryResponse) {
return m
}
// CreateInventoryResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateInventoryResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewInventoryResponse(), nil
}
// InventoryResponseable
// Deprecated: This class is obsolete. Use inventoryGetResponse instead.
// Deprecated: This class is obsolete. Use InventoryGetResponseable instead.
type InventoryResponseable interface {
InventoryGetResponseable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable

Просмотреть файл

@ -20,6 +20,7 @@ type OrderRequestBuilderPostRequestConfiguration struct {
}
// ByOrderId gets an item from the github.com/microsoft/kiota-samples/petstore/go/utilities/.store.order.item collection
// Deprecated: This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.
// returns a *OrderWithOrderItemRequestBuilder when successful
func (m *OrderRequestBuilder) ByOrderId(orderId string)(*OrderWithOrderItemRequestBuilder) {
urlTplParams := make(map[string]string)
for idx, item := range m.BaseRequestBuilder.PathParameters {
@ -31,6 +32,7 @@ func (m *OrderRequestBuilder) ByOrderId(orderId string)(*OrderWithOrderItemReque
return NewOrderWithOrderItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter)
}
// ByOrderIdInt64 gets an item from the github.com/microsoft/kiota-samples/petstore/go/utilities/.store.order.item collection
// returns a *OrderWithOrderItemRequestBuilder when successful
func (m *OrderRequestBuilder) ByOrderIdInt64(orderId int64)(*OrderWithOrderItemRequestBuilder) {
urlTplParams := make(map[string]string)
for idx, item := range m.BaseRequestBuilder.PathParameters {
@ -53,6 +55,7 @@ func NewOrderRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb
return NewOrderRequestBuilderInternal(urlParams, requestAdapter)
}
// Post place an order for a pet
// returns a Orderable when successful
func (m *OrderRequestBuilder) Post(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Orderable, requestConfiguration *OrderRequestBuilderPostRequestConfiguration)(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Orderable, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -67,6 +70,7 @@ func (m *OrderRequestBuilder) Post(ctx context.Context, body idf4cc4a16f466bc4d4
}
return res.(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Orderable), nil
}
// returns a *RequestInformation when successful
func (m *OrderRequestBuilder) ToPostRequestInformation(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Orderable, requestConfiguration *OrderRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -81,6 +85,7 @@ func (m *OrderRequestBuilder) ToPostRequestInformation(ctx context.Context, body
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 *OrderRequestBuilder when successful
func (m *OrderRequestBuilder) WithUrl(rawUrl string)(*OrderRequestBuilder) {
return NewOrderRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -24,20 +24,21 @@ type OrderWithOrderItemRequestBuilderGetRequestConfiguration struct {
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewOrderWithOrderItemRequestBuilderInternal instantiates a new WithOrderItemRequestBuilder and sets the default values.
// NewOrderWithOrderItemRequestBuilderInternal instantiates a new OrderWithOrderItemRequestBuilder and sets the default values.
func NewOrderWithOrderItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrderWithOrderItemRequestBuilder) {
m := &OrderWithOrderItemRequestBuilder{
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/store/order/{orderId}", pathParameters),
}
return m
}
// NewOrderWithOrderItemRequestBuilder instantiates a new WithOrderItemRequestBuilder and sets the default values.
// NewOrderWithOrderItemRequestBuilder instantiates a new OrderWithOrderItemRequestBuilder and sets the default values.
func NewOrderWithOrderItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrderWithOrderItemRequestBuilder) {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewOrderWithOrderItemRequestBuilderInternal(urlParams, requestAdapter)
}
// Delete for valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
// returns a []byte when successful
func (m *OrderWithOrderItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *OrderWithOrderItemRequestBuilderDeleteRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -53,6 +54,7 @@ func (m *OrderWithOrderItemRequestBuilder) Delete(ctx context.Context, requestCo
return res.([]byte), nil
}
// Get for valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
// returns a Orderable when successful
func (m *OrderWithOrderItemRequestBuilder) Get(ctx context.Context, requestConfiguration *OrderWithOrderItemRequestBuilderGetRequestConfiguration)(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Orderable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -68,6 +70,7 @@ func (m *OrderWithOrderItemRequestBuilder) Get(ctx context.Context, requestConfi
return res.(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Orderable), nil
}
// ToDeleteRequestInformation for valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
// returns a *RequestInformation when successful
func (m *OrderWithOrderItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *OrderWithOrderItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -78,6 +81,7 @@ func (m *OrderWithOrderItemRequestBuilder) ToDeleteRequestInformation(ctx contex
return requestInfo, nil
}
// ToGetRequestInformation for valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
// returns a *RequestInformation when successful
func (m *OrderWithOrderItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *OrderWithOrderItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -88,6 +92,7 @@ func (m *OrderWithOrderItemRequestBuilder) ToGetRequestInformation(ctx context.C
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 *OrderWithOrderItemRequestBuilder when successful
func (m *OrderWithOrderItemRequestBuilder) WithUrl(rawUrl string)(*OrderWithOrderItemRequestBuilder) {
return NewOrderWithOrderItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -22,10 +22,12 @@ func NewStoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb
return NewStoreRequestBuilderInternal(urlParams, requestAdapter)
}
// Inventory the inventory property
// returns a *InventoryRequestBuilder when successful
func (m *StoreRequestBuilder) Inventory()(*InventoryRequestBuilder) {
return NewInventoryRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// Order the order property
// returns a *OrderRequestBuilder when successful
func (m *StoreRequestBuilder) Order()(*OrderRequestBuilder) {
return NewOrderRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}

Просмотреть файл

@ -32,6 +32,7 @@ func NewCreateWithArrayRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da
return NewCreateWithArrayRequestBuilderInternal(urlParams, requestAdapter)
}
// Post creates list of users with given input array
// returns a []byte when successful
func (m *CreateWithArrayRequestBuilder) Post(ctx context.Context, body []idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *CreateWithArrayRequestBuilderPostRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -46,6 +47,7 @@ func (m *CreateWithArrayRequestBuilder) Post(ctx context.Context, body []idf4cc4
}
return res.([]byte), nil
}
// returns a *RequestInformation when successful
func (m *CreateWithArrayRequestBuilder) ToPostRequestInformation(ctx context.Context, body []idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *CreateWithArrayRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -66,6 +68,7 @@ func (m *CreateWithArrayRequestBuilder) ToPostRequestInformation(ctx context.Con
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 *CreateWithArrayRequestBuilder when successful
func (m *CreateWithArrayRequestBuilder) WithUrl(rawUrl string)(*CreateWithArrayRequestBuilder) {
return NewCreateWithArrayRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -32,6 +32,7 @@ func NewCreateWithListRequestBuilder(rawUrl string, requestAdapter i2ae4187f7dae
return NewCreateWithListRequestBuilderInternal(urlParams, requestAdapter)
}
// Post creates list of users with given input array
// returns a []byte when successful
func (m *CreateWithListRequestBuilder) Post(ctx context.Context, body []idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *CreateWithListRequestBuilderPostRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -46,6 +47,7 @@ func (m *CreateWithListRequestBuilder) Post(ctx context.Context, body []idf4cc4a
}
return res.([]byte), nil
}
// returns a *RequestInformation when successful
func (m *CreateWithListRequestBuilder) ToPostRequestInformation(ctx context.Context, body []idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *CreateWithListRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -66,6 +68,7 @@ func (m *CreateWithListRequestBuilder) ToPostRequestInformation(ctx context.Cont
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 *CreateWithListRequestBuilder when successful
func (m *CreateWithListRequestBuilder) WithUrl(rawUrl string)(*CreateWithListRequestBuilder) {
return NewCreateWithListRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -39,6 +39,7 @@ func NewLoginRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb
return NewLoginRequestBuilderInternal(urlParams, requestAdapter)
}
// Get logs user into the system
// returns a *string when successful
func (m *LoginRequestBuilder) Get(ctx context.Context, requestConfiguration *LoginRequestBuilderGetRequestConfiguration)(*string, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -53,6 +54,7 @@ func (m *LoginRequestBuilder) Get(ctx context.Context, requestConfiguration *Log
}
return res.(*string), nil
}
// returns a *RequestInformation when successful
func (m *LoginRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LoginRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -66,6 +68,7 @@ func (m *LoginRequestBuilder) ToGetRequestInformation(ctx context.Context, reque
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 *LoginRequestBuilder when successful
func (m *LoginRequestBuilder) WithUrl(rawUrl string)(*LoginRequestBuilder) {
return NewLoginRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -30,6 +30,7 @@ func NewLogoutRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371c
return NewLogoutRequestBuilderInternal(urlParams, requestAdapter)
}
// Get logs out current logged in user session
// returns a []byte when successful
func (m *LogoutRequestBuilder) Get(ctx context.Context, requestConfiguration *LogoutRequestBuilderGetRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -44,6 +45,7 @@ func (m *LogoutRequestBuilder) Get(ctx context.Context, requestConfiguration *Lo
}
return res.([]byte), nil
}
// returns a *RequestInformation when successful
func (m *LogoutRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LogoutRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -54,6 +56,7 @@ func (m *LogoutRequestBuilder) ToGetRequestInformation(ctx context.Context, requ
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 *LogoutRequestBuilder when successful
func (m *LogoutRequestBuilder) WithUrl(rawUrl string)(*LogoutRequestBuilder) {
return NewLogoutRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -18,6 +18,7 @@ type UserRequestBuilderPostRequestConfiguration struct {
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// ByUsername gets an item from the github.com/microsoft/kiota-samples/petstore/go/utilities/.user.item collection
// returns a *WithUsernameItemRequestBuilder when successful
func (m *UserRequestBuilder) ByUsername(username string)(*WithUsernameItemRequestBuilder) {
urlTplParams := make(map[string]string)
for idx, item := range m.BaseRequestBuilder.PathParameters {
@ -42,22 +43,27 @@ func NewUserRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1
return NewUserRequestBuilderInternal(urlParams, requestAdapter)
}
// CreateWithArray the createWithArray property
// returns a *CreateWithArrayRequestBuilder when successful
func (m *UserRequestBuilder) CreateWithArray()(*CreateWithArrayRequestBuilder) {
return NewCreateWithArrayRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// CreateWithList the createWithList property
// returns a *CreateWithListRequestBuilder when successful
func (m *UserRequestBuilder) CreateWithList()(*CreateWithListRequestBuilder) {
return NewCreateWithListRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// Login the login property
// returns a *LoginRequestBuilder when successful
func (m *UserRequestBuilder) Login()(*LoginRequestBuilder) {
return NewLoginRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// Logout the logout property
// returns a *LogoutRequestBuilder when successful
func (m *UserRequestBuilder) Logout()(*LogoutRequestBuilder) {
return NewLogoutRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)
}
// Post this can only be done by the logged in user.
// returns a []byte when successful
func (m *UserRequestBuilder) Post(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *UserRequestBuilderPostRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -73,6 +79,7 @@ func (m *UserRequestBuilder) Post(ctx context.Context, body idf4cc4a16f466bc4d40
return res.([]byte), nil
}
// ToPostRequestInformation this can only be done by the logged in user.
// returns a *RequestInformation when successful
func (m *UserRequestBuilder) ToPostRequestInformation(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *UserRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -87,6 +94,7 @@ func (m *UserRequestBuilder) ToPostRequestInformation(ctx context.Context, body
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 *UserRequestBuilder when successful
func (m *UserRequestBuilder) WithUrl(rawUrl string)(*UserRequestBuilder) {
return NewUserRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Просмотреть файл

@ -45,6 +45,7 @@ func NewWithUsernameItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d
return NewWithUsernameItemRequestBuilderInternal(urlParams, requestAdapter)
}
// Delete this can only be done by the logged in user.
// returns a []byte when successful
func (m *WithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WithUsernameItemRequestBuilderDeleteRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -60,6 +61,7 @@ func (m *WithUsernameItemRequestBuilder) Delete(ctx context.Context, requestConf
return res.([]byte), nil
}
// Get get user by user name
// returns a Userable when successful
func (m *WithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WithUsernameItemRequestBuilderGetRequestConfiguration)(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
@ -75,6 +77,7 @@ func (m *WithUsernameItemRequestBuilder) Get(ctx context.Context, requestConfigu
return res.(idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable), nil
}
// Put this can only be done by the logged in user.
// returns a []byte when successful
func (m *WithUsernameItemRequestBuilder) Put(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *WithUsernameItemRequestBuilderPutRequestConfiguration)([]byte, error) {
requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration);
if err != nil {
@ -90,6 +93,7 @@ func (m *WithUsernameItemRequestBuilder) Put(ctx context.Context, body idf4cc4a1
return res.([]byte), nil
}
// ToDeleteRequestInformation this can only be done by the logged in user.
// returns a *RequestInformation when successful
func (m *WithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WithUsernameItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -99,6 +103,7 @@ func (m *WithUsernameItemRequestBuilder) ToDeleteRequestInformation(ctx context.
requestInfo.Headers.TryAdd("Accept", "application/json")
return requestInfo, nil
}
// returns a *RequestInformation when successful
func (m *WithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WithUsernameItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -109,6 +114,7 @@ func (m *WithUsernameItemRequestBuilder) ToGetRequestInformation(ctx context.Con
return requestInfo, nil
}
// ToPutRequestInformation this can only be done by the logged in user.
// returns a *RequestInformation when successful
func (m *WithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body idf4cc4a16f466bc4d40254b5ab3d20d0f80e475a6630c5e138f6c79181a5d398.Userable, requestConfiguration *WithUsernameItemRequestBuilderPutRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
if requestConfiguration != nil {
@ -123,6 +129,7 @@ func (m *WithUsernameItemRequestBuilder) ToPutRequestInformation(ctx context.Con
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 *WithUsernameItemRequestBuilder when successful
func (m *WithUsernameItemRequestBuilder) WithUrl(rawUrl string)(*WithUsernameItemRequestBuilder) {
return NewWithUsernameItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter);
}

Двоичные данные
petstore/java/gradle/wrapper/gradle-wrapper.jar поставляемый

Двоичный файл не отображается.

Просмотреть файл

@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

51
petstore/java/gradlew поставляемый
Просмотреть файл

@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@ -80,13 +80,11 @@ do
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
@ -205,6 +214,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

35
petstore/java/gradlew.bat поставляемый
Просмотреть файл

@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

Просмотреть файл

@ -3,8 +3,6 @@ package petstore.utilities;
import com.microsoft.kiota.ApiClientBuilder;
import com.microsoft.kiota.BaseRequestBuilder;
import com.microsoft.kiota.RequestAdapter;
import java.util.HashMap;
import java.util.Objects;
import com.microsoft.kiota.serialization.FormParseNodeFactory;
import com.microsoft.kiota.serialization.FormSerializationWriterFactory;
import com.microsoft.kiota.serialization.JsonParseNodeFactory;
@ -14,6 +12,8 @@ import com.microsoft.kiota.serialization.ParseNodeFactoryRegistry;
import com.microsoft.kiota.serialization.SerializationWriterFactoryRegistry;
import com.microsoft.kiota.serialization.TextParseNodeFactory;
import com.microsoft.kiota.serialization.TextSerializationWriterFactory;
import java.util.HashMap;
import java.util.Objects;
import petstore.utilities.pet.PetRequestBuilder;
import petstore.utilities.store.StoreRequestBuilder;
import petstore.utilities.user.UserRequestBuilder;
@ -24,6 +24,7 @@ import petstore.utilities.user.UserRequestBuilder;
public class ApiClient extends BaseRequestBuilder {
/**
* The pet property
* @return a {@link PetRequestBuilder}
*/
@jakarta.annotation.Nonnull
public PetRequestBuilder pet() {
@ -31,6 +32,7 @@ public class ApiClient extends BaseRequestBuilder {
}
/**
* The store property
* @return a {@link StoreRequestBuilder}
*/
@jakarta.annotation.Nonnull
public StoreRequestBuilder store() {
@ -38,13 +40,14 @@ public class ApiClient extends BaseRequestBuilder {
}
/**
* The user property
* @return a {@link UserRequestBuilder}
*/
@jakarta.annotation.Nonnull
public UserRequestBuilder user() {
return new UserRequestBuilder(pathParameters, requestAdapter);
}
/**
* Instantiates a new ApiClient and sets the default values.
* Instantiates a new {@link ApiClient} and sets the default values.
* @param requestAdapter The request adapter to use to execute the requests.
*/
public ApiClient(@jakarta.annotation.Nonnull final RequestAdapter requestAdapter) {

Просмотреть файл

@ -1,14 +1,15 @@
{
"descriptionHash": "21A9B6E38B80E99E32EB4CB2A98A1A4AA91E1F660659E1E645A3DFFAF40D04A8373849DAA537F8368DF54172E69B7751A4AADE385768C9D4527574817FCE1FDC",
"descriptionHash": "20D825D2128F12BBE8B3E6D3FE63DA30E940B2D09BA6D6AF0DA3896F7FD6BF7DF77DA57D800812AEAB089DB3A640D63BFDE361C4FA134E29C31C909B22E00D5C",
"descriptionLocation": "https://petstore.swagger.io/v2/swagger.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.0",
"kiotaVersion": "1.16.0",
"clientClassName": "ApiClient",
"clientNamespaceName": "petstore.utilities",
"language": "Java",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",

Просмотреть файл

@ -26,7 +26,7 @@ public class ApiResponse implements AdditionalDataHolder, Parsable {
*/
private String type;
/**
* Instantiates a new ApiResponse and sets the default values.
* Instantiates a new {@link ApiResponse} and sets the default values.
*/
public ApiResponse() {
this.setAdditionalData(new HashMap<>());
@ -34,7 +34,7 @@ public class ApiResponse implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a ApiResponse
* @return a {@link ApiResponse}
*/
@jakarta.annotation.Nonnull
public static ApiResponse createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -43,7 +43,7 @@ public class ApiResponse implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -51,7 +51,7 @@ public class ApiResponse implements AdditionalDataHolder, Parsable {
}
/**
* Gets the code property value. The code property
* @return a Integer
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getCode() {
@ -59,7 +59,7 @@ public class ApiResponse implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
@ -71,7 +71,7 @@ public class ApiResponse implements AdditionalDataHolder, Parsable {
}
/**
* Gets the message property value. The message property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getMessage() {
@ -79,7 +79,7 @@ public class ApiResponse implements AdditionalDataHolder, Parsable {
}
/**
* Gets the type property value. The type property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getType() {

Просмотреть файл

@ -22,7 +22,7 @@ public class Category implements AdditionalDataHolder, Parsable {
*/
private String name;
/**
* Instantiates a new Category and sets the default values.
* Instantiates a new {@link Category} and sets the default values.
*/
public Category() {
this.setAdditionalData(new HashMap<>());
@ -30,7 +30,7 @@ public class Category implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a Category
* @return a {@link Category}
*/
@jakarta.annotation.Nonnull
public static Category createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -39,7 +39,7 @@ public class Category implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -47,7 +47,7 @@ public class Category implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
@ -58,7 +58,7 @@ public class Category implements AdditionalDataHolder, Parsable {
}
/**
* Gets the id property value. The id property
* @return a Long
* @return a {@link Long}
*/
@jakarta.annotation.Nullable
public Long getId() {
@ -66,7 +66,7 @@ public class Category implements AdditionalDataHolder, Parsable {
}
/**
* Gets the name property value. The name property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getName() {

Просмотреть файл

@ -39,7 +39,7 @@ public class Order implements AdditionalDataHolder, Parsable {
*/
private OrderStatus status;
/**
* Instantiates a new Order and sets the default values.
* Instantiates a new {@link Order} and sets the default values.
*/
public Order() {
this.setAdditionalData(new HashMap<>());
@ -47,7 +47,7 @@ public class Order implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a Order
* @return a {@link Order}
*/
@jakarta.annotation.Nonnull
public static Order createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -56,7 +56,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -64,7 +64,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* Gets the complete property value. The complete property
* @return a Boolean
* @return a {@link Boolean}
*/
@jakarta.annotation.Nullable
public Boolean getComplete() {
@ -72,7 +72,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
@ -87,7 +87,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* Gets the id property value. The id property
* @return a Long
* @return a {@link Long}
*/
@jakarta.annotation.Nullable
public Long getId() {
@ -95,7 +95,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* Gets the petId property value. The petId property
* @return a Long
* @return a {@link Long}
*/
@jakarta.annotation.Nullable
public Long getPetId() {
@ -103,7 +103,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* Gets the quantity property value. The quantity property
* @return a Integer
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getQuantity() {
@ -111,7 +111,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* Gets the shipDate property value. The shipDate property
* @return a OffsetDateTime
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getShipDate() {
@ -119,7 +119,7 @@ public class Order implements AdditionalDataHolder, Parsable {
}
/**
* Gets the status property value. Order Status
* @return a OrderStatus
* @return a {@link OrderStatus}
*/
@jakarta.annotation.Nullable
public OrderStatus getStatus() {

Просмотреть файл

@ -38,7 +38,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
*/
private java.util.List<Tag> tags;
/**
* Instantiates a new Pet and sets the default values.
* Instantiates a new {@link Pet} and sets the default values.
*/
public Pet() {
this.setAdditionalData(new HashMap<>());
@ -46,7 +46,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a Pet
* @return a {@link Pet}
*/
@jakarta.annotation.Nonnull
public static Pet createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -55,7 +55,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -63,7 +63,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* Gets the category property value. The category property
* @return a Category
* @return a {@link Category}
*/
@jakarta.annotation.Nullable
public Category getCategory() {
@ -71,7 +71,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
@ -86,7 +86,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* Gets the id property value. The id property
* @return a Long
* @return a {@link Long}
*/
@jakarta.annotation.Nullable
public Long getId() {
@ -94,7 +94,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* Gets the name property value. The name property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getName() {
@ -102,7 +102,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* Gets the photoUrls property value. The photoUrls property
* @return a java.util.List<String>
* @return a {@link java.util.List<String>}
*/
@jakarta.annotation.Nullable
public java.util.List<String> getPhotoUrls() {
@ -110,7 +110,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* Gets the status property value. pet status in the store
* @return a PetStatus
* @return a {@link PetStatus}
*/
@jakarta.annotation.Nullable
public PetStatus getStatus() {
@ -118,7 +118,7 @@ public class Pet implements AdditionalDataHolder, Parsable {
}
/**
* Gets the tags property value. The tags property
* @return a java.util.List<Tag>
* @return a {@link java.util.List<Tag>}
*/
@jakarta.annotation.Nullable
public java.util.List<Tag> getTags() {

Просмотреть файл

@ -22,7 +22,7 @@ public class Tag implements AdditionalDataHolder, Parsable {
*/
private String name;
/**
* Instantiates a new Tag and sets the default values.
* Instantiates a new {@link Tag} and sets the default values.
*/
public Tag() {
this.setAdditionalData(new HashMap<>());
@ -30,7 +30,7 @@ public class Tag implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a Tag
* @return a {@link Tag}
*/
@jakarta.annotation.Nonnull
public static Tag createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -39,7 +39,7 @@ public class Tag implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -47,7 +47,7 @@ public class Tag implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
@ -58,7 +58,7 @@ public class Tag implements AdditionalDataHolder, Parsable {
}
/**
* Gets the id property value. The id property
* @return a Long
* @return a {@link Long}
*/
@jakarta.annotation.Nullable
public Long getId() {
@ -66,7 +66,7 @@ public class Tag implements AdditionalDataHolder, Parsable {
}
/**
* Gets the name property value. The name property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getName() {

Просмотреть файл

@ -46,7 +46,7 @@ public class User implements AdditionalDataHolder, Parsable {
*/
private Integer userStatus;
/**
* Instantiates a new User and sets the default values.
* Instantiates a new {@link User} and sets the default values.
*/
public User() {
this.setAdditionalData(new HashMap<>());
@ -54,7 +54,7 @@ public class User implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a User
* @return a {@link User}
*/
@jakarta.annotation.Nonnull
public static User createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -63,7 +63,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -71,7 +71,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the email property value. The email property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getEmail() {
@ -79,7 +79,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
@ -96,7 +96,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the firstName property value. The firstName property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getFirstName() {
@ -104,7 +104,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the id property value. The id property
* @return a Long
* @return a {@link Long}
*/
@jakarta.annotation.Nullable
public Long getId() {
@ -112,7 +112,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the lastName property value. The lastName property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getLastName() {
@ -120,7 +120,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the password property value. The password property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getPassword() {
@ -128,7 +128,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the phone property value. The phone property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getPhone() {
@ -136,7 +136,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the username property value. The username property
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUsername() {
@ -144,7 +144,7 @@ public class User implements AdditionalDataHolder, Parsable {
}
/**
* Gets the userStatus property value. User Status
* @return a Integer
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getUserStatus() {

Просмотреть файл

@ -24,6 +24,7 @@ import petstore.utilities.pet.item.WithPetItemRequestBuilder;
public class PetRequestBuilder extends BaseRequestBuilder {
/**
* The findByStatus property
* @return a {@link FindByStatusRequestBuilder}
*/
@jakarta.annotation.Nonnull
public FindByStatusRequestBuilder findByStatus() {
@ -31,6 +32,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
}
/**
* The findByTags property
* @return a {@link FindByTagsRequestBuilder}
*/
@jakarta.annotation.Nonnull
public FindByTagsRequestBuilder findByTags() {
@ -39,7 +41,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
/**
* Gets an item from the petstore.utilities.pet.item collection
* @param petId ID of pet to return
* @return a WithPetItemRequestBuilder
* @return a {@link WithPetItemRequestBuilder}
*/
@jakarta.annotation.Nonnull
public WithPetItemRequestBuilder byPetId(@jakarta.annotation.Nonnull final Long petId) {
@ -49,7 +51,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
return new WithPetItemRequestBuilder(urlTplParams, requestAdapter);
}
/**
* Instantiates a new PetRequestBuilder and sets the default values.
* Instantiates a new {@link PetRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -57,7 +59,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/pet", pathParameters);
}
/**
* Instantiates a new PetRequestBuilder and sets the default values.
* Instantiates a new {@link PetRequestBuilder} 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.
*/
@ -67,7 +69,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
/**
* Add a new pet to the store
* @param body The request body
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final Pet body) {
@ -77,7 +79,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
* Add a new pet to the store
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final Pet body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -88,7 +90,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
/**
* Update an existing pet
* @param body The request body
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream put(@jakarta.annotation.Nonnull final Pet body) {
@ -98,7 +100,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
* Update an existing pet
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream put(@jakarta.annotation.Nonnull final Pet body, @jakarta.annotation.Nullable final java.util.function.Consumer<PutRequestConfiguration> requestConfiguration) {
@ -108,7 +110,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
}
/**
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final Pet body) {
@ -117,7 +119,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
/**
* @param body The request body
* @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 toPostRequestInformation(@jakarta.annotation.Nonnull final Pet body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -130,7 +132,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
}
/**
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPutRequestInformation(@jakarta.annotation.Nonnull final Pet body) {
@ -139,7 +141,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
/**
* @param body The request body
* @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 toPutRequestInformation(@jakarta.annotation.Nonnull final Pet body, @jakarta.annotation.Nullable final java.util.function.Consumer<PutRequestConfiguration> requestConfiguration) {
@ -153,7 +155,7 @@ public class PetRequestBuilder extends BaseRequestBuilder {
/**
* 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 PetRequestBuilder
* @return a {@link PetRequestBuilder}
*/
@jakarta.annotation.Nonnull
public PetRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -20,7 +20,7 @@ import petstore.utilities.models.Pet;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class FindByStatusRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new FindByStatusRequestBuilder and sets the default values.
* Instantiates a new {@link FindByStatusRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -28,7 +28,7 @@ public class FindByStatusRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/pet/findByStatus?status={status}", pathParameters);
}
/**
* Instantiates a new FindByStatusRequestBuilder and sets the default values.
* Instantiates a new {@link FindByStatusRequestBuilder} 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.
*/
@ -37,7 +37,7 @@ public class FindByStatusRequestBuilder extends BaseRequestBuilder {
}
/**
* Multiple status values can be provided with comma separated strings
* @return a java.util.List<Pet>
* @return a {@link java.util.List<Pet>}
*/
@jakarta.annotation.Nullable
public java.util.List<Pet> get() {
@ -46,7 +46,7 @@ public class FindByStatusRequestBuilder extends BaseRequestBuilder {
/**
* Multiple status values can be provided with comma separated strings
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a java.util.List<Pet>
* @return a {@link java.util.List<Pet>}
*/
@jakarta.annotation.Nullable
public java.util.List<Pet> get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
@ -55,7 +55,7 @@ public class FindByStatusRequestBuilder extends BaseRequestBuilder {
}
/**
* Multiple status values can be provided with comma separated strings
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
@ -64,7 +64,7 @@ public class FindByStatusRequestBuilder extends BaseRequestBuilder {
/**
* Multiple status values can be provided with comma separated strings
* @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) {
@ -76,7 +76,7 @@ public class FindByStatusRequestBuilder extends BaseRequestBuilder {
/**
* 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 FindByStatusRequestBuilder
* @return a {@link FindByStatusRequestBuilder}
*/
@jakarta.annotation.Nonnull
public FindByStatusRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
@ -91,11 +91,11 @@ public class FindByStatusRequestBuilder extends BaseRequestBuilder {
/**
* Status values that need to be considered for filter
*/
@jakarta.annotation.Nullable
public String[] status;
@jakarta.annotation.Nonnull
public GetStatusQueryParameterType[] status;
/**
* Extracts the query parameters into a map for the URI template parsing.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> toQueryParameters() {

Просмотреть файл

@ -0,0 +1,27 @@
package petstore.utilities.pet.findbystatus;
import com.microsoft.kiota.serialization.ValuedEnum;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public enum GetStatusQueryParameterType implements ValuedEnum {
Available("available"),
Pending("pending"),
Sold("sold");
public final String value;
GetStatusQueryParameterType(final String value) {
this.value = value;
}
@jakarta.annotation.Nonnull
public String getValue() { return this.value; }
@jakarta.annotation.Nullable
public static GetStatusQueryParameterType forValue(@jakarta.annotation.Nonnull final String searchValue) {
Objects.requireNonNull(searchValue);
switch(searchValue) {
case "available": return Available;
case "pending": return Pending;
case "sold": return Sold;
default: return null;
}
}
}

Просмотреть файл

@ -20,7 +20,7 @@ import petstore.utilities.models.Pet;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class FindByTagsRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new FindByTagsRequestBuilder and sets the default values.
* Instantiates a new {@link FindByTagsRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -28,7 +28,7 @@ public class FindByTagsRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/pet/findByTags?tags={tags}", pathParameters);
}
/**
* Instantiates a new FindByTagsRequestBuilder and sets the default values.
* Instantiates a new {@link FindByTagsRequestBuilder} 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.
*/
@ -37,7 +37,7 @@ public class FindByTagsRequestBuilder extends BaseRequestBuilder {
}
/**
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @return a java.util.List<Pet>
* @return a {@link java.util.List<Pet>}
* @deprecated
*
*/
@ -49,7 +49,7 @@ public class FindByTagsRequestBuilder extends BaseRequestBuilder {
/**
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a java.util.List<Pet>
* @return a {@link java.util.List<Pet>}
* @deprecated
*
*/
@ -61,7 +61,7 @@ public class FindByTagsRequestBuilder extends BaseRequestBuilder {
}
/**
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @return a RequestInformation
* @return a {@link RequestInformation}
* @deprecated
*
*/
@ -73,7 +73,7 @@ public class FindByTagsRequestBuilder extends BaseRequestBuilder {
/**
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a RequestInformation
* @return a {@link RequestInformation}
* @deprecated
*
*/
@ -88,7 +88,7 @@ public class FindByTagsRequestBuilder extends BaseRequestBuilder {
/**
* 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 FindByTagsRequestBuilder
* @return a {@link FindByTagsRequestBuilder}
* @deprecated
*
*/
@ -110,7 +110,7 @@ public class FindByTagsRequestBuilder extends BaseRequestBuilder {
public String[] tags;
/**
* Extracts the query parameters into a map for the URI template parsing.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> toQueryParameters() {

Просмотреть файл

@ -22,13 +22,14 @@ import petstore.utilities.pet.item.uploadimage.UploadImageRequestBuilder;
public class WithPetItemRequestBuilder extends BaseRequestBuilder {
/**
* The uploadImage property
* @return a {@link UploadImageRequestBuilder}
*/
@jakarta.annotation.Nonnull
public UploadImageRequestBuilder uploadImage() {
return new UploadImageRequestBuilder(pathParameters, requestAdapter);
}
/**
* Instantiates a new WithPetItemRequestBuilder and sets the default values.
* Instantiates a new {@link WithPetItemRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -36,7 +37,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/pet/{petId}", pathParameters);
}
/**
* Instantiates a new WithPetItemRequestBuilder and sets the default values.
* Instantiates a new {@link WithPetItemRequestBuilder} 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.
*/
@ -45,7 +46,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
}
/**
* Deletes a pet
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream delete() {
@ -54,7 +55,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
/**
* Deletes a pet
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream delete(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
@ -63,7 +64,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
}
/**
* Returns a single pet
* @return a Pet
* @return a {@link Pet}
*/
@jakarta.annotation.Nullable
public Pet get() {
@ -72,7 +73,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
/**
* Returns a single pet
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a Pet
* @return a {@link Pet}
*/
@jakarta.annotation.Nullable
public Pet get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
@ -82,7 +83,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
/**
* Updates a pet in the store with form data
* @param body The request body
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final WithPetPostRequestBody body) {
@ -92,7 +93,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
* Updates a pet in the store with form data
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final WithPetPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -101,7 +102,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
return this.requestAdapter.sendPrimitive(requestInfo, null, InputStream.class);
}
/**
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toDeleteRequestInformation() {
@ -109,7 +110,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
}
/**
* @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 toDeleteRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
@ -120,7 +121,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
}
/**
* Returns a single pet
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
@ -129,7 +130,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
/**
* Returns a single pet
* @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) {
@ -140,7 +141,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
}
/**
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final WithPetPostRequestBody body) {
@ -149,7 +150,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
/**
* @param body The request body
* @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 toPostRequestInformation(@jakarta.annotation.Nonnull final WithPetPostRequestBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -163,7 +164,7 @@ public class WithPetItemRequestBuilder extends BaseRequestBuilder {
/**
* 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 WithPetItemRequestBuilder
* @return a {@link WithPetItemRequestBuilder}
*/
@jakarta.annotation.Nonnull
public WithPetItemRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -22,7 +22,7 @@ public class WithPetPostRequestBody implements AdditionalDataHolder, Parsable {
*/
private String status;
/**
* Instantiates a new WithPetPostRequestBody and sets the default values.
* Instantiates a new {@link WithPetPostRequestBody} and sets the default values.
*/
public WithPetPostRequestBody() {
this.setAdditionalData(new HashMap<>());
@ -30,7 +30,7 @@ public class WithPetPostRequestBody implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a WithPetPostRequestBody
* @return a {@link WithPetPostRequestBody}
*/
@jakarta.annotation.Nonnull
public static WithPetPostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -39,7 +39,7 @@ public class WithPetPostRequestBody implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -47,7 +47,7 @@ public class WithPetPostRequestBody implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {
@ -58,7 +58,7 @@ public class WithPetPostRequestBody implements AdditionalDataHolder, Parsable {
}
/**
* Gets the name property value. Updated name of the pet
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getName() {
@ -66,7 +66,7 @@ public class WithPetPostRequestBody implements AdditionalDataHolder, Parsable {
}
/**
* Gets the status property value. Updated status of the pet
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getStatus() {

Просмотреть файл

@ -20,7 +20,7 @@ import petstore.utilities.models.ApiResponse;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class UploadImageRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new UploadImageRequestBuilder and sets the default values.
* Instantiates a new {@link UploadImageRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -28,7 +28,7 @@ public class UploadImageRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/pet/{petId}/uploadImage", pathParameters);
}
/**
* Instantiates a new UploadImageRequestBuilder and sets the default values.
* Instantiates a new {@link UploadImageRequestBuilder} 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.
*/
@ -38,7 +38,7 @@ public class UploadImageRequestBuilder extends BaseRequestBuilder {
/**
* uploads an image
* @param body Binary request body
* @return a ApiResponse
* @return a {@link ApiResponse}
*/
@jakarta.annotation.Nullable
public ApiResponse post(@jakarta.annotation.Nonnull final InputStream body) {
@ -48,7 +48,7 @@ public class UploadImageRequestBuilder extends BaseRequestBuilder {
* uploads an image
* @param body Binary request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a ApiResponse
* @return a {@link ApiResponse}
*/
@jakarta.annotation.Nullable
public ApiResponse post(@jakarta.annotation.Nonnull final InputStream body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -58,7 +58,7 @@ public class UploadImageRequestBuilder extends BaseRequestBuilder {
}
/**
* @param body Binary request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final InputStream body) {
@ -67,7 +67,7 @@ public class UploadImageRequestBuilder extends BaseRequestBuilder {
/**
* @param body Binary request body
* @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 toPostRequestInformation(@jakarta.annotation.Nonnull final InputStream body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -81,7 +81,7 @@ public class UploadImageRequestBuilder extends BaseRequestBuilder {
/**
* 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 UploadImageRequestBuilder
* @return a {@link UploadImageRequestBuilder}
*/
@jakarta.annotation.Nonnull
public UploadImageRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -13,6 +13,7 @@ import petstore.utilities.store.order.OrderRequestBuilder;
public class StoreRequestBuilder extends BaseRequestBuilder {
/**
* The inventory property
* @return a {@link InventoryRequestBuilder}
*/
@jakarta.annotation.Nonnull
public InventoryRequestBuilder inventory() {
@ -20,13 +21,14 @@ public class StoreRequestBuilder extends BaseRequestBuilder {
}
/**
* The order property
* @return a {@link OrderRequestBuilder}
*/
@jakarta.annotation.Nonnull
public OrderRequestBuilder order() {
return new OrderRequestBuilder(pathParameters, requestAdapter);
}
/**
* Instantiates a new StoreRequestBuilder and sets the default values.
* Instantiates a new {@link StoreRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -34,7 +36,7 @@ public class StoreRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/store", pathParameters);
}
/**
* Instantiates a new StoreRequestBuilder and sets the default values.
* Instantiates a new {@link StoreRequestBuilder} 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.
*/

Просмотреть файл

@ -14,7 +14,7 @@ public class InventoryGetResponse implements AdditionalDataHolder, Parsable {
*/
private Map<String, Object> additionalData;
/**
* Instantiates a new InventoryGetResponse and sets the default values.
* Instantiates a new {@link InventoryGetResponse} and sets the default values.
*/
public InventoryGetResponse() {
this.setAdditionalData(new HashMap<>());
@ -22,7 +22,7 @@ public class InventoryGetResponse implements AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a InventoryGetResponse
* @return a {@link InventoryGetResponse}
*/
@jakarta.annotation.Nonnull
public static InventoryGetResponse createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
@ -31,7 +31,7 @@ public class InventoryGetResponse implements AdditionalDataHolder, Parsable {
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> getAdditionalData() {
@ -39,7 +39,7 @@ public class InventoryGetResponse implements AdditionalDataHolder, Parsable {
}
/**
* The deserialization information for the current model
* @return a Map<String, java.util.function.Consumer<ParseNode>>
* @return a {@link Map<String, java.util.function.Consumer<ParseNode>>}
*/
@jakarta.annotation.Nonnull
public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() {

Просмотреть файл

@ -18,7 +18,7 @@ import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class InventoryRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new InventoryRequestBuilder and sets the default values.
* Instantiates a new {@link InventoryRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -26,7 +26,7 @@ public class InventoryRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/store/inventory", pathParameters);
}
/**
* Instantiates a new InventoryRequestBuilder and sets the default values.
* Instantiates a new {@link InventoryRequestBuilder} 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.
*/
@ -35,7 +35,7 @@ public class InventoryRequestBuilder extends BaseRequestBuilder {
}
/**
* Returns a map of status codes to quantities
* @return a InventoryGetResponse
* @return a {@link InventoryGetResponse}
*/
@jakarta.annotation.Nullable
public InventoryGetResponse get() {
@ -44,7 +44,7 @@ public class InventoryRequestBuilder extends BaseRequestBuilder {
/**
* Returns a map of status codes to quantities
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InventoryGetResponse
* @return a {@link InventoryGetResponse}
*/
@jakarta.annotation.Nullable
public InventoryGetResponse get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
@ -53,7 +53,7 @@ public class InventoryRequestBuilder extends BaseRequestBuilder {
}
/**
* Returns a map of status codes to quantities
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
@ -62,7 +62,7 @@ public class InventoryRequestBuilder extends BaseRequestBuilder {
/**
* Returns a map of status codes to quantities
* @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) {
@ -74,7 +74,7 @@ public class InventoryRequestBuilder extends BaseRequestBuilder {
/**
* 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 InventoryRequestBuilder
* @return a {@link InventoryRequestBuilder}
*/
@jakarta.annotation.Nonnull
public InventoryRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -22,7 +22,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
/**
* Gets an item from the petstore.utilities.store.order.item collection
* @param orderId ID of pet that needs to be fetched
* @return a WithOrderItemRequestBuilder
* @return a {@link WithOrderItemRequestBuilder}
*/
@jakarta.annotation.Nonnull
public WithOrderItemRequestBuilder byOrderId(@jakarta.annotation.Nonnull final Long orderId) {
@ -32,7 +32,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
return new WithOrderItemRequestBuilder(urlTplParams, requestAdapter);
}
/**
* Instantiates a new OrderRequestBuilder and sets the default values.
* Instantiates a new {@link OrderRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -40,7 +40,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/store/order", pathParameters);
}
/**
* Instantiates a new OrderRequestBuilder and sets the default values.
* Instantiates a new {@link OrderRequestBuilder} 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.
*/
@ -50,7 +50,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
/**
* Place an order for a pet
* @param body The request body
* @return a Order
* @return a {@link Order}
*/
@jakarta.annotation.Nullable
public Order post(@jakarta.annotation.Nonnull final Order body) {
@ -60,7 +60,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
* Place an order for a pet
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a Order
* @return a {@link Order}
*/
@jakarta.annotation.Nullable
public Order post(@jakarta.annotation.Nonnull final Order body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -70,7 +70,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
}
/**
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final Order body) {
@ -79,7 +79,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
/**
* @param body The request body
* @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 toPostRequestInformation(@jakarta.annotation.Nonnull final Order body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -93,7 +93,7 @@ public class OrderRequestBuilder extends BaseRequestBuilder {
/**
* 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 OrderRequestBuilder
* @return a {@link OrderRequestBuilder}
*/
@jakarta.annotation.Nonnull
public OrderRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -20,7 +20,7 @@ import petstore.utilities.models.Order;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new WithOrderItemRequestBuilder and sets the default values.
* Instantiates a new {@link WithOrderItemRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -28,7 +28,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/store/order/{orderId}", pathParameters);
}
/**
* Instantiates a new WithOrderItemRequestBuilder and sets the default values.
* Instantiates a new {@link WithOrderItemRequestBuilder} 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.
*/
@ -37,7 +37,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
}
/**
* For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream delete() {
@ -46,7 +46,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
/**
* For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream delete(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
@ -55,7 +55,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
}
/**
* For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
* @return a Order
* @return a {@link Order}
*/
@jakarta.annotation.Nullable
public Order get() {
@ -64,7 +64,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
/**
* For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a Order
* @return a {@link Order}
*/
@jakarta.annotation.Nullable
public Order get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
@ -73,7 +73,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
}
/**
* For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toDeleteRequestInformation() {
@ -82,7 +82,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
/**
* For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
* @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 toDeleteRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
@ -93,7 +93,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
}
/**
* For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
@ -102,7 +102,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
/**
* For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
* @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) {
@ -114,7 +114,7 @@ public class WithOrderItemRequestBuilder extends BaseRequestBuilder {
/**
* 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 WithOrderItemRequestBuilder
* @return a {@link WithOrderItemRequestBuilder}
*/
@jakarta.annotation.Nonnull
public WithOrderItemRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -26,6 +26,7 @@ import petstore.utilities.user.logout.LogoutRequestBuilder;
public class UserRequestBuilder extends BaseRequestBuilder {
/**
* The createWithArray property
* @return a {@link CreateWithArrayRequestBuilder}
*/
@jakarta.annotation.Nonnull
public CreateWithArrayRequestBuilder createWithArray() {
@ -33,6 +34,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
}
/**
* The createWithList property
* @return a {@link CreateWithListRequestBuilder}
*/
@jakarta.annotation.Nonnull
public CreateWithListRequestBuilder createWithList() {
@ -40,6 +42,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
}
/**
* The login property
* @return a {@link LoginRequestBuilder}
*/
@jakarta.annotation.Nonnull
public LoginRequestBuilder login() {
@ -47,6 +50,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
}
/**
* The logout property
* @return a {@link LogoutRequestBuilder}
*/
@jakarta.annotation.Nonnull
public LogoutRequestBuilder logout() {
@ -55,7 +59,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
/**
* Gets an item from the petstore.utilities.user.item collection
* @param username The name that needs to be fetched. Use user1 for testing.
* @return a WithUsernameItemRequestBuilder
* @return a {@link WithUsernameItemRequestBuilder}
*/
@jakarta.annotation.Nonnull
public WithUsernameItemRequestBuilder byUsername(@jakarta.annotation.Nonnull final String username) {
@ -65,7 +69,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
return new WithUsernameItemRequestBuilder(urlTplParams, requestAdapter);
}
/**
* Instantiates a new UserRequestBuilder and sets the default values.
* Instantiates a new {@link UserRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -73,7 +77,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/user", pathParameters);
}
/**
* Instantiates a new UserRequestBuilder and sets the default values.
* Instantiates a new {@link UserRequestBuilder} 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.
*/
@ -83,7 +87,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
/**
* This can only be done by the logged in user.
* @param body The request body
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final User body) {
@ -93,7 +97,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
* This can only be done by the logged in user.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final User body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -104,7 +108,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
/**
* This can only be done by the logged in user.
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final User body) {
@ -114,7 +118,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
* This can only be done by the logged in user.
* @param body The request body
* @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 toPostRequestInformation(@jakarta.annotation.Nonnull final User body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -128,7 +132,7 @@ public class UserRequestBuilder extends BaseRequestBuilder {
/**
* 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 UserRequestBuilder
* @return a {@link UserRequestBuilder}
*/
@jakarta.annotation.Nonnull
public UserRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -20,7 +20,7 @@ import petstore.utilities.models.User;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class CreateWithArrayRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new CreateWithArrayRequestBuilder and sets the default values.
* Instantiates a new {@link CreateWithArrayRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -28,7 +28,7 @@ public class CreateWithArrayRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/user/createWithArray", pathParameters);
}
/**
* Instantiates a new CreateWithArrayRequestBuilder and sets the default values.
* Instantiates a new {@link CreateWithArrayRequestBuilder} 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.
*/
@ -38,7 +38,7 @@ public class CreateWithArrayRequestBuilder extends BaseRequestBuilder {
/**
* Creates list of users with given input array
* @param body The request body
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final java.util.List<User> body) {
@ -48,7 +48,7 @@ public class CreateWithArrayRequestBuilder extends BaseRequestBuilder {
* Creates list of users with given input array
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final java.util.List<User> body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -58,7 +58,7 @@ public class CreateWithArrayRequestBuilder extends BaseRequestBuilder {
}
/**
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final java.util.List<User> body) {
@ -67,7 +67,7 @@ public class CreateWithArrayRequestBuilder extends BaseRequestBuilder {
/**
* @param body The request body
* @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 toPostRequestInformation(@jakarta.annotation.Nonnull final java.util.List<User> body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -81,7 +81,7 @@ public class CreateWithArrayRequestBuilder extends BaseRequestBuilder {
/**
* 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 CreateWithArrayRequestBuilder
* @return a {@link CreateWithArrayRequestBuilder}
*/
@jakarta.annotation.Nonnull
public CreateWithArrayRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -20,7 +20,7 @@ import petstore.utilities.models.User;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class CreateWithListRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new CreateWithListRequestBuilder and sets the default values.
* Instantiates a new {@link CreateWithListRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -28,7 +28,7 @@ public class CreateWithListRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/user/createWithList", pathParameters);
}
/**
* Instantiates a new CreateWithListRequestBuilder and sets the default values.
* Instantiates a new {@link CreateWithListRequestBuilder} 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.
*/
@ -38,7 +38,7 @@ public class CreateWithListRequestBuilder extends BaseRequestBuilder {
/**
* Creates list of users with given input array
* @param body The request body
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final java.util.List<User> body) {
@ -48,7 +48,7 @@ public class CreateWithListRequestBuilder extends BaseRequestBuilder {
* Creates list of users with given input array
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream post(@jakarta.annotation.Nonnull final java.util.List<User> body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -58,7 +58,7 @@ public class CreateWithListRequestBuilder extends BaseRequestBuilder {
}
/**
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final java.util.List<User> body) {
@ -67,7 +67,7 @@ public class CreateWithListRequestBuilder extends BaseRequestBuilder {
/**
* @param body The request body
* @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 toPostRequestInformation(@jakarta.annotation.Nonnull final java.util.List<User> body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
@ -81,7 +81,7 @@ public class CreateWithListRequestBuilder extends BaseRequestBuilder {
/**
* 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 CreateWithListRequestBuilder
* @return a {@link CreateWithListRequestBuilder}
*/
@jakarta.annotation.Nonnull
public CreateWithListRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -20,7 +20,7 @@ import petstore.utilities.models.User;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new WithUsernameItemRequestBuilder and sets the default values.
* Instantiates a new {@link WithUsernameItemRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -28,7 +28,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/user/{username}", pathParameters);
}
/**
* Instantiates a new WithUsernameItemRequestBuilder and sets the default values.
* Instantiates a new {@link WithUsernameItemRequestBuilder} 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.
*/
@ -37,7 +37,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
}
/**
* This can only be done by the logged in user.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream delete() {
@ -46,7 +46,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
/**
* This can only be done by the logged in user.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream delete(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
@ -55,7 +55,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
}
/**
* Get user by user name
* @return a User
* @return a {@link User}
*/
@jakarta.annotation.Nullable
public User get() {
@ -64,7 +64,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
/**
* Get user by user name
* @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) {
@ -74,7 +74,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
/**
* This can only be done by the logged in user.
* @param body The request body
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream put(@jakarta.annotation.Nonnull final User body) {
@ -84,7 +84,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
* This can only be done by the logged in user.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream put(@jakarta.annotation.Nonnull final User body, @jakarta.annotation.Nullable final java.util.function.Consumer<PutRequestConfiguration> requestConfiguration) {
@ -94,7 +94,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
}
/**
* This can only be done by the logged in user.
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toDeleteRequestInformation() {
@ -103,7 +103,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
/**
* This can only be done by the logged in user.
* @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 toDeleteRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) {
@ -113,7 +113,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
return requestInfo;
}
/**
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
@ -121,7 +121,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
}
/**
* @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) {
@ -133,7 +133,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
/**
* This can only be done by the logged in user.
* @param body The request body
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPutRequestInformation(@jakarta.annotation.Nonnull final User body) {
@ -143,7 +143,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
* This can only be done by the logged in user.
* @param body The request body
* @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 toPutRequestInformation(@jakarta.annotation.Nonnull final User body, @jakarta.annotation.Nullable final java.util.function.Consumer<PutRequestConfiguration> requestConfiguration) {
@ -157,7 +157,7 @@ public class WithUsernameItemRequestBuilder extends BaseRequestBuilder {
/**
* 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 WithUsernameItemRequestBuilder
* @return a {@link WithUsernameItemRequestBuilder}
*/
@jakarta.annotation.Nonnull
public WithUsernameItemRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -19,7 +19,7 @@ import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class LoginRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new LoginRequestBuilder and sets the default values.
* Instantiates a new {@link LoginRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -27,7 +27,7 @@ public class LoginRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/user/login?password={password}&username={username}", pathParameters);
}
/**
* Instantiates a new LoginRequestBuilder and sets the default values.
* Instantiates a new {@link LoginRequestBuilder} 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.
*/
@ -36,7 +36,7 @@ public class LoginRequestBuilder extends BaseRequestBuilder {
}
/**
* Logs user into the system
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String get() {
@ -45,7 +45,7 @@ public class LoginRequestBuilder extends BaseRequestBuilder {
/**
* Logs user into the system
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a String
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
@ -53,7 +53,7 @@ public class LoginRequestBuilder extends BaseRequestBuilder {
return this.requestAdapter.sendPrimitive(requestInfo, null, String.class);
}
/**
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
@ -61,7 +61,7 @@ public class LoginRequestBuilder extends BaseRequestBuilder {
}
/**
* @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) {
@ -73,7 +73,7 @@ public class LoginRequestBuilder extends BaseRequestBuilder {
/**
* 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 LoginRequestBuilder
* @return a {@link LoginRequestBuilder}
*/
@jakarta.annotation.Nonnull
public LoginRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
@ -97,7 +97,7 @@ public class LoginRequestBuilder extends BaseRequestBuilder {
public String username;
/**
* Extracts the query parameters into a map for the URI template parsing.
* @return a Map<String, Object>
* @return a {@link Map<String, Object>}
*/
@jakarta.annotation.Nonnull
public Map<String, Object> toQueryParameters() {

Просмотреть файл

@ -19,7 +19,7 @@ import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class LogoutRequestBuilder extends BaseRequestBuilder {
/**
* Instantiates a new LogoutRequestBuilder and sets the default values.
* Instantiates a new {@link LogoutRequestBuilder} and sets the default values.
* @param pathParameters Path parameters for the request
* @param requestAdapter The request adapter to use to execute the requests.
*/
@ -27,7 +27,7 @@ public class LogoutRequestBuilder extends BaseRequestBuilder {
super(requestAdapter, "{+baseurl}/user/logout", pathParameters);
}
/**
* Instantiates a new LogoutRequestBuilder and sets the default values.
* Instantiates a new {@link LogoutRequestBuilder} 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.
*/
@ -36,7 +36,7 @@ public class LogoutRequestBuilder extends BaseRequestBuilder {
}
/**
* Logs out current logged in user session
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream get() {
@ -45,7 +45,7 @@ public class LogoutRequestBuilder extends BaseRequestBuilder {
/**
* Logs out current logged in user session
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a InputStream
* @return a {@link InputStream}
*/
@jakarta.annotation.Nullable
public InputStream get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
@ -53,7 +53,7 @@ public class LogoutRequestBuilder extends BaseRequestBuilder {
return this.requestAdapter.sendPrimitive(requestInfo, null, InputStream.class);
}
/**
* @return a RequestInformation
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toGetRequestInformation() {
@ -61,7 +61,7 @@ public class LogoutRequestBuilder extends BaseRequestBuilder {
}
/**
* @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) {
@ -73,7 +73,7 @@ public class LogoutRequestBuilder extends BaseRequestBuilder {
/**
* 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 LogoutRequestBuilder
* @return a {@link LogoutRequestBuilder}
*/
@jakarta.annotation.Nonnull
public LogoutRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {

Просмотреть файл

@ -1,13 +1,21 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { PetRequestBuilderNavigationMetadata, PetRequestBuilderRequestsMetadata, PetRequestBuilderUriTemplate, type PetRequestBuilder } from './pet/';
import { StoreRequestBuilderNavigationMetadata, StoreRequestBuilderUriTemplate, type StoreRequestBuilder } from './store/';
import { type UserRequestBuilder, UserRequestBuilderNavigationMetadata, UserRequestBuilderRequestsMetadata, UserRequestBuilderUriTemplate } from './user/';
// @ts-ignore
import { PetRequestBuilderNavigationMetadata, PetRequestBuilderRequestsMetadata, type PetRequestBuilder } from './pet/index.js';
// @ts-ignore
import { StoreRequestBuilderNavigationMetadata, type StoreRequestBuilder } from './store/index.js';
// @ts-ignore
import { type UserRequestBuilder, UserRequestBuilderNavigationMetadata, UserRequestBuilderRequestsMetadata } from './user/index.js';
// @ts-ignore
import { apiClientProxifier, registerDefaultDeserializer, registerDefaultSerializer, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestAdapter } from '@microsoft/kiota-abstractions';
// @ts-ignore
import { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form';
// @ts-ignore
import { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json';
// @ts-ignore
import { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart';
// @ts-ignore
import { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text';
/**
@ -28,7 +36,7 @@ export interface ApiClient extends BaseRequestBuilder<ApiClient> {
get user(): UserRequestBuilder;
}
/**
* Instantiates a new ApiClient and sets the default values.
* Instantiates a new {@link ApiClient} and sets the default values.
* @param requestAdapter The request adapter to use to execute the requests.
*/
export function createApiClient(requestAdapter: RequestAdapter) {
@ -45,30 +53,27 @@ export function createApiClient(requestAdapter: RequestAdapter) {
const pathParameters: Record<string, unknown> = {
"baseurl": requestAdapter.baseUrl,
};
return apiClientProxifier<ApiClient>(requestAdapter, pathParameters, ApiClientUriTemplate, ApiClientNavigationMetadata, undefined);
return apiClientProxifier<ApiClient>(requestAdapter, pathParameters, ApiClientNavigationMetadata, undefined);
}
/**
* Uri template for the request builder.
*/
export const ApiClientUriTemplate = "{+baseurl}";
/**
* Metadata for all the navigation properties in the request builder.
*/
export const ApiClientNavigationMetadata: Record<Exclude<keyof ApiClient, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
pet: {
uriTemplate: PetRequestBuilderUriTemplate,
requestsMetadata: PetRequestBuilderRequestsMetadata,
navigationMetadata: PetRequestBuilderNavigationMetadata,
},
store: {
uriTemplate: StoreRequestBuilderUriTemplate,
navigationMetadata: StoreRequestBuilderNavigationMetadata,
},
user: {
uriTemplate: UserRequestBuilderUriTemplate,
requestsMetadata: UserRequestBuilderRequestsMetadata,
navigationMetadata: UserRequestBuilderNavigationMetadata,
},
};
/**
* Uri template for the request builder.
*/
export const ApiClientUriTemplate = "{+baseurl}";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,14 +1,15 @@
{
"descriptionHash": "21A9B6E38B80E99E32EB4CB2A98A1A4AA91E1F660659E1E645A3DFFAF40D04A8373849DAA537F8368DF54172E69B7751A4AADE385768C9D4527574817FCE1FDC",
"descriptionHash": "20D825D2128F12BBE8B3E6D3FE63DA30E940B2D09BA6D6AF0DA3896F7FD6BF7DF77DA57D800812AEAB089DB3A640D63BFDE361C4FA134E29C31C909B22E00D5C",
"descriptionLocation": "https://petstore.swagger.io/v2/swagger.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.11.0",
"kiotaVersion": "1.16.0",
"clientClassName": "ApiClient",
"clientNamespaceName": "petstore.utilities",
"language": "TypeScript",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"disableSSLValidation": false,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
"Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory",

Просмотреть файл

@ -1,6 +1,7 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions';
export interface ApiResponse extends AdditionalDataHolder, Parsable {
@ -38,7 +39,7 @@ export interface Category extends AdditionalDataHolder, Parsable {
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a ApiResponse
* @returns {ApiResponse}
*/
export function createApiResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoApiResponse;
@ -46,7 +47,7 @@ export function createApiResponseFromDiscriminatorValue(parseNode: ParseNode | u
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a Category
* @returns {Category}
*/
export function createCategoryFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoCategory;
@ -54,7 +55,7 @@ export function createCategoryFromDiscriminatorValue(parseNode: ParseNode | unde
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a Order
* @returns {Order}
*/
export function createOrderFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoOrder;
@ -62,7 +63,7 @@ export function createOrderFromDiscriminatorValue(parseNode: ParseNode | undefin
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a Pet
* @returns {Pet}
*/
export function createPetFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoPet;
@ -70,7 +71,7 @@ export function createPetFromDiscriminatorValue(parseNode: ParseNode | undefined
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a Tag
* @returns {Tag}
*/
export function createTagFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoTag;
@ -78,14 +79,14 @@ export function createTagFromDiscriminatorValue(parseNode: ParseNode | undefined
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a User
* @returns {User}
*/
export function createUserFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoUser;
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoApiResponse(apiResponse: Partial<ApiResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
@ -96,7 +97,7 @@ export function deserializeIntoApiResponse(apiResponse: Partial<ApiResponse> | u
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoCategory(category: Partial<Category> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
@ -106,7 +107,7 @@ export function deserializeIntoCategory(category: Partial<Category> | undefined
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoOrder(order: Partial<Order> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
@ -120,7 +121,7 @@ export function deserializeIntoOrder(order: Partial<Order> | undefined = {}) : R
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoPet(pet: Partial<Pet> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
@ -134,7 +135,7 @@ export function deserializeIntoPet(pet: Partial<Pet> | undefined = {}) : Record<
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoTag(tag: Partial<Tag> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
@ -144,7 +145,7 @@ export function deserializeIntoTag(tag: Partial<Tag> | undefined = {}) : Record<
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoUser(user: Partial<User> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {

Просмотреть файл

@ -1,7 +1,9 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { createPetFromDiscriminatorValue, type Pet } from '../../models/';
// @ts-ignore
import { createPetFromDiscriminatorValue, type Pet } from '../../models/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
/**
@ -11,13 +13,13 @@ export interface FindByStatusRequestBuilder extends BaseRequestBuilder<FindBySta
/**
* Multiple status values can be provided with comma separated strings
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Pet
* @returns {Promise<Pet[]>}
*/
get(requestConfiguration?: RequestConfiguration<FindByStatusRequestBuilderGetQueryParameters> | undefined) : Promise<Pet[] | undefined>;
/**
* Multiple status values can be provided with comma separated strings
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toGetRequestInformation(requestConfiguration?: RequestConfiguration<FindByStatusRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
}
@ -28,21 +30,28 @@ export interface FindByStatusRequestBuilderGetQueryParameters {
/**
* Status values that need to be considered for filter
*/
status?: string[];
status?: GetStatusQueryParameterType[];
}
export type GetStatusQueryParameterType = (typeof GetStatusQueryParameterTypeObject)[keyof typeof GetStatusQueryParameterTypeObject];
/**
* Uri template for the request builder.
*/
export const FindByStatusRequestBuilderUriTemplate = "{+baseurl}/pet/findByStatus?status={status}";
/**
* Metadata for all the requests in the request builder.
*/
export const FindByStatusRequestBuilderRequestsMetadata: RequestsMetadata = {
get: {
uriTemplate: FindByStatusRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendCollectionAsync",
adapterMethodName: "sendCollection",
responseBodyFactory: createPetFromDiscriminatorValue,
},
};
/**
* Uri template for the request builder.
*/
export const FindByStatusRequestBuilderUriTemplate = "{+baseurl}/pet/findByStatus?status={status}";
export const GetStatusQueryParameterTypeObject = {
Available: "available",
Pending: "pending",
Sold: "sold",
} as const;
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,7 +1,9 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { createPetFromDiscriminatorValue, type Pet } from '../../models/';
// @ts-ignore
import { createPetFromDiscriminatorValue, type Pet } from '../../models/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
/**
@ -11,14 +13,14 @@ export interface FindByTagsRequestBuilder extends BaseRequestBuilder<FindByTagsR
/**
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Pet
* @returns {Promise<Pet[]>}
* @deprecated
*/
get(requestConfiguration?: RequestConfiguration<FindByTagsRequestBuilderGetQueryParameters> | undefined) : Promise<Pet[] | undefined>;
/**
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
* @deprecated
*/
toGetRequestInformation(requestConfiguration?: RequestConfiguration<FindByTagsRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
@ -32,19 +34,20 @@ export interface FindByTagsRequestBuilderGetQueryParameters {
*/
tags?: string[];
}
/**
* Uri template for the request builder.
*/
export const FindByTagsRequestBuilderUriTemplate = "{+baseurl}/pet/findByTags?tags={tags}";
/**
* Metadata for all the requests in the request builder.
*/
export const FindByTagsRequestBuilderRequestsMetadata: RequestsMetadata = {
get: {
uriTemplate: FindByTagsRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendCollectionAsync",
adapterMethodName: "sendCollection",
responseBodyFactory: createPetFromDiscriminatorValue,
},
};
/**
* Uri template for the request builder.
*/
export const FindByTagsRequestBuilderUriTemplate = "{+baseurl}/pet/findByTags?tags={tags}";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,10 +1,15 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { serializePet, type Pet } from '../models/';
import { FindByStatusRequestBuilderRequestsMetadata, FindByStatusRequestBuilderUriTemplate, type FindByStatusRequestBuilder } from './findByStatus/';
import { FindByTagsRequestBuilderRequestsMetadata, FindByTagsRequestBuilderUriTemplate, type FindByTagsRequestBuilder } from './findByTags/';
import { type WithPetItemRequestBuilder, WithPetItemRequestBuilderNavigationMetadata, WithPetItemRequestBuilderRequestsMetadata, WithPetItemRequestBuilderUriTemplate } from './item/';
// @ts-ignore
import { serializePet, type Pet } from '../models/index.js';
// @ts-ignore
import { FindByStatusRequestBuilderRequestsMetadata, type FindByStatusRequestBuilder } from './findByStatus/index.js';
// @ts-ignore
import { FindByTagsRequestBuilderRequestsMetadata, type FindByTagsRequestBuilder } from './findByTags/index.js';
// @ts-ignore
import { type WithPetItemRequestBuilder, WithPetItemRequestBuilderNavigationMetadata, WithPetItemRequestBuilderRequestsMetadata } from './item/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
/**
@ -22,52 +27,53 @@ export interface PetRequestBuilder extends BaseRequestBuilder<PetRequestBuilder>
/**
* Gets an item from the petstore.utilities.pet.item collection
* @param petId ID of pet to return
* @returns a WithPetItemRequestBuilder
* @returns {WithPetItemRequestBuilder}
*/
byPetId(petId: number) : WithPetItemRequestBuilder;
/**
* Add a new pet to the store
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of ArrayBuffer
* @returns {Promise<ArrayBuffer>}
*/
post(body: Pet, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ArrayBuffer | undefined>;
/**
* Update an existing pet
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of ArrayBuffer
* @returns {Promise<ArrayBuffer>}
*/
put(body: Pet, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ArrayBuffer | undefined>;
/**
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toPostRequestInformation(body: Pet, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/**
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toPutRequestInformation(body: Pet, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
* Uri template for the request builder.
*/
export const PetRequestBuilderUriTemplate = "{+baseurl}/pet";
/**
* Metadata for all the navigation properties in the request builder.
*/
export const PetRequestBuilderNavigationMetadata: Record<Exclude<keyof PetRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
byPetId: {
uriTemplate: WithPetItemRequestBuilderUriTemplate,
requestsMetadata: WithPetItemRequestBuilderRequestsMetadata,
navigationMetadata: WithPetItemRequestBuilderNavigationMetadata,
pathParametersMappings: ["petId"],
},
findByStatus: {
uriTemplate: FindByStatusRequestBuilderUriTemplate,
requestsMetadata: FindByStatusRequestBuilderRequestsMetadata,
},
findByTags: {
uriTemplate: FindByTagsRequestBuilderUriTemplate,
requestsMetadata: FindByTagsRequestBuilderRequestsMetadata,
},
};
@ -76,25 +82,23 @@ export const PetRequestBuilderNavigationMetadata: Record<Exclude<keyof PetReques
*/
export const PetRequestBuilderRequestsMetadata: RequestsMetadata = {
post: {
uriTemplate: PetRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendPrimitiveAsync",
adapterMethodName: "sendPrimitive",
responseBodyFactory: "ArrayBuffer",
requestBodyContentType: "application/json",
requestBodySerializer: serializePet,
requestInformationContentSetMethod: "setContentFromParsable",
},
put: {
uriTemplate: PetRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendPrimitiveAsync",
adapterMethodName: "sendPrimitive",
responseBodyFactory: "ArrayBuffer",
requestBodyContentType: "application/json",
requestBodySerializer: serializePet,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/**
* Uri template for the request builder.
*/
export const PetRequestBuilderUriTemplate = "{+baseurl}/pet";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,21 +1,24 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { createPetFromDiscriminatorValue, type Pet } from '../../models/';
import { type UploadImageRequestBuilder, UploadImageRequestBuilderRequestsMetadata, UploadImageRequestBuilderUriTemplate } from './uploadImage/';
// @ts-ignore
import { createPetFromDiscriminatorValue, type Pet } from '../../models/index.js';
// @ts-ignore
import { type UploadImageRequestBuilder, UploadImageRequestBuilderRequestsMetadata } from './uploadImage/index.js';
// @ts-ignore
import { type AdditionalDataHolder, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a WithPetPostRequestBody
* @returns {WithPetPostRequestBody}
*/
export function createWithPetPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoWithPetPostRequestBody;
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoWithPetPostRequestBody(withPetPostRequestBody: Partial<WithPetPostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
@ -43,37 +46,37 @@ export interface WithPetItemRequestBuilder extends BaseRequestBuilder<WithPetIte
/**
* Deletes a pet
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of ArrayBuffer
* @returns {Promise<ArrayBuffer>}
*/
delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ArrayBuffer | undefined>;
/**
* Returns a single pet
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Pet
* @returns {Promise<Pet>}
*/
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Pet | undefined>;
/**
* Updates a pet in the store with form data
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of ArrayBuffer
* @returns {Promise<ArrayBuffer>}
*/
post(body: WithPetPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ArrayBuffer | undefined>;
/**
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/**
* Returns a single pet
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/**
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toPostRequestInformation(body: WithPetPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
@ -91,12 +94,15 @@ export interface WithPetPostRequestBody extends AdditionalDataHolder, Parsable {
*/
status?: string;
}
/**
* Uri template for the request builder.
*/
export const WithPetItemRequestBuilderUriTemplate = "{+baseurl}/pet/{petId}";
/**
* Metadata for all the navigation properties in the request builder.
*/
export const WithPetItemRequestBuilderNavigationMetadata: Record<Exclude<keyof WithPetItemRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
uploadImage: {
uriTemplate: UploadImageRequestBuilderUriTemplate,
requestsMetadata: UploadImageRequestBuilderRequestsMetadata,
},
};
@ -105,27 +111,26 @@ export const WithPetItemRequestBuilderNavigationMetadata: Record<Exclude<keyof W
*/
export const WithPetItemRequestBuilderRequestsMetadata: RequestsMetadata = {
delete: {
uriTemplate: WithPetItemRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendPrimitiveAsync",
adapterMethodName: "sendPrimitive",
responseBodyFactory: "ArrayBuffer",
},
get: {
uriTemplate: WithPetItemRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendAsync",
adapterMethodName: "send",
responseBodyFactory: createPetFromDiscriminatorValue,
},
post: {
uriTemplate: WithPetItemRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendPrimitiveAsync",
adapterMethodName: "sendPrimitive",
responseBodyFactory: "ArrayBuffer",
requestBodyContentType: "application/x-www-form-urlencoded",
requestBodySerializer: serializeWithPetPostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/**
* Uri template for the request builder.
*/
export const WithPetItemRequestBuilderUriTemplate = "{+baseurl}/pet/{petId}";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,7 +1,9 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { createApiResponseFromDiscriminatorValue, type ApiResponse } from '../../../models/';
// @ts-ignore
import { createApiResponseFromDiscriminatorValue, type ApiResponse } from '../../../models/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
/**
@ -12,31 +14,32 @@ export interface UploadImageRequestBuilder extends BaseRequestBuilder<UploadImag
* uploads an image
* @param body Binary request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of ApiResponse
* @returns {Promise<ApiResponse>}
*/
post(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ApiResponse | undefined>;
/**
* @param body Binary request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toPostRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
* Uri template for the request builder.
*/
export const UploadImageRequestBuilderUriTemplate = "{+baseurl}/pet/{petId}/uploadImage";
/**
* Metadata for all the requests in the request builder.
*/
export const UploadImageRequestBuilderRequestsMetadata: RequestsMetadata = {
post: {
uriTemplate: UploadImageRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendAsync",
adapterMethodName: "send",
responseBodyFactory: createApiResponseFromDiscriminatorValue,
requestBodyContentType: "multipart/form-data",
requestInformationContentSetMethod: "setStreamContent",
},
};
/**
* Uri template for the request builder.
*/
export const UploadImageRequestBuilderUriTemplate = "{+baseurl}/pet/{petId}/uploadImage";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,8 +1,11 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { InventoryRequestBuilderRequestsMetadata, InventoryRequestBuilderUriTemplate, type InventoryRequestBuilder } from './inventory/';
import { OrderRequestBuilderNavigationMetadata, OrderRequestBuilderRequestsMetadata, OrderRequestBuilderUriTemplate, type OrderRequestBuilder } from './order/';
// @ts-ignore
import { InventoryRequestBuilderRequestsMetadata, type InventoryRequestBuilder } from './inventory/index.js';
// @ts-ignore
import { OrderRequestBuilderNavigationMetadata, OrderRequestBuilderRequestsMetadata, type OrderRequestBuilder } from './order/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions';
/**
@ -18,23 +21,21 @@ export interface StoreRequestBuilder extends BaseRequestBuilder<StoreRequestBuil
*/
get order(): OrderRequestBuilder;
}
/**
* Uri template for the request builder.
*/
export const StoreRequestBuilderUriTemplate = "{+baseurl}/store";
/**
* Metadata for all the navigation properties in the request builder.
*/
export const StoreRequestBuilderNavigationMetadata: Record<Exclude<keyof StoreRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
inventory: {
uriTemplate: InventoryRequestBuilderUriTemplate,
requestsMetadata: InventoryRequestBuilderRequestsMetadata,
},
order: {
uriTemplate: OrderRequestBuilderUriTemplate,
requestsMetadata: OrderRequestBuilderRequestsMetadata,
navigationMetadata: OrderRequestBuilderNavigationMetadata,
},
};
/**
* Uri template for the request builder.
*/
export const StoreRequestBuilderUriTemplate = "{+baseurl}/store";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,19 +1,20 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { type AdditionalDataHolder, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns a inventoryGetResponse
* @returns {InventoryGetResponse}
*/
export function createInventoryGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoInventoryGetResponse;
}
/**
* The deserialization information for the current model
* @returns a Record<string, (node: ParseNode) => void>
* @returns {Record<string, (node: ParseNode) => void>}
*/
export function deserializeIntoInventoryGetResponse(inventoryGetResponse: Partial<InventoryGetResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
@ -32,13 +33,13 @@ export interface InventoryRequestBuilder extends BaseRequestBuilder<InventoryReq
/**
* Returns a map of status codes to quantities
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of InventoryGetResponse
* @returns {Promise<InventoryGetResponse>}
*/
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<InventoryGetResponse | undefined>;
/**
* Returns a map of status codes to quantities
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
@ -49,19 +50,20 @@ export interface InventoryRequestBuilder extends BaseRequestBuilder<InventoryReq
export function serializeInventoryGetResponse(writer: SerializationWriter, inventoryGetResponse: Partial<InventoryGetResponse> | undefined = {}) : void {
writer.writeAdditionalData(inventoryGetResponse.additionalData);
}
/**
* Uri template for the request builder.
*/
export const InventoryRequestBuilderUriTemplate = "{+baseurl}/store/inventory";
/**
* Metadata for all the requests in the request builder.
*/
export const InventoryRequestBuilderRequestsMetadata: RequestsMetadata = {
get: {
uriTemplate: InventoryRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendAsync",
adapterMethodName: "send",
responseBodyFactory: createInventoryGetResponseFromDiscriminatorValue,
},
};
/**
* Uri template for the request builder.
*/
export const InventoryRequestBuilderUriTemplate = "{+baseurl}/store/inventory";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,8 +1,11 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { createOrderFromDiscriminatorValue, serializeOrder, type Order } from '../../models/';
import { type WithOrderItemRequestBuilder, WithOrderItemRequestBuilderRequestsMetadata, WithOrderItemRequestBuilderUriTemplate } from './item/';
// @ts-ignore
import { createOrderFromDiscriminatorValue, serializeOrder, type Order } from '../../models/index.js';
// @ts-ignore
import { type WithOrderItemRequestBuilder, WithOrderItemRequestBuilderRequestsMetadata } from './item/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
/**
@ -12,29 +15,32 @@ export interface OrderRequestBuilder extends BaseRequestBuilder<OrderRequestBuil
/**
* Gets an item from the petstore.utilities.store.order.item collection
* @param orderId ID of pet that needs to be fetched
* @returns a WithOrderItemRequestBuilder
* @returns {WithOrderItemRequestBuilder}
*/
byOrderId(orderId: number) : WithOrderItemRequestBuilder;
/**
* Place an order for a pet
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Order
* @returns {Promise<Order>}
*/
post(body: Order, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Order | undefined>;
/**
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toPostRequestInformation(body: Order, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
* Uri template for the request builder.
*/
export const OrderRequestBuilderUriTemplate = "{+baseurl}/store/order";
/**
* Metadata for all the navigation properties in the request builder.
*/
export const OrderRequestBuilderNavigationMetadata: Record<Exclude<keyof OrderRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
byOrderId: {
uriTemplate: WithOrderItemRequestBuilderUriTemplate,
requestsMetadata: WithOrderItemRequestBuilderRequestsMetadata,
pathParametersMappings: ["orderId"],
},
@ -44,17 +50,14 @@ export const OrderRequestBuilderNavigationMetadata: Record<Exclude<keyof OrderRe
*/
export const OrderRequestBuilderRequestsMetadata: RequestsMetadata = {
post: {
uriTemplate: OrderRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendAsync",
adapterMethodName: "send",
responseBodyFactory: createOrderFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeOrder,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/**
* Uri template for the request builder.
*/
export const OrderRequestBuilderUriTemplate = "{+baseurl}/store/order";
/* tslint:enable */
/* eslint-enable */

Просмотреть файл

@ -1,7 +1,9 @@
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
import { createOrderFromDiscriminatorValue, type Order } from '../../../models/';
// @ts-ignore
import { createOrderFromDiscriminatorValue, type Order } from '../../../models/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
/**
@ -11,46 +13,48 @@ export interface WithOrderItemRequestBuilder extends BaseRequestBuilder<WithOrde
/**
* For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of ArrayBuffer
* @returns {Promise<ArrayBuffer>}
*/
delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ArrayBuffer | undefined>;
/**
* For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Order
* @returns {Promise<Order>}
*/
get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Order | undefined>;
/**
* For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/**
* For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
* @returns {RequestInformation}
*/
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
* Uri template for the request builder.
*/
export const WithOrderItemRequestBuilderUriTemplate = "{+baseurl}/store/order/{orderId}";
/**
* Metadata for all the requests in the request builder.
*/
export const WithOrderItemRequestBuilderRequestsMetadata: RequestsMetadata = {
delete: {
uriTemplate: WithOrderItemRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendPrimitiveAsync",
adapterMethodName: "sendPrimitive",
responseBodyFactory: "ArrayBuffer",
},
get: {
uriTemplate: WithOrderItemRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "sendAsync",
adapterMethodName: "send",
responseBodyFactory: createOrderFromDiscriminatorValue,
},
};
/**
* Uri template for the request builder.
*/
export const WithOrderItemRequestBuilderUriTemplate = "{+baseurl}/store/order/{orderId}";
/* tslint:enable */
/* eslint-enable */

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше