Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 26, 2024
1 parent 39c93fe commit cffe113
Show file tree
Hide file tree
Showing 17 changed files with 1,203 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libs/AI21/Generated/AI21.Ai21Api.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ public sealed partial class Ai21Api : global::AI21.IAi21Api, global::System.IDis
JsonSerializerContext = JsonSerializerContext,
};

/// <summary>
///
/// </summary>
public SecretsClient Secrets => new SecretsClient(HttpClient, authorizations: Authorizations)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};

/// <summary>
/// Creates a new instance of the Ai21Api.
/// If no httpClient is provided, a new one will be created.
Expand Down
5 changes: 5 additions & 0 deletions src/libs/AI21/Generated/AI21.IAi21Api.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,10 @@ public partial interface IAi21Api : global::System.IDisposable
/// </summary>
public RAGEngineClient RAGEngine { get; }

/// <summary>
///
/// </summary>
public SecretsClient Secrets { get; }

}
}
19 changes: 19 additions & 0 deletions src/libs/AI21/Generated/AI21.ISecretsClient.V1SecretStorage.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#nullable enable

namespace AI21
{
public partial interface ISecretsClient
{
/// <summary>
/// Get Secret List
/// </summary>
/// <param name="requestStartTime">
/// Default Value: 1730898900272
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
global::System.Threading.Tasks.Task<string> V1SecretStorageAsync(
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
23 changes: 23 additions & 0 deletions src/libs/AI21/Generated/AI21.ISecretsClient.V1SecretStorage2.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#nullable enable

namespace AI21
{
public partial interface ISecretsClient
{
/// <summary>
/// Save Secret
/// </summary>
/// <param name="secretName"></param>
/// <param name="secretValue"></param>
/// <param name="requestStartTime">
/// Default Value: 1730898900272
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
global::System.Threading.Tasks.Task<string> V1SecretStorage2Async(
string secretName,
string secretValue,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
21 changes: 21 additions & 0 deletions src/libs/AI21/Generated/AI21.ISecretsClient.V1SecretStorage3.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#nullable enable

namespace AI21
{
public partial interface ISecretsClient
{
/// <summary>
/// Delete Secret
/// </summary>
/// <param name="secretName"></param>
/// <param name="requestStartTime">
/// Default Value: 1730898900272
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
global::System.Threading.Tasks.Task<string> V1SecretStorage3Async(
string secretName,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
40 changes: 40 additions & 0 deletions src/libs/AI21/Generated/AI21.ISecretsClient.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

#nullable enable

namespace AI21
{
/// <summary>
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
public partial interface ISecretsClient : global::System.IDisposable
{
/// <summary>
/// The HttpClient instance.
/// </summary>
public global::System.Net.Http.HttpClient HttpClient { get; }

/// <summary>
/// The base URL for the API.
/// </summary>
public System.Uri? BaseUri { get; }

/// <summary>
/// The authorizations to use for the requests.
/// </summary>
public global::System.Collections.Generic.List<global::AI21.EndPointAuthorization> Authorizations { get; }

/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace AI21
{
public sealed partial class V1SecretStorageResponse
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::AI21.V1SecretStorageResponse? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AI21.V1SecretStorageResponse),
jsonSerializerContext) as global::AI21.V1SecretStorageResponse;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::AI21.V1SecretStorageResponse? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AI21.V1SecretStorageResponse>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::AI21.V1SecretStorageResponse?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::AI21.V1SecretStorageResponse),
jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1SecretStorageResponse;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::AI21.V1SecretStorageResponse?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::AI21.V1SecretStorageResponse?>(
jsonStream,
jsonSerializerOptions);
}
}
}
27 changes: 27 additions & 0 deletions src/libs/AI21/Generated/AI21.Models.V1SecretStorageResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

#nullable enable

namespace AI21
{
/// <summary>
///
/// </summary>
public sealed partial class V1SecretStorageResponse
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="V1SecretStorageResponse" /> class.
/// </summary>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public V1SecretStorageResponse(
)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace AI21
{
public sealed partial class V1SecretStorageResponse2
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::AI21.V1SecretStorageResponse2? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AI21.V1SecretStorageResponse2),
jsonSerializerContext) as global::AI21.V1SecretStorageResponse2;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::AI21.V1SecretStorageResponse2? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AI21.V1SecretStorageResponse2>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::AI21.V1SecretStorageResponse2?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::AI21.V1SecretStorageResponse2),
jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1SecretStorageResponse2;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::AI21.V1SecretStorageResponse2?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::AI21.V1SecretStorageResponse2?>(
jsonStream,
jsonSerializerOptions);
}
}
}
27 changes: 27 additions & 0 deletions src/libs/AI21/Generated/AI21.Models.V1SecretStorageResponse2.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

#nullable enable

namespace AI21
{
/// <summary>
///
/// </summary>
public sealed partial class V1SecretStorageResponse2
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="V1SecretStorageResponse2" /> class.
/// </summary>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public V1SecretStorageResponse2(
)
{
}
}
}
Loading

0 comments on commit cffe113

Please sign in to comment.