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
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ partial void ProcessCallControllerCreateResponseContent(
/// <summary>
/// Create Call
/// </summary>
/// <param name="transport">
/// This is the transport of the call.
/// </param>
/// <param name="customers">
/// This is used to issue batch calls to multiple customers.<br/>
/// Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead.
Expand All @@ -444,9 +447,6 @@ partial void ProcessCallControllerCreateResponseContent(
/// <param name="schedulePlan">
/// This is the schedule plan of the call.
/// </param>
/// <param name="transport">
/// This is the transport of the call.
/// </param>
/// <param name="assistantId">
/// This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.<br/>
/// To start a call with:<br/>
Expand Down Expand Up @@ -519,10 +519,10 @@ partial void ProcessCallControllerCreateResponseContent(
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Vapi.OneOf<global::Vapi.Call, global::Vapi.CallBatchResponse>> CallControllerCreateAsync(
global::Vapi.OneOf<global::Vapi.VapiWebsocketTransport, global::Vapi.VonageTransport, global::Vapi.TwilioTransport, global::Vapi.VapiSipTransport, global::Vapi.TelnyxTransport, global::Vapi.VapiWebCallTransport>? transport = default,
global::System.Collections.Generic.IList<global::Vapi.CreateCustomerDTO>? customers = default,
string? name = default,
global::Vapi.SchedulePlan? schedulePlan = default,
object? transport = default,
string? assistantId = default,
global::Vapi.CreateAssistantDTO? assistant = default,
global::Vapi.AssistantOverrides? assistantOverrides = default,
Expand All @@ -541,10 +541,10 @@ partial void ProcessCallControllerCreateResponseContent(
{
var __request = new global::Vapi.CreateCallDTO
{
Transport = transport,
Customers = customers,
Name = name,
SchedulePlan = schedulePlan,
Transport = transport,
AssistantId = assistantId,
Assistant = assistant,
AssistantOverrides = assistantOverrides,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public partial interface ICallsClient
/// <summary>
/// Create Call
/// </summary>
/// <param name="transport">
/// This is the transport of the call.
/// </param>
/// <param name="customers">
/// This is used to issue batch calls to multiple customers.<br/>
/// Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead.
Expand All @@ -41,9 +44,6 @@ public partial interface ICallsClient
/// <param name="schedulePlan">
/// This is the schedule plan of the call.
/// </param>
/// <param name="transport">
/// This is the transport of the call.
/// </param>
/// <param name="assistantId">
/// This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.<br/>
/// To start a call with:<br/>
Expand Down Expand Up @@ -116,10 +116,10 @@ public partial interface ICallsClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Vapi.OneOf<global::Vapi.Call, global::Vapi.CallBatchResponse>> CallControllerCreateAsync(
global::Vapi.OneOf<global::Vapi.VapiWebsocketTransport, global::Vapi.VonageTransport, global::Vapi.TwilioTransport, global::Vapi.VapiSipTransport, global::Vapi.TelnyxTransport, global::Vapi.VapiWebCallTransport>? transport = default,
global::System.Collections.Generic.IList<global::Vapi.CreateCustomerDTO>? customers = default,
string? name = default,
global::Vapi.SchedulePlan? schedulePlan = default,
object? transport = default,
string? assistantId = default,
global::Vapi.CreateAssistantDTO? assistant = default,
global::Vapi.AssistantOverrides? assistantOverrides = 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 AudioFormatContainerJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.AudioFormatContainer>
{
/// <inheritdoc />
public override global::Vapi.AudioFormatContainer 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.AudioFormatContainerExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

writer.WriteStringValue(global::Vapi.AudioFormatContainerExtensions.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 AudioFormatContainerNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.AudioFormatContainer?>
{
/// <inheritdoc />
public override global::Vapi.AudioFormatContainer? 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.AudioFormatContainerExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vapi.AudioFormatContainer? 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.AudioFormatContainerExtensions.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 BooleanComparatorScorecardMetricConditionComparatorJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.BooleanComparatorScorecardMetricConditionComparator>
{
/// <inheritdoc />
public override global::Vapi.BooleanComparatorScorecardMetricConditionComparator 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.BooleanComparatorScorecardMetricConditionComparatorExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

writer.WriteStringValue(global::Vapi.BooleanComparatorScorecardMetricConditionComparatorExtensions.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 BooleanComparatorScorecardMetricConditionComparatorNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.BooleanComparatorScorecardMetricConditionComparator?>
{
/// <inheritdoc />
public override global::Vapi.BooleanComparatorScorecardMetricConditionComparator? 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.BooleanComparatorScorecardMetricConditionComparatorExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vapi.BooleanComparatorScorecardMetricConditionComparator? 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.BooleanComparatorScorecardMetricConditionComparatorExtensions.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 BooleanComparatorScorecardMetricConditionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.BooleanComparatorScorecardMetricConditionType>
{
/// <inheritdoc />
public override global::Vapi.BooleanComparatorScorecardMetricConditionType 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.BooleanComparatorScorecardMetricConditionTypeExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

writer.WriteStringValue(global::Vapi.BooleanComparatorScorecardMetricConditionTypeExtensions.ToValueString(value));
}
}
}
Loading