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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions src/libs/NightfallAI/Generated/NightfallAI.FileScanningClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public sealed partial class FileScanningClient : global::NightfallAI.IFileScanni
#if DEBUG
= true;
#endif

/// <inheritdoc/>
public global::NightfallAI.AutoSDKClientOptions Options { get; }
/// <summary>
///
/// </summary>
Expand All @@ -50,11 +53,37 @@ public FileScanningClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::NightfallAI.EndPointAuthorization>? authorizations = null,
bool disposeHttpClient = true) : this(
httpClient,
baseUri,
authorizations,
options: null,
disposeHttpClient: disposeHttpClient)
{
}

/// <summary>
/// Creates a new instance of the FileScanningClient.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
/// <param name="httpClient">The HttpClient instance. If not provided, a new one will be created.</param>
/// <param name="baseUri">The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.</param>
/// <param name="authorizations">The authorizations to use for the requests.</param>
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public FileScanningClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::NightfallAI.EndPointAuthorization>? authorizations = null,
global::NightfallAI.AutoSDKClientOptions? options = null,
bool disposeHttpClient = true)
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::NightfallAI.EndPointAuthorization>();
Options = options ?? new global::NightfallAI.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;

Initialized(HttpClient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ public partial interface IFileScanningClient
/// Marks a file upload session as complete after all chunks have been uploaded.
/// </summary>
/// <param name="fileId"></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::NightfallAI.ApiException"></exception>
global::System.Threading.Tasks.Task CompleteFileUploadAsync(
global::System.Guid fileId,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,26 @@ public partial interface IFileScanningClient
/// Returns an upload ID, chunk size, and other metadata needed to upload file chunks.
/// </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::NightfallAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::NightfallAI.InitFileUploadResponse> InitFileUploadAsync(

global::NightfallAI.InitFileUploadRequest request,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Initialize a file upload session<br/>
/// Initializes a file upload session for asynchronous file scanning.<br/>
/// Returns an upload ID, chunk size, and other metadata needed to upload file chunks.
/// </summary>
/// <param name="fileSizeBytes"></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>
global::System.Threading.Tasks.Task<global::NightfallAI.InitFileUploadResponse> InitFileUploadAsync(
long fileSizeBytes,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ public partial interface IFileScanningClient
/// </summary>
/// <param name="fileId"></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::NightfallAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::NightfallAI.ScanFileResponse> ScanUploadedFileAsync(
global::System.Guid fileId,

global::NightfallAI.ScanFileRequest request,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Scan an uploaded file<br/>
Expand All @@ -27,13 +29,15 @@ public partial interface IFileScanningClient
/// <param name="policyUUID"></param>
/// <param name="policy"></param>
/// <param name="requestMetadata"></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>
global::System.Threading.Tasks.Task<global::NightfallAI.ScanFileResponse> ScanUploadedFileAsync(
global::System.Guid fileId,
string? policyUUID = default,
global::NightfallAI.FileScanPolicy? policy = default,
string? requestMetadata = default,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ public partial interface IFileScanningClient
/// <param name="fileId"></param>
/// <param name="xUploadOffset"></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::NightfallAI.ApiException"></exception>
global::System.Threading.Tasks.Task UploadFileChunkAsync(
global::System.Guid fileId,
long xUploadOffset,

byte[] request,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public partial interface IFileScanningClient : global::System.IDisposable
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::NightfallAI.AutoSDKClientOptions Options { get; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public partial interface INightfallAIClient : global::System.IDisposable
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::NightfallAI.AutoSDKClientOptions Options { get; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ public partial interface IScanningClient
/// Maximum 500KB total payload size. Maximum 50,000 items in the payload array.
/// </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::NightfallAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::NightfallAI.ScanTextResponse> ScanTextAsync(

global::NightfallAI.ScanTextRequest request,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Scan text for sensitive data<br/>
Expand All @@ -32,12 +34,14 @@ public partial interface IScanningClient
/// <param name="policyUUIDs">
/// UUIDs of pre-configured policies from the Nightfall Dashboard
/// </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>
global::System.Threading.Tasks.Task<global::NightfallAI.ScanTextResponse> ScanTextAsync(
global::System.Collections.Generic.IList<string> payload,
global::NightfallAI.ScanPolicy? policy = default,
global::System.Collections.Generic.IList<string>? policyUUIDs = default,
global::NightfallAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public partial interface IScanningClient : global::System.IDisposable
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::NightfallAI.AutoSDKClientOptions Options { get; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void AuthorizeUsingBearer(
Authorizations.Add(new global::NightfallAI.EndPointAuthorization
{
Type = "Http",
SchemeId = "BearerAuth",
Location = "Header",
Name = "Bearer",
Value = apiKey,
Expand Down
33 changes: 31 additions & 2 deletions src/libs/NightfallAI/Generated/NightfallAI.NightfallAIClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public sealed partial class NightfallAIClient : global::NightfallAI.INightfallAI
#if DEBUG
= true;
#endif

/// <inheritdoc/>
public global::NightfallAI.AutoSDKClientOptions Options { get; }
/// <summary>
///
/// </summary>
Expand All @@ -41,7 +44,7 @@ public sealed partial class NightfallAIClient : global::NightfallAI.INightfallAI
/// <summary>
/// Upload and scan files for sensitive data.
/// </summary>
public FileScanningClient FileScanning => new FileScanningClient(HttpClient, authorizations: Authorizations)
public FileScanningClient FileScanning => new FileScanningClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -50,7 +53,7 @@ public sealed partial class NightfallAIClient : global::NightfallAI.INightfallAI
/// <summary>
/// Scan text for sensitive data (PII, PHI, PCI, secrets, credentials).
/// </summary>
public ScanningClient Scanning => new ScanningClient(HttpClient, authorizations: Authorizations)
public ScanningClient Scanning => new ScanningClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -69,11 +72,37 @@ public NightfallAIClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::NightfallAI.EndPointAuthorization>? authorizations = null,
bool disposeHttpClient = true) : this(
httpClient,
baseUri,
authorizations,
options: null,
disposeHttpClient: disposeHttpClient)
{
}

/// <summary>
/// Creates a new instance of the NightfallAIClient.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
/// <param name="httpClient">The HttpClient instance. If not provided, a new one will be created.</param>
/// <param name="baseUri">The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.</param>
/// <param name="authorizations">The authorizations to use for the requests.</param>
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public NightfallAIClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::NightfallAI.EndPointAuthorization>? authorizations = null,
global::NightfallAI.AutoSDKClientOptions? options = null,
bool disposeHttpClient = true)
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::NightfallAI.EndPointAuthorization>();
Options = options ?? new global::NightfallAI.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;

Initialized(HttpClient);
Expand Down
Loading