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 @@ -139,7 +139,7 @@ partial void ProcessAddTaskTagsResponseContent(
PrepareAddTaskTagsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId,
taskId: taskId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ partial void ProcessCancelTaskResponseContent(
PrepareCancelTaskRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId,
taskId: taskId!,
clearUniqueId: clearUniqueId);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessCreateProjectGroupResponseContent(
PrepareCreateProjectGroupRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
projectName: projectName,
projectName: projectName!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessDeleteTaskTagsResponseContent(
PrepareDeleteTaskTagsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId,
taskId: taskId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessDeleteTaskUniqueIdResponseContent(
PrepareDeleteTaskUniqueIdRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId);
taskId: taskId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessFinalizeBatchResponseContent(
PrepareFinalizeBatchRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
batchName: batchName);
batchName: batchName!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetBatchResponseContent(
PrepareGetBatchRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
batchName: batchName);
batchName: batchName!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetBatchStatusResponseContent(
PrepareGetBatchStatusRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
batchName: batchName);
batchName: batchName!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetProjectResponseContent(
PrepareGetProjectRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
projectName: projectName);
projectName: projectName!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetTaskResponseContent(
PrepareGetTaskRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId);
taskId: taskId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessListProjectGroupsResponseContent(
PrepareListProjectGroupsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
projectName: projectName);
projectName: projectName!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessPrioritizeBatchResponseContent(
PreparePrioritizeBatchRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
batchName: batchName,
batchName: batchName!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessSetTaskMetadataResponseContent(
PrepareSetTaskMetadataRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId,
taskId: taskId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessUpdateProjectParamsResponseContent(
PrepareUpdateProjectParamsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
projectName: projectName,
projectName: projectName!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessUpdateTaskUniqueIdResponseContent(
PrepareUpdateTaskUniqueIdRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId,
taskId: taskId!,
request: request);

return __httpRequest;
Expand Down
36 changes: 32 additions & 4 deletions src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UploadFile.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,34 @@ partial void ProcessUploadFileResponseContent(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty<byte>());
__contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Filename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentFile,
name: "\"file\"",
Expand All @@ -131,28 +159,28 @@ partial void ProcessUploadFileResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.DisplayName}"),
content: new global::System.Net.Http.StringContent(request.DisplayName ?? string.Empty),
name: "\"display_name\"");
}
if (request.ProjectName != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ProjectName}"),
content: new global::System.Net.Http.StringContent(request.ProjectName ?? string.Empty),
name: "\"project_name\"");
}
if (request.ReferenceId != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ReferenceId}"),
content: new global::System.Net.Http.StringContent(request.ReferenceId ?? string.Empty),
name: "\"reference_id\"");
}
if (request.Metadata != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Metadata}"),
content: new global::System.Net.Http.StringContent(request.Metadata ?? string.Empty),
name: "\"metadata\"");
}
__httpRequest.Content = __httpRequestContent;
Expand Down