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
121 changes: 121 additions & 0 deletions src/libs/ScaleAI/Generated/ScaleAI.AutoSDKHttpResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@

#nullable enable

namespace ScaleAI
{
/// <summary>
/// Represents a successful HTTP response with status code and headers.
/// </summary>
public partial class AutoSDKHttpResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers)
: this(
statusCode: statusCode,
headers: headers,
requestUri: null)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers,
global::System.Uri? requestUri)
{
StatusCode = statusCode;
Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers));
RequestUri = requestUri;
}

/// <summary>
/// Gets the HTTP status code.
/// </summary>
public global::System.Net.HttpStatusCode StatusCode { get; }
/// <summary>
/// Gets the response headers.
/// </summary>
public global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> Headers { get; }
/// <summary>
/// Gets the final request URI associated with the response.
/// </summary>
public global::System.Uri? RequestUri { get; }

internal static global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> CreateHeaders(
global::System.Net.Http.HttpResponseMessage response)
{
response = response ?? throw new global::System.ArgumentNullException(nameof(response));

var headers = global::System.Linq.Enumerable.ToDictionary(
response.Headers,
static header => header.Key,
static header => (global::System.Collections.Generic.IEnumerable<string>)global::System.Linq.Enumerable.ToArray(header.Value),
global::System.StringComparer.OrdinalIgnoreCase);

if (response.Content?.Headers == null)
{
return headers;
}

foreach (var header in response.Content.Headers)
{
if (headers.TryGetValue(header.Key, out var existingValues))
{
headers[header.Key] = global::System.Linq.Enumerable.ToArray(
global::System.Linq.Enumerable.Concat(existingValues, header.Value));
}
else
{
headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value);
}
}

return headers;
}
}

/// <summary>
/// Represents a successful HTTP response with status code, headers, and body.
/// </summary>
public partial class AutoSDKHttpResponse<T> : AutoSDKHttpResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse{T}"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers,
T body)
: this(
statusCode: statusCode,
headers: headers,
requestUri: null,
body: body)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="AutoSDKHttpResponse{T}"/> class.
/// </summary>
public AutoSDKHttpResponse(
global::System.Net.HttpStatusCode statusCode,
global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>> headers,
global::System.Uri? requestUri,
T body)
: base(statusCode, headers, requestUri)
{
Body = body;
}

/// <summary>
/// Gets the response body.
/// </summary>
public T Body { get; }
}
}
15 changes: 15 additions & 0 deletions src/libs/ScaleAI/Generated/ScaleAI.IScaleAIClient.AddTaskTags.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ public partial interface IScaleAIClient
global::System.Threading.Tasks.Task<global::ScaleAI.Task> AddTaskTagsAsync(
string taskId,

global::System.Collections.Generic.IList<string> request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Add tags to a task<br/>
/// Add tags to a task. Tags are used for organizing and filtering tasks.
/// </summary>
/// <param name="taskId"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Task>> AddTaskTagsAsResponseAsync(
string taskId,

global::System.Collections.Generic.IList<string> request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface IScaleAIClient
/// Assign teammates to projects<br/>
/// Assign team members to Studio projects.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<string>> AssignTeammatesAsResponseAsync(

global::ScaleAI.AssignTeamRequest request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Assign teammates to projects<br/>
/// Assign team members to Studio projects.
/// </summary>
/// <param name="emails">
/// Email addresses of teammates.
/// </param>
Expand Down
14 changes: 14 additions & 0 deletions src/libs/ScaleAI/Generated/ScaleAI.IScaleAIClient.CancelTask.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,19 @@ public partial interface IScaleAIClient
bool? clearUniqueId = default,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Cancel a task<br/>
/// Cancel a pending task. Completed tasks cannot be canceled.
/// </summary>
/// <param name="taskId"></param>
/// <param name="clearUniqueId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Task>> CancelTaskAsResponseAsync(
string taskId,
bool? clearUniqueId = default,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
13 changes: 13 additions & 0 deletions src/libs/ScaleAI/Generated/ScaleAI.IScaleAIClient.CreateBatch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface IScaleAIClient
/// Create a batch<br/>
/// Create a new batch within a project for grouping tasks.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Batch>> CreateBatchAsResponseAsync(

global::ScaleAI.CreateBatchRequest request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a batch<br/>
/// Create a new batch within a project for grouping tasks.
/// </summary>
/// <param name="project">
/// Project name to create this batch in.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface IScaleAIClient
/// Create a project<br/>
/// Create a new project for organizing tasks and batches.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Project>> CreateProjectAsResponseAsync(

global::ScaleAI.CreateProjectRequest request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a project<br/>
/// Create a new project for organizing tasks and batches.
/// </summary>
/// <param name="type">
/// Task type: imageannotation, textcollection, namedentityrecognition, etc.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ public partial interface IScaleAIClient
/// Create a new group within a Studio project.
/// </summary>
/// <param name="projectName"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<string>> CreateProjectGroupAsResponseAsync(
string projectName,

object request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a project group<br/>
/// Create a new group within a Studio project.
/// </summary>
/// <param name="projectName"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand Down
13 changes: 13 additions & 0 deletions src/libs/ScaleAI/Generated/ScaleAI.IScaleAIClient.CreateTask.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface IScaleAIClient
/// Create a task<br/>
/// Create a new labeling task. Each task represents an individual unit of work for a labeler.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Task>> CreateTaskAsResponseAsync(

global::ScaleAI.CreateTaskRequest request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a task<br/>
/// Create a new labeling task. Each task represents an individual unit of work for a labeler.
/// </summary>
/// <param name="project">
/// Project name to create this task in.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface IScaleAIClient
/// Create a text collection task<br/>
/// Create a GenAI text collection task for data collection, RLHF, or evaluation workflows.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Task>> CreateTextCollectionTaskAsResponseAsync(

global::ScaleAI.CreateTextCollectionTaskRequest request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a text collection task<br/>
/// Create a GenAI text collection task for data collection, RLHF, or evaluation workflows.
/// </summary>
/// <param name="project">
/// Project name.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ public partial interface IScaleAIClient
global::System.Threading.Tasks.Task<global::ScaleAI.Task> DeleteTaskTagsAsync(
string taskId,

global::System.Collections.Generic.IList<string> request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Remove tags from a task<br/>
/// Remove specific tags from a task.
/// </summary>
/// <param name="taskId"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Task>> DeleteTaskTagsAsResponseAsync(
string taskId,

global::System.Collections.Generic.IList<string> request,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,17 @@ public partial interface IScaleAIClient
string taskId,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Delete task unique_id<br/>
/// Remove the unique_id from a task.
/// </summary>
/// <param name="taskId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Task>> DeleteTaskUniqueIdAsResponseAsync(
string taskId,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,17 @@ public partial interface IScaleAIClient
string batchName,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Finalize a batch<br/>
/// Finalize a batch to indicate no more tasks will be added and begin processing.
/// </summary>
/// <param name="batchName"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Batch>> FinalizeBatchAsResponseAsync(
string batchName,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
12 changes: 12 additions & 0 deletions src/libs/ScaleAI/Generated/ScaleAI.IScaleAIClient.GetBatch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,17 @@ public partial interface IScaleAIClient
string batchName,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Retrieve a batch<br/>
/// Get details of a specific batch by name.
/// </summary>
/// <param name="batchName"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::ScaleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ScaleAI.AutoSDKHttpResponse<global::ScaleAI.Batch>> GetBatchAsResponseAsync(
string batchName,
global::ScaleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Loading