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 @@ -21,13 +21,6 @@ public class CreateSoundEffectRequestJsonConverter : global::System.Text.Json.Se
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Runway.CreateSoundEffectRequestDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);

global::Runway.CreateSoundEffectRequestSeedAudio? seedAudio = default;
if (discriminator?.Model == global::Runway.CreateSoundEffectRequestDiscriminatorModel.SeedAudio)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Runway.CreateSoundEffectRequestSeedAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Runway.CreateSoundEffectRequestSeedAudio> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Runway.CreateSoundEffectRequestSeedAudio)}");
seedAudio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Runway.CreateSoundEffectRequestElevenTextToSoundV2? elevenTextToSoundV2 = default;
if (discriminator?.Model == global::Runway.CreateSoundEffectRequestDiscriminatorModel.ElevenTextToSoundV2)
{
Expand All @@ -38,8 +31,6 @@ public class CreateSoundEffectRequestJsonConverter : global::System.Text.Json.Se

var __value = new global::Runway.CreateSoundEffectRequest(
discriminator?.Model,
seedAudio,

elevenTextToSoundV2
);

Expand All @@ -55,13 +46,7 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsSeedAudio)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Runway.CreateSoundEffectRequestSeedAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Runway.CreateSoundEffectRequestSeedAudio?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Runway.CreateSoundEffectRequestSeedAudio).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.SeedAudio!, typeInfo);
}
else if (value.IsElevenTextToSoundV2)
if (value.IsElevenTextToSoundV2)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Runway.CreateSoundEffectRequestElevenTextToSoundV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Runway.CreateSoundEffectRequestElevenTextToSoundV2?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Runway.CreateSoundEffectRequestElevenTextToSoundV2).Name}");
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ public class CreateTextToSpeechRequestJsonConverter : global::System.Text.Json.S
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Runway.CreateTextToSpeechRequestDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);

global::Runway.CreateTextToSpeechRequestSeedAudio? seedAudio = default;
if (discriminator?.Model == global::Runway.CreateTextToSpeechRequestDiscriminatorModel.SeedAudio)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Runway.CreateTextToSpeechRequestSeedAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Runway.CreateTextToSpeechRequestSeedAudio> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Runway.CreateTextToSpeechRequestSeedAudio)}");
seedAudio = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Runway.CreateTextToSpeechRequestElevenMultilingualV2? elevenMultilingualV2 = default;
if (discriminator?.Model == global::Runway.CreateTextToSpeechRequestDiscriminatorModel.ElevenMultilingualV2)
{
Expand All @@ -38,8 +31,6 @@ public class CreateTextToSpeechRequestJsonConverter : global::System.Text.Json.S

var __value = new global::Runway.CreateTextToSpeechRequest(
discriminator?.Model,
seedAudio,

elevenMultilingualV2
);

Expand All @@ -55,13 +46,7 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsSeedAudio)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Runway.CreateTextToSpeechRequestSeedAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Runway.CreateTextToSpeechRequestSeedAudio?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Runway.CreateTextToSpeechRequestSeedAudio).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.SeedAudio!, typeInfo);
}
else if (value.IsElevenMultilingualV2)
if (value.IsElevenMultilingualV2)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Runway.CreateTextToSpeechRequestElevenMultilingualV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Runway.CreateTextToSpeechRequestElevenMultilingualV2?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Runway.CreateTextToSpeechRequestElevenMultilingualV2).Name}");
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading