Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/libs/Vapi/Generated/Vapi.Files.JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ namespace Vapi
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.FileStatus), TypeInfoPropertyName = "FileStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.UpdateFileDTO))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Vapi.File>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.FileControllerFindAllPurpose), TypeInfoPropertyName = "FileControllerFindAllPurpose2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid?))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.CreateFileDTOPurpose?), TypeInfoPropertyName = "NullableCreateFileDTOPurpose2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.FileObject?), TypeInfoPropertyName = "NullableFileObject2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.FileStatus?), TypeInfoPropertyName = "NullableFileStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.FileControllerFindAllPurpose?), TypeInfoPropertyName = "NullableFileControllerFindAllPurpose2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Vapi.File>))]
internal sealed partial class FilesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext
{
Expand Down Expand Up @@ -121,7 +123,11 @@ public override bool CanConvert(global::System.Type typeToConvert)

|| typeToConvert == typeof(global::Vapi.FileStatus)

|| typeToConvert == typeof(global::Vapi.FileStatus?);
|| typeToConvert == typeof(global::Vapi.FileStatus?)

|| typeToConvert == typeof(global::Vapi.FileControllerFindAllPurpose)

|| typeToConvert == typeof(global::Vapi.FileControllerFindAllPurpose?);
}

public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(
Expand Down Expand Up @@ -157,6 +163,16 @@ public override bool CanConvert(global::System.Type typeToConvert)
{
return new global::Vapi.JsonConverters.FileStatusNullableJsonConverter();
}

if (typeToConvert == typeof(global::Vapi.FileControllerFindAllPurpose))
{
return new global::Vapi.JsonConverters.FileControllerFindAllPurposeJsonConverter();
}

if (typeToConvert == typeof(global::Vapi.FileControllerFindAllPurpose?))
{
return new global::Vapi.JsonConverters.FileControllerFindAllPurposeNullableJsonConverter();
}
throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public partial class FilesClient
};
partial void PrepareFileControllerFindAllArguments(
global::System.Net.Http.HttpClient httpClient,
ref string purpose);
ref global::Vapi.FileControllerFindAllPurpose? purpose);
partial void PrepareFileControllerFindAllRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string purpose);
global::Vapi.FileControllerFindAllPurpose? purpose);
partial void ProcessFileControllerFindAllResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -49,7 +49,7 @@ partial void ProcessFileControllerFindAllResponseContent(
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vapi.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::Vapi.File>> FileControllerFindAllAsync(
string purpose,
global::Vapi.FileControllerFindAllPurpose? purpose = default,
global::Vapi.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -69,7 +69,7 @@ partial void ProcessFileControllerFindAllResponseContent(
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vapi.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Vapi.AutoSDKHttpResponse<global::System.Collections.Generic.IList<global::Vapi.File>>> FileControllerFindAllAsResponseAsync(
string purpose,
global::Vapi.FileControllerFindAllPurpose? purpose = default,
global::Vapi.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand Down Expand Up @@ -106,7 +106,7 @@ partial void ProcessFileControllerFindAllResponseContent(
path: "/file",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddRequiredParameter("purpose", purpose)
.AddOptionalParameter("purpose", purpose?.ToValueString())
;
var __path = __pathBuilder.ToString();
__path = global::Vapi.AutoSDKRequestOptionsSupport.AppendQueryParameters(
Expand Down Expand Up @@ -148,7 +148,7 @@ partial void ProcessFileControllerFindAllResponseContent(
PrepareFileControllerFindAllRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
purpose: purpose!);
purpose: purpose);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial interface IFilesClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vapi.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::Vapi.File>> FileControllerFindAllAsync(
string purpose,
global::Vapi.FileControllerFindAllPurpose? purpose = default,
global::Vapi.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
Expand All @@ -23,7 +23,7 @@ public partial interface IFilesClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vapi.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vapi.AutoSDKHttpResponse<global::System.Collections.Generic.IList<global::Vapi.File>>> FileControllerFindAllAsResponseAsync(
string purpose,
global::Vapi.FileControllerFindAllPurpose? purpose = default,
global::Vapi.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Vapi.JsonConverters
{
/// <inheritdoc />
public sealed class FileControllerFindAllPurposeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.FileControllerFindAllPurpose>
{
/// <inheritdoc />
public override global::Vapi.FileControllerFindAllPurpose Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vapi.FileControllerFindAllPurposeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vapi.FileControllerFindAllPurpose)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vapi.FileControllerFindAllPurpose);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vapi.FileControllerFindAllPurpose value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Vapi.FileControllerFindAllPurposeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Vapi.JsonConverters
{
/// <inheritdoc />
public sealed class FileControllerFindAllPurposeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.FileControllerFindAllPurpose?>
{
/// <inheritdoc />
public override global::Vapi.FileControllerFindAllPurpose? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vapi.FileControllerFindAllPurposeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vapi.FileControllerFindAllPurpose)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vapi.FileControllerFindAllPurpose?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vapi.FileControllerFindAllPurpose? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::Vapi.FileControllerFindAllPurposeExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Vapi.JsonConverters
{
/// <inheritdoc />
public sealed class SubscriptionBillingCollectionMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.SubscriptionBillingCollectionMethod>
{
/// <inheritdoc />
public override global::Vapi.SubscriptionBillingCollectionMethod Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vapi.SubscriptionBillingCollectionMethodExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vapi.SubscriptionBillingCollectionMethod)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vapi.SubscriptionBillingCollectionMethod);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vapi.SubscriptionBillingCollectionMethod value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Vapi.SubscriptionBillingCollectionMethodExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Vapi.JsonConverters
{
/// <inheritdoc />
public sealed class SubscriptionBillingCollectionMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.SubscriptionBillingCollectionMethod?>
{
/// <inheritdoc />
public override global::Vapi.SubscriptionBillingCollectionMethod? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vapi.SubscriptionBillingCollectionMethodExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vapi.SubscriptionBillingCollectionMethod)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vapi.SubscriptionBillingCollectionMethod?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vapi.SubscriptionBillingCollectionMethod? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::Vapi.SubscriptionBillingCollectionMethodExtensions.ToValueString(value.Value));
}
}
}
}
Loading
Loading