generated from tryAGI/SdkTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from tryAGI/bot/update-openapi_202411281234
feat:@coderabbitai
- Loading branch information
Showing
16 changed files
with
1,067 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
src/libs/Instill/Generated/Instill.Models.Citation.Json.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
52
src/libs/Instill/Generated/Instill.Models.CitationsType.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}; | ||
} | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
src/libs/Instill/Generated/Instill.Models.LookUpConnectionAdminResponse.Json.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
Oops, something went wrong.