Skip to content

Commit

Permalink
feat: Added uuid format support as System.Guid.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Sep 10, 2024
1 parent de59cf9 commit 255949b
Show file tree
Hide file tree
Showing 1,178 changed files with 5,456 additions and 5,442 deletions.
6 changes: 4 additions & 2 deletions src/libs/AutoSDK/Models/TypeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public readonly record struct TypeData(
: CSharpTypeWithoutNullability;

public bool IsReferenceable =>
CSharpTypeWithoutNullability is "string" or "int" or "long" or "float" or "double" or "bool" ||
IsValueType ||
CSharpTypeWithoutNullability is "string" ||
IsAnyOf ||
IsEnum;

Expand Down Expand Up @@ -189,6 +190,7 @@ public static bool ContextIsValueType(SchemaContext context)
("string", "date") => true,
("string", "date-time") => true,
("string", "password") => true,
("string", "uuid") => true,

_ => false,
};
Expand Down Expand Up @@ -240,7 +242,7 @@ public static string GetCSharpType(SchemaContext context, SchemaContext? additio
// ("string", "period") => ("global::System.TimeSpan", false),
// ("string", "duration") => ("global::System.TimeSpan", false),
// ("string", "uri") => ("global::System.Uri", true),
// ("string", "uuid") => ("global::System.Guid", false),
("string", "uuid") => ("global::System.Guid", false),

(null, "url") => ("string", true),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public partial class LibraryManagementClient
{
partial void PrepareV1LibraryDeleteArguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId);
ref global::System.Guid fileId);
partial void PrepareV1LibraryDeleteRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId);
global::System.Guid fileId);
partial void ProcessV1LibraryDeleteResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -32,7 +32,7 @@ partial void ProcessV1LibraryDeleteResponseContent(
/// <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::G.FileDeleteResponse> V1LibraryDeleteAsync(
string fileId,
global::System.Guid fileId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public partial class LibraryManagementClient
{
partial void PrepareV1LibraryManagement2Arguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId);
ref global::System.Guid fileId);
partial void PrepareV1LibraryManagement2Request(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId);
global::System.Guid fileId);
partial void ProcessV1LibraryManagement2Response(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -37,7 +37,7 @@ partial void ProcessV1LibraryManagement2ResponseContent(
/// <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::G.FileResponse> V1LibraryManagement2Async(
string fileId,
global::System.Guid fileId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ public partial class LibraryManagementClient
{
partial void PrepareV1LibraryManagement3Arguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId,
ref global::System.Guid fileId,
global::G.FilesUpdateRequest request);
partial void PrepareV1LibraryManagement3Request(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId,
global::System.Guid fileId,
global::G.FilesUpdateRequest request);
partial void ProcessV1LibraryManagement3Response(
global::System.Net.Http.HttpClient httpClient,
Expand All @@ -40,7 +40,7 @@ partial void ProcessV1LibraryManagement3ResponseContent(
/// <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::G.V1LibraryManagementResponse> V1LibraryManagement3Async(
string fileId,
global::System.Guid fileId,
global::G.FilesUpdateRequest request,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand Down Expand Up @@ -133,7 +133,7 @@ partial void ProcessV1LibraryManagement3ResponseContent(
/// <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::G.V1LibraryManagementResponse> V1LibraryManagement3Async(
string fileId,
global::System.Guid fileId,
string? publicUrl = default,
global::System.Collections.Generic.IList<string>? labels = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed partial class FileResponse
/// The unique identifier of the file, generated by AI21.
/// </summary>
[global::Newtonsoft.Json.JsonProperty("fileId", Required = global::Newtonsoft.Json.Required.Always)]
public string FileId { get; set; } = default!;
public global::System.Guid FileId { get; set; } = default!;

/// <summary>
/// The name of the file. This is the local file name from when the file was<br/>
Expand Down Expand Up @@ -71,7 +71,7 @@ public sealed partial class FileResponse
/// An internal identifier of the user who uploaded the file.
/// </summary>
[global::Newtonsoft.Json.JsonProperty("createdBy", Required = global::Newtonsoft.Json.Required.Always)]
public string CreatedBy { get; set; } = default!;
public global::System.Guid CreatedBy { get; set; } = default!;

/// <summary>
/// The date when the file was uploaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public sealed partial class LibraryAnswerRequest
///
/// </summary>
[global::Newtonsoft.Json.JsonProperty("fileIds")]
public global::System.Collections.Generic.IList<string>? FileIds { get; set; }
public global::System.Collections.Generic.IList<global::System.Guid>? FileIds { get; set; }

/// <summary>
/// An enumeration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public sealed partial class LibrarySearchRequest
///
/// </summary>
[global::Newtonsoft.Json.JsonProperty("fileIds")]
public global::System.Collections.Generic.IList<string>? FileIds { get; set; }
public global::System.Collections.Generic.IList<global::System.Guid>? FileIds { get; set; }

/// <summary>
/// Default Value: default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ partial void ProcessV1LibraryAnswerResponseContent(
int maxSegments = default,
string? path = default,
global::System.Collections.Generic.IList<string>? labels = default,
global::System.Collections.Generic.IList<string>? fileIds = default,
global::System.Collections.Generic.IList<global::System.Guid>? fileIds = default,
global::G.AnswerLength? answerLength = default,
global::G.Mode? mode = default,
global::System.AllOf<global::G.RetrievalStrategy3?>? retrievalStrategy = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public partial class RAGEngineClient
{
partial void PrepareV1LibraryManagement4Arguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId);
ref global::System.Guid fileId);
partial void PrepareV1LibraryManagement4Request(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId);
global::System.Guid fileId);
partial void ProcessV1LibraryManagement4Response(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -29,7 +29,7 @@ partial void ProcessV1LibraryManagement4ResponseContent(
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<string> V1LibraryManagement4Async(
string fileId,
global::System.Guid fileId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ partial void ProcessV1LibrarySearchResponseContent(
int maxSegments = default,
string? path = default,
global::System.Collections.Generic.IList<string>? labels = default,
global::System.Collections.Generic.IList<string>? fileIds = default,
global::System.Collections.Generic.IList<global::System.Guid>? fileIds = default,
global::System.AllOf<global::G.RetrievalStrategy3?>? retrievalStrategy = default,
int maxNeighbors = 1,
double retrievalSimilarityThreshold = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public partial class LibraryManagementClient
{
partial void PrepareV1LibraryDeleteArguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId);
ref global::System.Guid fileId);
partial void PrepareV1LibraryDeleteRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId);
global::System.Guid fileId);
partial void ProcessV1LibraryDeleteResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -32,7 +32,7 @@ partial void ProcessV1LibraryDeleteResponseContent(
/// <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::G.FileDeleteResponse> V1LibraryDeleteAsync(
string fileId,
global::System.Guid fileId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public partial class LibraryManagementClient
{
partial void PrepareV1LibraryManagement2Arguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId);
ref global::System.Guid fileId);
partial void PrepareV1LibraryManagement2Request(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId);
global::System.Guid fileId);
partial void ProcessV1LibraryManagement2Response(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -37,7 +37,7 @@ partial void ProcessV1LibraryManagement2ResponseContent(
/// <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::G.FileResponse> V1LibraryManagement2Async(
string fileId,
global::System.Guid fileId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ public partial class LibraryManagementClient
{
partial void PrepareV1LibraryManagement3Arguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId,
ref global::System.Guid fileId,
global::G.FilesUpdateRequest request);
partial void PrepareV1LibraryManagement3Request(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId,
global::System.Guid fileId,
global::G.FilesUpdateRequest request);
partial void ProcessV1LibraryManagement3Response(
global::System.Net.Http.HttpClient httpClient,
Expand All @@ -40,7 +40,7 @@ partial void ProcessV1LibraryManagement3ResponseContent(
/// <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::G.V1LibraryManagementResponse> V1LibraryManagement3Async(
string fileId,
global::System.Guid fileId,
global::G.FilesUpdateRequest request,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand Down Expand Up @@ -133,7 +133,7 @@ partial void ProcessV1LibraryManagement3ResponseContent(
/// <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::G.V1LibraryManagementResponse> V1LibraryManagement3Async(
string fileId,
global::System.Guid fileId,
string? publicUrl = default,
global::System.Collections.Generic.IList<string>? labels = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed partial class FileResponse
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("fileId")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string FileId { get; set; }
public required global::System.Guid FileId { get; set; }

/// <summary>
/// The name of the file. This is the local file name from when the file was<br/>
Expand Down Expand Up @@ -76,7 +76,7 @@ public sealed partial class FileResponse
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("createdBy")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string CreatedBy { get; set; }
public required global::System.Guid CreatedBy { get; set; }

/// <summary>
/// The date when the file was uploaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public sealed partial class LibraryAnswerRequest
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("fileIds")]
public global::System.Collections.Generic.IList<string>? FileIds { get; set; }
public global::System.Collections.Generic.IList<global::System.Guid>? FileIds { get; set; }

/// <summary>
/// An enumeration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public sealed partial class LibrarySearchRequest
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("fileIds")]
public global::System.Collections.Generic.IList<string>? FileIds { get; set; }
public global::System.Collections.Generic.IList<global::System.Guid>? FileIds { get; set; }

/// <summary>
/// Default Value: default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ partial void ProcessV1LibraryAnswerResponseContent(
int maxSegments = default,
string? path = default,
global::System.Collections.Generic.IList<string>? labels = default,
global::System.Collections.Generic.IList<string>? fileIds = default,
global::System.Collections.Generic.IList<global::System.Guid>? fileIds = default,
global::G.AnswerLength? answerLength = default,
global::G.Mode? mode = default,
global::System.AllOf<global::G.RetrievalStrategy3?>? retrievalStrategy = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public partial class RAGEngineClient
{
partial void PrepareV1LibraryManagement4Arguments(
global::System.Net.Http.HttpClient httpClient,
ref string fileId);
ref global::System.Guid fileId);
partial void PrepareV1LibraryManagement4Request(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string fileId);
global::System.Guid fileId);
partial void ProcessV1LibraryManagement4Response(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -29,7 +29,7 @@ partial void ProcessV1LibraryManagement4ResponseContent(
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<string> V1LibraryManagement4Async(
string fileId,
global::System.Guid fileId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ partial void ProcessV1LibrarySearchResponseContent(
int maxSegments = default,
string? path = default,
global::System.Collections.Generic.IList<string>? labels = default,
global::System.Collections.Generic.IList<string>? fileIds = default,
global::System.Collections.Generic.IList<global::System.Guid>? fileIds = default,
global::System.AllOf<global::G.RetrievalStrategy3?>? retrievalStrategy = default,
int maxNeighbors = 1,
double retrievalSimilarityThreshold = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class LemurBaseParams
/// Use either transcript_ids or input_text as input into LeMUR.
/// </summary>
[global::Newtonsoft.Json.JsonProperty("transcript_ids")]
public global::System.Collections.Generic.IList<string>? TranscriptIds { get; set; }
public global::System.Collections.Generic.IList<global::System.Guid>? TranscriptIds { get; set; }

/// <summary>
/// Custom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed partial class LemurBaseResponse
/// The ID of the LeMUR request
/// </summary>
[global::Newtonsoft.Json.JsonProperty("request_id", Required = global::Newtonsoft.Json.Required.Always)]
public string RequestId { get; set; } = default!;
public global::System.Guid RequestId { get; set; } = default!;

/// <summary>
/// The usage numbers for the LeMUR request
Expand Down
Loading

0 comments on commit 255949b

Please sign in to comment.