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
@@ -0,0 +1,53 @@
#nullable enable

namespace V0.JsonConverters
{
/// <inheritdoc />
public sealed class ChatsFindResponseDataItemLatestVersionStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::V0.ChatsFindResponseDataItemLatestVersionStatus>
{
/// <inheritdoc />
public override global::V0.ChatsFindResponseDataItemLatestVersionStatus 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::V0.ChatsFindResponseDataItemLatestVersionStatusExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

namespace V0.JsonConverters
{
/// <inheritdoc />
public sealed class ChatsFindResponseDataItemLatestVersionStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::V0.ChatsFindResponseDataItemLatestVersionStatus?>
{
/// <inheritdoc />
public override global::V0.ChatsFindResponseDataItemLatestVersionStatus? 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::V0.ChatsFindResponseDataItemLatestVersionStatusExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::V0.ChatsFindResponseDataItemLatestVersionStatus? 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::V0.ChatsFindResponseDataItemLatestVersionStatusExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace V0.JsonConverters
{
/// <inheritdoc />
public sealed class ChatsFindResponseDataItemPrivacyJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::V0.ChatsFindResponseDataItemPrivacy>
{
/// <inheritdoc />
public override global::V0.ChatsFindResponseDataItemPrivacy 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::V0.ChatsFindResponseDataItemPrivacyExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

namespace V0.JsonConverters
{
/// <inheritdoc />
public sealed class ChatsFindResponseDataItemPrivacyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::V0.ChatsFindResponseDataItemPrivacy?>
{
/// <inheritdoc />
public override global::V0.ChatsFindResponseDataItemPrivacy? 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::V0.ChatsFindResponseDataItemPrivacyExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::V0.ChatsFindResponseDataItemPrivacy? 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::V0.ChatsFindResponseDataItemPrivacyExtensions.ToValueString(value.Value));
}
}
}
}
16 changes: 14 additions & 2 deletions src/libs/V0/Generated/V0.JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ namespace V0

typeof(global::V0.JsonConverters.ProjectsGetEnvVarDecryptedNullableJsonConverter),

typeof(global::V0.JsonConverters.ChatsFindResponseDataItemPrivacyJsonConverter),

typeof(global::V0.JsonConverters.ChatsFindResponseDataItemPrivacyNullableJsonConverter),

typeof(global::V0.JsonConverters.ChatsFindResponseDataItemLatestVersionStatusJsonConverter),

typeof(global::V0.JsonConverters.ChatsFindResponseDataItemLatestVersionStatusNullableJsonConverter),

typeof(global::V0.JsonConverters.DeploymentsFindLogsResponseLogTypeJsonConverter),

typeof(global::V0.JsonConverters.DeploymentsFindLogsResponseLogTypeNullableJsonConverter),
Expand Down Expand Up @@ -567,7 +575,11 @@ namespace V0
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ProjectsGetEnvVarDecrypted), TypeInfoPropertyName = "ProjectsGetEnvVarDecrypted2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(int))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFindResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::V0.ChatSummary>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::V0.ChatsFindResponseDataItem>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFindResponseDataItem))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFindResponseDataItemPrivacy), TypeInfoPropertyName = "ChatsFindResponseDataItemPrivacy2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFindResponseDataItemLatestVersion))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFindResponseDataItemLatestVersionStatus), TypeInfoPropertyName = "ChatsFindResponseDataItemLatestVersionStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsDeleteResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFavoriteResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFindMessagesResponse))]
Expand Down Expand Up @@ -695,7 +707,7 @@ namespace V0
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.ProjectsCreateRequestEnvironmentVariable>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.ProjectsCreateEnvVarsRequestEnvironmentVariable>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.ProjectsUpdateEnvVarsRequestEnvironmentVariable>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.ChatSummary>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.ChatsFindResponseDataItem>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.MessageSummary>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.VersionSummary>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::V0.DeploymentDetail>))]
Expand Down
Loading