Skip to content

Commit

Permalink
Merge pull request #58 from tryAGI/bot/update-openapi_202411281234
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 28, 2024
2 parents bfc1e74 + e6bc0a9 commit 9e3c74f
Show file tree
Hide file tree
Showing 16 changed files with 1,067 additions and 350 deletions.
18 changes: 9 additions & 9 deletions src/libs/Instill/Generated/Instill.Models.AppV1alphaMessage.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ public sealed partial class AppV1alphaMessage
/// <summary>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("chunks")]
public global::System.Collections.Generic.IList<global::Instill.Chunk>? Chunks { get; set; }
[global::System.Text.Json.Serialization.JsonPropertyName("standaloneQuestion")]
public string? StandaloneQuestion { get; set; }

/// <summary>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("standaloneQuestion")]
public string? StandaloneQuestion { get; set; }
[global::System.Text.Json.Serialization.JsonPropertyName("citations")]
public global::System.Collections.Generic.IList<global::Instill.Citation>? Citations { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down Expand Up @@ -107,10 +107,10 @@ public sealed partial class AppV1alphaMessage
/// <param name="msgSenderUid">
/// Included only in responses
/// </param>
/// <param name="chunks">
/// <param name="standaloneQuestion">
/// Included only in responses
/// </param>
/// <param name="standaloneQuestion">
/// <param name="citations">
/// Included only in responses
/// </param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
Expand All @@ -124,8 +124,8 @@ public AppV1alphaMessage(
global::System.DateTime? createTime,
global::System.DateTime? updateTime,
string? msgSenderUid,
global::System.Collections.Generic.IList<global::Instill.Chunk>? chunks,
string? standaloneQuestion)
string? standaloneQuestion,
global::System.Collections.Generic.IList<global::Instill.Citation>? citations)
{
this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content));
this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role));
Expand All @@ -136,8 +136,8 @@ public AppV1alphaMessage(
this.CreateTime = createTime;
this.UpdateTime = updateTime;
this.MsgSenderUid = msgSenderUid;
this.Chunks = chunks;
this.StandaloneQuestion = standaloneQuestion;
this.Citations = citations;
}

/// <summary>
Expand Down
92 changes: 92 additions & 0 deletions src/libs/Instill/Generated/Instill.Models.Citation.Json.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace Instill
{
public sealed partial class Citation
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::Instill.Citation? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Instill.Citation),
jsonSerializerContext) as global::Instill.Citation;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::Instill.Citation? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Instill.Citation>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Instill.Citation?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Instill.Citation),
jsonSerializerContext).ConfigureAwait(false)) as global::Instill.Citation;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Instill.Citation?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Instill.Citation?>(
jsonStream,
jsonSerializerOptions);
}
}
}
86 changes: 86 additions & 0 deletions src/libs/Instill/Generated/Instill.Models.Citation.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

#nullable enable

namespace Instill
{
/// <summary>
///
/// </summary>
public sealed partial class Citation
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Instill.JsonConverters.CitationsTypeJsonConverter))]
public global::Instill.CitationsType? Type { get; set; }

/// <summary>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("name")]
public string? Name { get; set; }

/// <summary>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("url")]
public string? Url { get; set; }

/// <summary>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("chunkUid")]
public string? ChunkUid { get; set; }

/// <summary>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("fileUid")]
public string? FileUid { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="Citation" /> class.
/// </summary>
/// <param name="type"></param>
/// <param name="name">
/// Included only in responses
/// </param>
/// <param name="url">
/// Included only in responses
/// </param>
/// <param name="chunkUid">
/// Included only in responses
/// </param>
/// <param name="fileUid">
/// Included only in responses
/// </param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public Citation(
global::Instill.CitationsType? type,
string? name,
string? url,
string? chunkUid,
string? fileUid)
{
this.Type = type;
this.Name = name;
this.Url = url;
this.ChunkUid = chunkUid;
this.FileUid = fileUid;
}

/// <summary>
/// Initializes a new instance of the <see cref="Citation" /> class.
/// </summary>
public Citation()
{
}
}
}
52 changes: 52 additions & 0 deletions src/libs/Instill/Generated/Instill.Models.CitationsType.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

#nullable enable

namespace Instill
{
/// <summary>
/// - CITATIONS_TYPE_CHUNK: Chunk-based citation<br/>
/// - CITATIONS_TYPE_URL: URL-based citation
/// </summary>
public enum CitationsType
{
/// <summary>
/// Chunk-based citation
/// </summary>
CHUNK,
/// <summary>
/// URL-based citation
/// </summary>
URL,
}

/// <summary>
/// Enum extensions to do fast conversions without the reflection.
/// </summary>
public static class CitationsTypeExtensions
{
/// <summary>
/// Converts an enum to a string.
/// </summary>
public static string ToValueString(this CitationsType value)
{
return value switch
{
CitationsType.CHUNK => "CITATIONS_TYPE_CHUNK",
CitationsType.URL => "CITATIONS_TYPE_URL",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
/// <summary>
/// Converts an string to a enum.
/// </summary>
public static CitationsType? ToEnum(string value)
{
return value switch
{
"CITATIONS_TYPE_CHUNK" => CitationsType.CHUNK,
"CITATIONS_TYPE_URL" => CitationsType.URL,
_ => null,
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace Instill
{
public sealed partial class LookUpConnectionAdminResponse
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::Instill.LookUpConnectionAdminResponse? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Instill.LookUpConnectionAdminResponse),
jsonSerializerContext) as global::Instill.LookUpConnectionAdminResponse;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::Instill.LookUpConnectionAdminResponse? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Instill.LookUpConnectionAdminResponse>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Instill.LookUpConnectionAdminResponse?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Instill.LookUpConnectionAdminResponse),
jsonSerializerContext).ConfigureAwait(false)) as global::Instill.LookUpConnectionAdminResponse;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Instill.LookUpConnectionAdminResponse?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Instill.LookUpConnectionAdminResponse?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Loading

0 comments on commit 9e3c74f

Please sign in to comment.