Skip to content
Closed
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 @@ -44,22 +44,6 @@ partial void ProcessClarotyProductLookupSolutionsClarotyProductLookupPostRespons
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

foreach (var __authorization in Authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
{
__httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
scheme: __authorization.Name,
parameter: __authorization.Value);
}
else if (__authorization.Type == "ApiKey" &&
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}

PrepareRequest(
client: HttpClient,
request: __httpRequest);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@

#nullable enable

namespace AI21
{
public partial class Ai21Api
{
partial void PrepareClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);

/// <summary>
/// Claroty Suggest Vendor Model
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
public async global::System.Threading.Tasks.Task<string> ClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
PrepareClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostArguments(
httpClient: HttpClient);

var __pathBuilder = new global::AI21.PathBuilder(
path: "/solutions/claroty/suggest-vendor-model",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
#if NET6_0_OR_GREATER
__httpRequest.Version = global::System.Net.HttpVersion.Version11;
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

PrepareRequest(
client: HttpClient,
request: __httpRequest);
PrepareClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest);

using var __response = await HttpClient.SendAsync(
request: __httpRequest,
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
cancellationToken: cancellationToken).ConfigureAwait(false);

ProcessResponse(
client: HttpClient,
response: __response);
ProcessClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostResponse(
httpClient: HttpClient,
httpResponseMessage: __response);

if (ReadResponseAsString)
{
var __content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

ProcessResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
ProcessClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);

try
{
__response.EnsureSuccessStatusCode();

return __content;
}
catch (global::System.Exception __ex)
{
throw new global::AI21.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
}
}
else
{
try
{
__response.EnsureSuccessStatusCode();

var __content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

return __content;
}
catch (global::System.Exception __ex)
{
throw new global::AI21.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#nullable enable

namespace AI21
{
public partial interface IAi21Api
{
/// <summary>
/// Claroty Suggest Vendor Model
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
global::System.Threading.Tasks.Task<string> ClarotySuggestVendorModelSolutionsClarotySuggestVendorModelPostAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
}
14 changes: 7 additions & 7 deletions src/libs/AI21/Generated/AI21.Models.Assistant.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ public sealed partial class Assistant
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("id")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Id { get; set; } = default!;
public required string Id { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("created_at")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.DateTime CreatedAt { get; set; } = default!;
public required global::System.DateTime CreatedAt { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("updated_at")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.DateTime UpdatedAt { get; set; } = default!;
public required global::System.DateTime UpdatedAt { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("object")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Object { get; set; } = default!;
public required string Object { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("name")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Name { get; set; } = default!;
public required string Name { get; set; }

/// <summary>
///
Expand All @@ -64,7 +64,7 @@ public sealed partial class Assistant
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("organization_id")]
[global::System.Text.Json.Serialization.JsonRequired]
public string OrganizationId { get; set; } = default!;
public required string OrganizationId { get; set; }

/// <summary>
///
Expand All @@ -77,7 +77,7 @@ public sealed partial class Assistant
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("user_id")]
[global::System.Text.Json.Serialization.JsonRequired]
public string UserId { get; set; } = default!;
public required string UserId { get; set; }

/// <summary>
///
Expand Down
4 changes: 2 additions & 2 deletions src/libs/AI21/Generated/AI21.Models.AssistantBasicInfo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public sealed partial class AssistantBasicInfo
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("id")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.Guid Id { get; set; } = default!;
public required global::System.Guid Id { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("name")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Name { get; set; } = default!;
public required string Name { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
16 changes: 8 additions & 8 deletions src/libs/AI21/Generated/AI21.Models.AssistantRoute.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,56 +15,56 @@ public sealed partial class AssistantRoute
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("id")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Id { get; set; } = default!;
public required string Id { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("created_at")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.DateTime CreatedAt { get; set; } = default!;
public required global::System.DateTime CreatedAt { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("updated_at")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.DateTime UpdatedAt { get; set; } = default!;
public required global::System.DateTime UpdatedAt { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("plan_id")]
[global::System.Text.Json.Serialization.JsonRequired]
public string PlanId { get; set; } = default!;
public required string PlanId { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("name")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Name { get; set; } = default!;
public required string Name { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("description")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Description { get; set; } = default!;
public required string Description { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("examples")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.Collections.Generic.IList<string> Examples { get; set; } = default!;
public required global::System.Collections.Generic.IList<string> Examples { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")]
[global::System.Text.Json.Serialization.JsonRequired]
public string AssistantId { get; set; } = default!;
public required string AssistantId { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed partial class AssistantsByMcpResponse
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("results")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.Collections.Generic.IList<global::AI21.AssistantBasicInfo> Results { get; set; } = default!;
public required global::System.Collections.Generic.IList<global::AI21.AssistantBasicInfo> Results { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed partial class BodyConvertDocumentFileStudioV1ChatFilesConvertPost
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("files")]
[global::System.Text.Json.Serialization.JsonRequired]
public global::System.Collections.Generic.IList<byte[]> Files { get; set; } = default!;
public required global::System.Collections.Generic.IList<byte[]> Files { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ public sealed partial class BodyParsePdfStudioV1DemosDocumentModifierParsePdfPos
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("file")]
[global::System.Text.Json.Serialization.JsonRequired]
public byte[] File { get; set; } = default!;
public required byte[] File { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("filename")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Filename { get; set; } = default!;
public required string Filename { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ public sealed partial class BodyProcessRfiDocumentStudioV1DemosRfiProcessRfiPost
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("file")]
[global::System.Text.Json.Serialization.JsonRequired]
public byte[] File { get; set; } = default!;
public required byte[] File { get; set; }

/// <summary>
/// RFI document file (PDF supported)
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("filename")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Filename { get; set; } = default!;
public required string Filename { get; set; }

/// <summary>
/// Budget level: LOW, MEDIUM, or HIGH<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ public sealed partial class BodyUploadCheckComplianceStudioV1DemosRegulationsUpl
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("file")]
[global::System.Text.Json.Serialization.JsonRequired]
public byte[] File { get; set; } = default!;
public required byte[] File { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("filename")]
[global::System.Text.Json.Serialization.JsonRequired]
public string Filename { get; set; } = default!;
public required string Filename { get; set; }

/// <summary>
/// Default Value: MEDIUM
Expand Down
Loading
Loading