diff --git a/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs index 98eb91c..27c3cba 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.IPromptLayerClient.g.cs @@ -119,6 +119,11 @@ public partial interface IPromptLayerClient : global::System.IDisposable /// public SkillCollectionsClient SkillCollections { get; } + /// + /// + /// + public SmartTablesClient SmartTables { get; } + /// /// /// diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.AddTableSheetRows.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.AddTableSheetRows.g.cs new file mode 100644 index 0000000..840eba6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.AddTableSheetRows.g.cs @@ -0,0 +1,65 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Add Rows
+ /// Append one or more rows to a sheet. Text column values can be set immediately; non-text column cells are created with `stale` status and must be triggered via a recalculation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AddTableSheetRowsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.AddTableSheetRowsRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Rows
+ /// Append one or more rows to a sheet. Text column values can be set immediately; non-text column cells are created with `stale` status and must be triggered via a recalculation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AddTableSheetRowsAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.AddTableSheetRowsRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Rows
+ /// Append one or more rows to a sheet. Text column values can be set immediately; non-text column cells are created with `stale` status and must be triggered via a recalculation. + ///
+ /// + /// + /// + /// Number of rows to append (1–100).
+ /// Default Value: 1 + /// + /// + /// Per-row initial values for text columns. Each element is a map of column_id → value. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AddTableSheetRowsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + int? count = default, + global::System.Collections.Generic.IList? values = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTable.g.cs new file mode 100644 index 0000000..6e62ff0 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTable.g.cs @@ -0,0 +1,52 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Create Table
+ /// Create a new Table. A default sheet with one text column is created automatically. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableAsync( + + global::PromptLayer.CreateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Table
+ /// Create a new Table. A default sheet with one text column is created automatically. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateTableAsResponseAsync( + + global::PromptLayer.CreateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Table
+ /// Create a new Table. A default sheet with one text column is created automatically. + ///
+ /// + /// Table title. Defaults to a unique 'Untitled Table' name if omitted. + /// + /// + /// Folder to place the table in. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableAsync( + string? title = default, + int? folderId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheet.g.cs new file mode 100644 index 0000000..5f778b3 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheet.g.cs @@ -0,0 +1,66 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Create Sheet
+ /// Create a new sheet in a table by importing data from a file (CSV or JSON, base64-encoded) or from request log history. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableSheetAsync( + global::System.Guid tableId, + + global::PromptLayer.CreateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Sheet
+ /// Create a new sheet in a table by importing data from a file (CSV or JSON, base64-encoded) or from request log history. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateTableSheetAsResponseAsync( + global::System.Guid tableId, + + global::PromptLayer.CreateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Sheet
+ /// Create a new sheet in a table by importing data from a file (CSV or JSON, base64-encoded) or from request log history. + ///
+ /// + /// + /// Sheet title. Defaults to the source file name or 'Request Logs'. + /// + /// + /// Display position within the table (0-based). Defaults to appending at the end. + /// + /// + /// Optional idempotency key for the import operation. + /// + /// + /// Data source for the sheet. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableSheetAsync( + global::System.Guid tableId, + global::PromptLayer.OneOf source, + string? title = default, + int? index = default, + string? operationId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetCellRecalculation.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetCellRecalculation.g.cs new file mode 100644 index 0000000..4f4bedb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetCellRecalculation.g.cs @@ -0,0 +1,40 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Recalculate Cell
+ /// Trigger recalculation for a single cell. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableSheetCellRecalculationAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recalculate Cell
+ /// Trigger recalculation for a single cell. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateTableSheetCellRecalculationAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetCellRecalculationsBatch.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetCellRecalculationsBatch.g.cs new file mode 100644 index 0000000..c975ed2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetCellRecalculationsBatch.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Recalculate Cells (Batch)
+ /// Trigger recalculation for a batch of cells identified by ID. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableSheetCellRecalculationsBatchAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recalculate Cells (Batch)
+ /// Trigger recalculation for a batch of cells identified by ID. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateTableSheetCellRecalculationsBatchAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recalculate Cells (Batch)
+ /// Trigger recalculation for a batch of cells identified by ID. + ///
+ /// + /// + /// + /// List of cell IDs to recalculate. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableSheetCellRecalculationsBatchAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Collections.Generic.IList cellIds, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetColumn.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetColumn.g.cs new file mode 100644 index 0000000..b5cfdc7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.CreateTableSheetColumn.g.cs @@ -0,0 +1,68 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Create Column
+ /// Add a new column to a sheet. Non-text columns will generate cells for all existing rows. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Column
+ /// Add a new column to a sheet. Non-text columns will generate cells for all existing rows. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateTableSheetColumnAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Column
+ /// Add a new column to a sheet. Non-text columns will generate cells for all existing rows. + ///
+ /// + /// + /// + /// + /// + /// Type-specific column configuration. + /// + /// + /// Column dependency edges for non-text columns. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + string title, + global::PromptLayer.CreateTableSheetColumnRequestType type, + object? config = default, + global::System.Collections.Generic.IList? dependencies = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTable.g.cs new file mode 100644 index 0000000..38a27f6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTable.g.cs @@ -0,0 +1,30 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Get Table + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetTableAsync( + global::System.Guid tableId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Table + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTableAsResponseAsync( + global::System.Guid tableId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheet.g.cs new file mode 100644 index 0000000..c555cd6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheet.g.cs @@ -0,0 +1,34 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Get Sheet + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetTableSheetAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Sheet + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTableSheetAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheetCell.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheetCell.g.cs new file mode 100644 index 0000000..6664138 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheetCell.g.cs @@ -0,0 +1,40 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Get Cell
+ /// Retrieve a single cell by ID. For prompt-template column cells, the response includes a `request_metrics` object with price, latency, and token usage when available. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetTableSheetCellAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Cell
+ /// Retrieve a single cell by ID. For prompt-template column cells, the response includes a `request_metrics` object with price, latency, and token usage when available. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTableSheetCellAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheetOperation.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheetOperation.g.cs new file mode 100644 index 0000000..e99934c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.GetTableSheetOperation.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Get Sheet Import Operation
+ /// Poll the status of an asynchronous sheet import operation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetTableSheetOperationAsync( + global::System.Guid tableId, + string operationId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Sheet Import Operation
+ /// Poll the status of an asynchronous sheet import operation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTableSheetOperationAsResponseAsync( + global::System.Guid tableId, + string operationId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheetColumns.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheetColumns.g.cs new file mode 100644 index 0000000..59735de --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheetColumns.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// List Columns
+ /// List columns in a sheet, ordered by position rank. By default, system-managed metadata columns such as price and latency columns are excluded; pass `include_system_columns=true` to include them. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListTableSheetColumnsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Columns
+ /// List columns in a sheet, ordered by position rank. By default, system-managed metadata columns such as price and latency columns are excluded; pass `include_system_columns=true` to include them. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListTableSheetColumnsAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheetRows.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheetRows.g.cs new file mode 100644 index 0000000..36b44e6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheetRows.g.cs @@ -0,0 +1,88 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// List Rows
+ /// List rows in a sheet, each containing a map of column_id to cell. For prompt-template column cells, each cell can include a `request_metrics` object with price, latency, and token usage when available. Pass `include_columns=true` on the first page to receive column metadata alongside rows. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: asc + /// + /// + /// Include column metadata in the response. Defaults to true on the first page. + /// + /// + /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListTableSheetRowsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + bool? includeExecutionMetadataAggregates = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetRowsOrder? order = default, + bool? includeColumns = default, + bool? includeRowCount = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Rows
+ /// List rows in a sheet, each containing a map of column_id to cell. For prompt-template column cells, each cell can include a `request_metrics` object with price, latency, and token usage when available. Pass `include_columns=true` on the first page to receive column metadata alongside rows. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: asc + /// + /// + /// Include column metadata in the response. Defaults to true on the first page. + /// + /// + /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListTableSheetRowsAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + bool? includeExecutionMetadataAggregates = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetRowsOrder? order = default, + bool? includeColumns = default, + bool? includeRowCount = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheets.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheets.g.cs new file mode 100644 index 0000000..f79e978 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTableSheets.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// List Sheets
+ /// List all sheets in a table, ordered by their index. + ///
+ /// + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: asc + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListTableSheetsAsync( + global::System.Guid tableId, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetsOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Sheets
+ /// List all sheets in a table, ordered by their index. + ///
+ /// + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: asc + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListTableSheetsAsResponseAsync( + global::System.Guid tableId, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetsOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTables.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTables.g.cs new file mode 100644 index 0000000..4ba1594 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.ListTables.g.cs @@ -0,0 +1,84 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// List Tables
+ /// List Tables in the workspace. Supports cursor-based pagination and optional filtering by folder or prompt column. + ///
+ /// + /// Filter by folder ID. + /// + /// + /// Filter by title (case-insensitive contains match). + /// + /// + /// Pagination cursor from a previous response. + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: desc + /// + /// + /// Filter to tables containing a column referencing this prompt. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListTablesAsync( + int? folderId = default, + string? name = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTablesOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Tables
+ /// List Tables in the workspace. Supports cursor-based pagination and optional filtering by folder or prompt column. + ///
+ /// + /// Filter by folder ID. + /// + /// + /// Filter by title (case-insensitive contains match). + /// + /// + /// Pagination cursor from a previous response. + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: desc + /// + /// + /// Filter to tables containing a column referencing this prompt. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListTablesAsResponseAsync( + int? folderId = default, + string? name = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTablesOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTable.g.cs new file mode 100644 index 0000000..4a904a6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTable.g.cs @@ -0,0 +1,51 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Update Table + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableAsync( + global::System.Guid tableId, + + global::PromptLayer.UpdateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Table + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateTableAsResponseAsync( + global::System.Guid tableId, + + global::PromptLayer.UpdateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Table + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableAsync( + global::System.Guid tableId, + string? title = default, + int? folderId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheet.g.cs new file mode 100644 index 0000000..e988ec2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheet.g.cs @@ -0,0 +1,59 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Update Sheet + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableSheetAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.UpdateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Sheet + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateTableSheetAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.UpdateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Sheet + /// + /// + /// + /// + /// + /// New display position within the table (0-based). + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableSheetAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + string? title = default, + int? index = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheetCell.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheetCell.g.cs new file mode 100644 index 0000000..258ad92 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheetCell.g.cs @@ -0,0 +1,70 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Update Cell
+ /// Edit the value of a text column cell. Only cells in `text` type columns can be edited directly; computed cells are recalculated automatically. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableSheetCellAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + + global::PromptLayer.UpdateTableSheetCellRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Cell
+ /// Edit the value of a text column cell. Only cells in `text` type columns can be edited directly; computed cells are recalculated automatically. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateTableSheetCellAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + + global::PromptLayer.UpdateTableSheetCellRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Cell
+ /// Edit the value of a text column cell. Only cells in `text` type columns can be edited directly; computed cells are recalculated automatically. + ///
+ /// + /// + /// + /// + /// Human-readable display value. + /// + /// + /// Structured value to store. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableSheetCellAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + string? displayValue = default, + object? value = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheetColumn.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheetColumn.g.cs new file mode 100644 index 0000000..93e1af4 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.UpdateTableSheetColumn.g.cs @@ -0,0 +1,68 @@ +#nullable enable + +namespace PromptLayer +{ + public partial interface ISmartTablesClient + { + /// + /// Update Column
+ /// Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid columnId, + + global::PromptLayer.UpdateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Column
+ /// Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateTableSheetColumnAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid columnId, + + global::PromptLayer.UpdateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Column
+ /// Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid columnId, + string? title = default, + object? config = default, + global::System.Collections.Generic.IList? dependencies = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.g.cs new file mode 100644 index 0000000..fc0f1f6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.ISmartTablesClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// 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. + ///
+ public partial interface ISmartTablesClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::PromptLayer.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CellStatus.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CellStatus.g.cs new file mode 100644 index 0000000..b203b43 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CellStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CellStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CellStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CellStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CellStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CellStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CellStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.CellStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CellStatusNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CellStatusNullable.g.cs new file mode 100644 index 0000000..b1cac37 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CellStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CellStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CellStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CellStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CellStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CellStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CellStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.CellStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ColumnType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ColumnType.g.cs new file mode 100644 index 0000000..148c55f --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ColumnType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ColumnTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ColumnType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ColumnTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ColumnType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ColumnType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ColumnType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.ColumnTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ColumnTypeNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ColumnTypeNullable.g.cs new file mode 100644 index 0000000..4e52227 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ColumnTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ColumnTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ColumnType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ColumnTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ColumnType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ColumnType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ColumnType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.ColumnTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetColumnRequestType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetColumnRequestType.g.cs new file mode 100644 index 0000000..3a5a6f7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetColumnRequestType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CreateTableSheetColumnRequestTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CreateTableSheetColumnRequestType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CreateTableSheetColumnRequestTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CreateTableSheetColumnRequestType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CreateTableSheetColumnRequestType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CreateTableSheetColumnRequestType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.CreateTableSheetColumnRequestTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeNullable.g.cs new file mode 100644 index 0000000..c8294f3 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CreateTableSheetColumnRequestTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CreateTableSheetColumnRequestType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CreateTableSheetColumnRequestTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CreateTableSheetColumnRequestType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CreateTableSheetColumnRequestType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CreateTableSheetColumnRequestType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.CreateTableSheetColumnRequestTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceType.g.cs new file mode 100644 index 0000000..fbc9ed3 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CreateTableSheetRequestSourceFileSourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CreateTableSheetRequestSourceFileSourceType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CreateTableSheetRequestSourceFileSourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CreateTableSheetRequestSourceFileSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CreateTableSheetRequestSourceFileSourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CreateTableSheetRequestSourceFileSourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.CreateTableSheetRequestSourceFileSourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeNullable.g.cs new file mode 100644 index 0000000..91658bb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CreateTableSheetRequestSourceFileSourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CreateTableSheetRequestSourceFileSourceType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CreateTableSheetRequestSourceFileSourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CreateTableSheetRequestSourceFileSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CreateTableSheetRequestSourceFileSourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CreateTableSheetRequestSourceFileSourceType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.CreateTableSheetRequestSourceFileSourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceType.g.cs new file mode 100644 index 0000000..14b9864 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CreateTableSheetRequestSourceRequestLogsSourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeNullable.g.cs new file mode 100644 index 0000000..b50c325 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class CreateTableSheetRequestSourceRequestLogsSourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKey.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKey.g.cs new file mode 100644 index 0000000..5223c1c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKey.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ExecutionMetadataMetricAggregateMetricKeyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ExecutionMetadataMetricAggregateMetricKeyExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.ExecutionMetadataMetricAggregateMetricKeyExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyNullable.g.cs new file mode 100644 index 0000000..871a18d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ExecutionMetadataMetricAggregateMetricKeyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ExecutionMetadataMetricAggregateMetricKeyExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.ExecutionMetadataMetricAggregateMetricKeyExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetRowsOrder.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetRowsOrder.g.cs new file mode 100644 index 0000000..9778f5d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetRowsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ListTableSheetRowsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ListTableSheetRowsOrder Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ListTableSheetRowsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ListTableSheetRowsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ListTableSheetRowsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ListTableSheetRowsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.ListTableSheetRowsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetRowsOrderNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetRowsOrderNullable.g.cs new file mode 100644 index 0000000..c2ae342 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetRowsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ListTableSheetRowsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ListTableSheetRowsOrder? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ListTableSheetRowsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ListTableSheetRowsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ListTableSheetRowsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ListTableSheetRowsOrder? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.ListTableSheetRowsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetsOrder.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetsOrder.g.cs new file mode 100644 index 0000000..019575b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ListTableSheetsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ListTableSheetsOrder Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ListTableSheetsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ListTableSheetsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ListTableSheetsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ListTableSheetsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.ListTableSheetsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetsOrderNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetsOrderNullable.g.cs new file mode 100644 index 0000000..9c83a2e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTableSheetsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ListTableSheetsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ListTableSheetsOrder? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ListTableSheetsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ListTableSheetsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ListTableSheetsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ListTableSheetsOrder? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.ListTableSheetsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTablesOrder.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTablesOrder.g.cs new file mode 100644 index 0000000..7d39db7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTablesOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ListTablesOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ListTablesOrder Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ListTablesOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ListTablesOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ListTablesOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ListTablesOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.ListTablesOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTablesOrderNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTablesOrderNullable.g.cs new file mode 100644 index 0000000..15696a2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.ListTablesOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class ListTablesOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.ListTablesOrder? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.ListTablesOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.ListTablesOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.ListTablesOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.ListTablesOrder? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.ListTablesOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationSource.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationSource.g.cs new file mode 100644 index 0000000..c6d7cca --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationSource.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class TableImportOperationSourceJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.TableImportOperationSource Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.TableImportOperationSourceExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.TableImportOperationSource)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.TableImportOperationSource); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.TableImportOperationSource value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.TableImportOperationSourceExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationSourceNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationSourceNullable.g.cs new file mode 100644 index 0000000..7bd3605 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationSourceNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class TableImportOperationSourceNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.TableImportOperationSource? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.TableImportOperationSourceExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.TableImportOperationSource)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.TableImportOperationSource?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.TableImportOperationSource? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.TableImportOperationSourceExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationStatus.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationStatus.g.cs new file mode 100644 index 0000000..525f103 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class TableImportOperationStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.TableImportOperationStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.TableImportOperationStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.TableImportOperationStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.TableImportOperationStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.TableImportOperationStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::PromptLayer.TableImportOperationStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationStatusNullable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationStatusNullable.g.cs new file mode 100644 index 0000000..7327489 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonConverters.TableImportOperationStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace PromptLayer.JsonConverters +{ + /// + public sealed class TableImportOperationStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::PromptLayer.TableImportOperationStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::PromptLayer.TableImportOperationStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::PromptLayer.TableImportOperationStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::PromptLayer.TableImportOperationStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::PromptLayer.TableImportOperationStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::PromptLayer.TableImportOperationStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs index 2a054dd..d924381 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContext.g.cs @@ -329,6 +329,26 @@ namespace PromptLayer typeof(global::PromptLayer.JsonConverters.AddTraceToDatasetResponseModeNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.ColumnTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ColumnTypeNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CellStatusJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CellStatusNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationSourceJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationSourceNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationStatusJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationStatusNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.AddReportColumnRequestColumnTypeJsonConverter), typeof(global::PromptLayer.JsonConverters.AddReportColumnRequestColumnTypeNullableJsonConverter), @@ -341,6 +361,18 @@ namespace PromptLayer typeof(global::PromptLayer.JsonConverters.CreateToolRegistryRequestExecutionLanguageNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.CreateToolVersionRequestExecutionTypeJsonConverter), typeof(global::PromptLayer.JsonConverters.CreateToolVersionRequestExecutionTypeNullableJsonConverter), @@ -449,6 +481,18 @@ namespace PromptLayer typeof(global::PromptLayer.JsonConverters.ListToolRegistriesSortOrderNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.ListTablesOrderJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTablesOrderNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetsOrderJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetsOrderNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetRowsOrderJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetRowsOrderNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.GetReportResponseStatusJsonConverter), typeof(global::PromptLayer.JsonConverters.GetReportResponseStatusNullableJsonConverter), @@ -549,6 +593,8 @@ namespace PromptLayer typeof(global::PromptLayer.JsonConverters.AnyOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.AnyOfJsonConverter>), typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter>), @@ -693,6 +739,22 @@ namespace PromptLayer typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_a2e389e01f671d8d")] @@ -1107,6 +1169,22 @@ namespace PromptLayer [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddTraceToDatasetRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddTraceToDatasetResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddTraceToDatasetResponseMode), TypeInfoPropertyName = "AddTraceToDatasetResponseMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.Table))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TableDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.Sheet))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.Column))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ColumnType), TypeInfoPropertyName = "ColumnType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.Cell))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CellStatus), TypeInfoPropertyName = "CellStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.SmartTableRequestMetrics))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TableImportOperation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TableImportOperationSource), TypeInfoPropertyName = "TableImportOperationSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TableImportOperationStatus), TypeInfoPropertyName = "TableImportOperationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ExecutionMetadataMetricAggregate))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey), TypeInfoPropertyName = "ExecutionMetadataMetricAggregateMetricKey2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ExecutionMetadataAggregates))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ExecutionMetadataAggregatesSheet))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreatePromptLabelRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TrackGroupRequest))] @@ -1118,6 +1196,26 @@ namespace PromptLayer [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolRegistryRequestExecution))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolRegistryRequestExecutionType), TypeInfoPropertyName = "CreateToolRegistryRequestExecutionType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolRegistryRequestExecutionLanguage), TypeInfoPropertyName = "CreateToolRegistryRequestExecutionLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf), TypeInfoPropertyName = "OneOfCreateTableSheetRequestSourceFileSourceCreateTableSheetRequestSourceRequestLogsSource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetRequestSourceFileSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetRequestSourceFileSourceType), TypeInfoPropertyName = "CreateTableSheetRequestSourceFileSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType), TypeInfoPropertyName = "CreateTableSheetRequestSourceRequestLogsSourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableSheetRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetColumnRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetColumnRequestType), TypeInfoPropertyName = "CreateTableSheetColumnRequestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetColumnRequestDependencie))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableSheetColumnRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableSheetColumnRequestDependencie))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddTableSheetRowsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableSheetCellRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolVersionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolVersionRequestExecution))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolVersionRequestExecutionType), TypeInfoPropertyName = "CreateToolVersionRequestExecutionType2")] @@ -1153,48 +1251,12 @@ namespace PromptLayer [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetRequestSearchSuggestionsField), TypeInfoPropertyName = "GetRequestSearchSuggestionsField2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListToolRegistriesSortBy), TypeInfoPropertyName = "ListToolRegistriesSortBy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListToolRegistriesSortOrder), TypeInfoPropertyName = "ListToolRegistriesSortOrder2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTablesOrder), TypeInfoPropertyName = "ListTablesOrder2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetsOrder), TypeInfoPropertyName = "ListTableSheetsOrder2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetRowsOrder), TypeInfoPropertyName = "ListTableSheetRowsOrder2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf), TypeInfoPropertyName = "OneOfHTTPValidationErrorErrorResponse2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreatePromptLabelResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TrackGroupResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TrackScoreResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.DeleteReportsByNameResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateEvaluationPipelineResponse2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse3))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse4))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse3))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse4))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse5))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseReport))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseStatus), TypeInfoPropertyName = "GetReportResponseStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseStats))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseStatsStatusCounts))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseReportColumn))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScore))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreScoreType), TypeInfoPropertyName = "GetReportScoreResponseScoreScoreType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2Column))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant3))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant4))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListDatasetsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListEvaluationsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AnyOf), TypeInfoPropertyName = "AnyOfBadRequestErrorValidationError2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf, object>), TypeInfoPropertyName = "OneOfDictionaryStringGetWorkflowVersionExecutionResultsResponseVariant12Object2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant12))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf, object>), TypeInfoPropertyName = "OneOfDictionaryStringGetWorkflowVersionExecutionResultsResponseVariant14Object2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1522,6 +1584,26 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::PromptLayer.JsonConverters.AddTraceToDatasetResponseModeNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.ColumnTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ColumnTypeNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CellStatusJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CellStatusNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationSourceJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationSourceNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationStatusJsonConverter), + + typeof(global::PromptLayer.JsonConverters.TableImportOperationStatusNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.AddReportColumnRequestColumnTypeJsonConverter), typeof(global::PromptLayer.JsonConverters.AddReportColumnRequestColumnTypeNullableJsonConverter), @@ -1534,6 +1616,18 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::PromptLayer.JsonConverters.CreateToolRegistryRequestExecutionLanguageNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeJsonConverter), + + typeof(global::PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.CreateToolVersionRequestExecutionTypeJsonConverter), typeof(global::PromptLayer.JsonConverters.CreateToolVersionRequestExecutionTypeNullableJsonConverter), @@ -1642,6 +1736,18 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::PromptLayer.JsonConverters.ListToolRegistriesSortOrderNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.ListTablesOrderJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTablesOrderNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetsOrderJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetsOrderNullableJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetRowsOrderJsonConverter), + + typeof(global::PromptLayer.JsonConverters.ListTableSheetRowsOrderNullableJsonConverter), + typeof(global::PromptLayer.JsonConverters.GetReportResponseStatusJsonConverter), typeof(global::PromptLayer.JsonConverters.GetReportResponseStatusNullableJsonConverter), @@ -1742,6 +1848,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::PromptLayer.JsonConverters.AnyOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.AnyOfJsonConverter>), typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter>), @@ -1886,6 +1994,22 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + + typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter), + typeof(global::PromptLayer.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_a2e389e01f671d8d")] @@ -1893,6 +2017,45 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>?), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_47a8c666c2b64908")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf?), TypeInfoPropertyName = "GetReportScoreResponseScoreDetailsVariant4_819979ee8daaec57")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>), TypeInfoPropertyName = "ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem_13c51ceff6c2844e")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TrackGroupResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TrackScoreResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.DeleteReportsByNameResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateEvaluationPipelineResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddReportColumnResponse4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.RunReportResponse5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseReport))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseStatus), TypeInfoPropertyName = "GetReportResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseStats))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseStatsStatusCounts))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportResponseReportColumn))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScore))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreScoreType), TypeInfoPropertyName = "GetReportScoreResponseScoreScoreType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2Column))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetReportScoreResponseScoreDetailsVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListDatasetsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListEvaluationsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AnyOf), TypeInfoPropertyName = "AnyOfBadRequestErrorValidationError2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf, object>), TypeInfoPropertyName = "OneOfDictionaryStringGetWorkflowVersionExecutionResultsResponseVariant12Object2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant12))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf, object>), TypeInfoPropertyName = "OneOfDictionaryStringGetWorkflowVersionExecutionResultsResponseVariant14Object2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant14))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListWorkflowsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -1915,6 +2078,33 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolRegistryResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetToolRegistryResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetToolRegistryResponseToolRegistry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTablesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetTableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetTableSheetOperationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetTableSheetResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableSheetResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetColumnsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetColumnResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableSheetColumnResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetRowsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.ListTableSheetRowsResponseDataItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddTableSheetRowsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AddTableSheetRowsResponseRow))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.GetTableSheetCellResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.UpdateTableSheetCellResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateTableSheetCellRecalculationResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.CreateToolVersionResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TestExecuteToolResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.TestExecuteToolResponseResult))] @@ -1986,6 +2176,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.AnyOf>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::PromptLayer.OneOf>))] @@ -1998,6 +2191,12 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -2198,12 +2397,28 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::PromptLayer.JsonConverters.EvaluationRowCellTypeNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.AddTraceToDatasetResponseModeJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.AddTraceToDatasetResponseModeNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ColumnTypeJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ColumnTypeNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CellStatusJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CellStatusNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.TableImportOperationSourceJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.TableImportOperationSourceNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.TableImportOperationStatusJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.TableImportOperationStatusNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.AddReportColumnRequestColumnTypeJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.AddReportColumnRequestColumnTypeNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.CreateToolRegistryRequestExecutionTypeJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.CreateToolRegistryRequestExecutionTypeNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.CreateToolRegistryRequestExecutionLanguageJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.CreateToolRegistryRequestExecutionLanguageNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.CreateToolVersionRequestExecutionTypeJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.CreateToolVersionRequestExecutionTypeNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.CreateToolVersionRequestExecutionLanguageJsonConverter()); @@ -2258,6 +2473,12 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::PromptLayer.JsonConverters.ListToolRegistriesSortByNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.ListToolRegistriesSortOrderJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.ListToolRegistriesSortOrderNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ListTablesOrderJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ListTablesOrderNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ListTableSheetsOrderJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ListTableSheetsOrderNullableJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ListTableSheetRowsOrderJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.ListTableSheetRowsOrderNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.GetReportResponseStatusJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.GetReportResponseStatusNullableJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.GetReportScoreResponseScoreScoreTypeJsonConverter()); @@ -2308,6 +2529,7 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::PromptLayer.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.AnyOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.AnyOfJsonConverter>()); options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter>()); options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter>()); @@ -2380,6 +2602,14 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::PromptLayer.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::PromptLayer.JsonConverters.UnixTimestampJsonConverter()); return options; diff --git a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs index cec1c3a..5b5729a 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.JsonSerializerContextTypes.g.cs @@ -1652,475 +1652,739 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::PromptLayer.CreatePromptLabelRequest? Type406 { get; set; } + public global::PromptLayer.Table? Type406 { get; set; } /// /// /// - public global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchRequest? Type407 { get; set; } + public global::PromptLayer.TableDetail? Type407 { get; set; } /// /// /// - public global::PromptLayer.TrackGroupRequest? Type408 { get; set; } + public global::PromptLayer.Sheet? Type408 { get; set; } /// /// /// - public global::PromptLayer.TrackScoreRequest? Type409 { get; set; } + public global::PromptLayer.Column? Type409 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnRequest? Type410 { get; set; } + public global::PromptLayer.ColumnType? Type410 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnRequestColumnType? Type411 { get; set; } + public global::PromptLayer.Cell? Type411 { get; set; } /// /// /// - public global::PromptLayer.RunReportRequest? Type412 { get; set; } + public global::PromptLayer.CellStatus? Type412 { get; set; } /// /// /// - public global::PromptLayer.CreateToolRegistryRequest? Type413 { get; set; } + public global::PromptLayer.SmartTableRequestMetrics? Type413 { get; set; } /// /// /// - public global::PromptLayer.CreateToolRegistryRequestExecution? Type414 { get; set; } + public global::PromptLayer.TableImportOperation? Type414 { get; set; } /// /// /// - public global::PromptLayer.CreateToolRegistryRequestExecutionType? Type415 { get; set; } + public global::PromptLayer.TableImportOperationSource? Type415 { get; set; } /// /// /// - public global::PromptLayer.CreateToolRegistryRequestExecutionLanguage? Type416 { get; set; } + public global::PromptLayer.TableImportOperationStatus? Type416 { get; set; } /// /// /// - public global::PromptLayer.CreateToolVersionRequest? Type417 { get; set; } + public global::PromptLayer.ExecutionMetadataMetricAggregate? Type417 { get; set; } /// /// /// - public global::PromptLayer.CreateToolVersionRequestExecution? Type418 { get; set; } + public global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey? Type418 { get; set; } /// /// /// - public global::PromptLayer.CreateToolVersionRequestExecutionType? Type419 { get; set; } + public global::PromptLayer.ExecutionMetadataAggregates? Type419 { get; set; } /// /// /// - public global::PromptLayer.CreateToolVersionRequestExecutionLanguage? Type420 { get; set; } + public global::System.Collections.Generic.Dictionary? Type420 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolRequest? Type421 { get; set; } + public global::PromptLayer.ExecutionMetadataAggregatesSheet? Type421 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolRequestExecution? Type422 { get; set; } + public global::PromptLayer.CreatePromptLabelRequest? Type422 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolRequestExecutionType? Type423 { get; set; } + public global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchRequest? Type423 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolRequestExecutionLanguage? Type424 { get; set; } + public global::PromptLayer.TrackGroupRequest? Type424 { get; set; } /// /// /// - public global::PromptLayer.ListDatasetsStatus? Type425 { get; set; } + public global::PromptLayer.TrackScoreRequest? Type425 { get; set; } /// /// /// - public global::PromptLayer.ListDatasetsSortBy? Type426 { get; set; } + public global::PromptLayer.AddReportColumnRequest? Type426 { get; set; } /// /// /// - public global::PromptLayer.ListDatasetsSortOrder? Type427 { get; set; } + public global::PromptLayer.AddReportColumnRequestColumnType? Type427 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsStatus? Type428 { get; set; } + public global::PromptLayer.RunReportRequest? Type428 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsSortBy? Type429 { get; set; } + public global::PromptLayer.CreateToolRegistryRequest? Type429 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsSortOrder? Type430 { get; set; } + public global::PromptLayer.CreateToolRegistryRequestExecution? Type430 { get; set; } /// /// /// - public global::PromptLayer.AnyOf>? Type431 { get; set; } + public global::PromptLayer.CreateToolRegistryRequestExecutionType? Type431 { get; set; } /// /// /// - public global::PromptLayer.GetAllPromptTemplatesGetStatus? Type432 { get; set; } + public global::PromptLayer.CreateToolRegistryRequestExecutionLanguage? Type432 { get; set; } /// /// /// - public global::PromptLayer.GetAllPromptTemplatesGetSortBy? Type433 { get; set; } + public global::PromptLayer.CreateTableRequest? Type433 { get; set; } /// /// /// - public global::PromptLayer.GetAllPromptTemplatesGetSortOrder? Type434 { get; set; } + public global::PromptLayer.UpdateTableRequest? Type434 { get; set; } /// /// /// - public long? Type435 { get; set; } + public global::PromptLayer.CreateTableSheetRequest? Type435 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsSortBy? Type436 { get; set; } + public global::PromptLayer.OneOf? Type436 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsSortOrder? Type437 { get; set; } + public global::PromptLayer.CreateTableSheetRequestSourceFileSource? Type437 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterType2? Type438 { get; set; } + public global::PromptLayer.CreateTableSheetRequestSourceFileSourceType? Type438 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type439 { get; set; } + public global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource? Type439 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem? Type440 { get; set; } + public global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType? Type440 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortBy? Type441 { get; set; } + public global::PromptLayer.UpdateTableSheetRequest? Type441 { get; set; } /// /// /// - public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortOrder? Type442 { get; set; } + public global::PromptLayer.CreateTableSheetColumnRequest? Type442 { get; set; } /// /// /// - public global::PromptLayer.OneOf>? Type443 { get; set; } + public global::PromptLayer.CreateTableSheetColumnRequestType? Type443 { get; set; } /// /// /// - public global::PromptLayer.IngestOtlpTracesContentType? Type444 { get; set; } + public global::System.Collections.Generic.IList? Type444 { get; set; } /// /// /// - public global::PromptLayer.IngestOtlpTracesContentEncoding? Type445 { get; set; } + public global::PromptLayer.CreateTableSheetColumnRequestDependencie? Type445 { get; set; } /// /// /// - public global::PromptLayer.ListSkillCollectionsPublicSortBy? Type446 { get; set; } + public global::PromptLayer.UpdateTableSheetColumnRequest? Type446 { get; set; } /// /// /// - public global::PromptLayer.ListSkillCollectionsPublicSortOrder? Type447 { get; set; } + public global::System.Collections.Generic.IList? Type447 { get; set; } /// /// /// - public global::PromptLayer.GetSkillCollectionPublicFormat? Type448 { get; set; } + public global::PromptLayer.UpdateTableSheetColumnRequestDependencie? Type448 { get; set; } /// /// /// - public global::PromptLayer.GetRequestSearchSuggestionsField? Type449 { get; set; } + public global::PromptLayer.AddTableSheetRowsRequest? Type449 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesSortBy? Type450 { get; set; } + public global::PromptLayer.UpdateTableSheetCellRequest? Type450 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesSortOrder? Type451 { get; set; } + public global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest? Type451 { get; set; } /// /// /// - public global::PromptLayer.OneOf? Type452 { get; set; } + public global::System.Collections.Generic.IList? Type452 { get; set; } /// /// /// - public global::PromptLayer.CreatePromptLabelResponse? Type453 { get; set; } + public global::PromptLayer.CreateToolVersionRequest? Type453 { get; set; } /// /// /// - public global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchResponse? Type454 { get; set; } + public global::PromptLayer.CreateToolVersionRequestExecution? Type454 { get; set; } /// /// /// - public global::PromptLayer.TrackGroupResponse? Type455 { get; set; } + public global::PromptLayer.CreateToolVersionRequestExecutionType? Type455 { get; set; } /// /// /// - public global::PromptLayer.TrackScoreResponse? Type456 { get; set; } + public global::PromptLayer.CreateToolVersionRequestExecutionLanguage? Type456 { get; set; } /// /// /// - public global::PromptLayer.DeleteReportsByNameResponse? Type457 { get; set; } + public global::PromptLayer.TestExecuteToolRequest? Type457 { get; set; } /// /// /// - public global::PromptLayer.CreateEvaluationPipelineResponse2? Type458 { get; set; } + public global::PromptLayer.TestExecuteToolRequestExecution? Type458 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse? Type459 { get; set; } + public global::PromptLayer.TestExecuteToolRequestExecutionType? Type459 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse2? Type460 { get; set; } + public global::PromptLayer.TestExecuteToolRequestExecutionLanguage? Type460 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse3? Type461 { get; set; } + public global::PromptLayer.ListDatasetsStatus? Type461 { get; set; } /// /// /// - public global::PromptLayer.AddReportColumnResponse4? Type462 { get; set; } + public global::PromptLayer.ListDatasetsSortBy? Type462 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse? Type463 { get; set; } + public global::PromptLayer.ListDatasetsSortOrder? Type463 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse2? Type464 { get; set; } + public global::PromptLayer.ListEvaluationsStatus? Type464 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse3? Type465 { get; set; } + public global::PromptLayer.ListEvaluationsSortBy? Type465 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse4? Type466 { get; set; } + public global::PromptLayer.ListEvaluationsSortOrder? Type466 { get; set; } /// /// /// - public global::PromptLayer.RunReportResponse5? Type467 { get; set; } + public global::PromptLayer.AnyOf>? Type467 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponse? Type468 { get; set; } + public global::PromptLayer.GetAllPromptTemplatesGetStatus? Type468 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseReport? Type469 { get; set; } + public global::PromptLayer.GetAllPromptTemplatesGetSortBy? Type469 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseStatus? Type470 { get; set; } + public global::PromptLayer.GetAllPromptTemplatesGetSortOrder? Type470 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseStats? Type471 { get; set; } + public long? Type471 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseStatsStatusCounts? Type472 { get; set; } + public global::PromptLayer.ListWorkflowsSortBy? Type472 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type473 { get; set; } + public global::PromptLayer.ListWorkflowsSortOrder? Type473 { get; set; } /// /// /// - public global::PromptLayer.GetReportResponseReportColumn? Type474 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterType2? Type474 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponse? Type475 { get; set; } + public global::System.Collections.Generic.IList? Type475 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScore? Type476 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetFilterTypeItem? Type476 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreScoreType? Type477 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortBy? Type477 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant1? Type478 { get; set; } + public global::PromptLayer.ListFolderEntitiesApiPublicV2FoldersEntitiesGetSortOrder? Type478 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2? Type479 { get; set; } + public global::PromptLayer.OneOf>? Type479 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type480 { get; set; } + public global::PromptLayer.IngestOtlpTracesContentType? Type480 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2Column? Type481 { get; set; } + public global::PromptLayer.IngestOtlpTracesContentEncoding? Type481 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant3? Type482 { get; set; } + public global::PromptLayer.ListSkillCollectionsPublicSortBy? Type482 { get; set; } /// /// /// - public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant4? Type483 { get; set; } + public global::PromptLayer.ListSkillCollectionsPublicSortOrder? Type483 { get; set; } /// /// /// - public global::PromptLayer.ListDatasetsResponse? Type484 { get; set; } + public global::PromptLayer.GetSkillCollectionPublicFormat? Type484 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type485 { get; set; } + public global::PromptLayer.GetRequestSearchSuggestionsField? Type485 { get; set; } /// /// /// - public global::PromptLayer.ListEvaluationsResponse? Type486 { get; set; } + public global::PromptLayer.ListToolRegistriesSortBy? Type486 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type487 { get; set; } + public global::PromptLayer.ListToolRegistriesSortOrder? Type487 { get; set; } /// /// /// - public global::PromptLayer.AnyOf? Type488 { get; set; } + public global::PromptLayer.ListTablesOrder? Type488 { get; set; } /// /// /// - public global::PromptLayer.OneOf, object>? Type489 { get; set; } + public global::PromptLayer.ListTableSheetsOrder? Type489 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type490 { get; set; } + public global::PromptLayer.ListTableSheetRowsOrder? Type490 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant12? Type491 { get; set; } + public global::PromptLayer.OneOf? Type491 { get; set; } /// /// /// - public global::PromptLayer.OneOf, object>? Type492 { get; set; } + public global::PromptLayer.CreatePromptLabelResponse? Type492 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type493 { get; set; } + public global::PromptLayer.PromptTemplatesLabelsPromptLabelIdPatchResponse? Type493 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant14? Type494 { get; set; } + public global::PromptLayer.TrackGroupResponse? Type494 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponse? Type495 { get; set; } + public global::PromptLayer.TrackScoreResponse? Type495 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type496 { get; set; } + public global::PromptLayer.DeleteReportsByNameResponse? Type496 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponseItem? Type497 { get; set; } + public global::PromptLayer.CreateEvaluationPipelineResponse2? Type497 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponse2? Type498 { get; set; } + public global::PromptLayer.AddReportColumnResponse? Type498 { get; set; } /// /// /// - public global::PromptLayer.ListWorkflowsResponse3? Type499 { get; set; } + public global::PromptLayer.AddReportColumnResponse2? Type499 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowResponse? Type500 { get; set; } + public global::PromptLayer.AddReportColumnResponse3? Type500 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type501 { get; set; } + public global::PromptLayer.AddReportColumnResponse4? Type501 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowResponseNode? Type502 { get; set; } + public global::PromptLayer.RunReportResponse? Type502 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type503 { get; set; } + public global::PromptLayer.RunReportResponse2? Type503 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowResponseEdge? Type504 { get; set; } + public global::PromptLayer.RunReportResponse3? Type504 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowLabelsResponse? Type505 { get; set; } + public global::PromptLayer.RunReportResponse4? Type505 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type506 { get; set; } + public global::PromptLayer.RunReportResponse5? Type506 { get; set; } /// /// /// - public global::PromptLayer.GetWorkflowLabelsResponseReleaseLabel? Type507 { get; set; } + public global::PromptLayer.GetReportResponse? Type507 { get; set; } /// /// /// - public global::PromptLayer.AnyOf? Type508 { get; set; } + public global::PromptLayer.GetReportResponseReport? Type508 { get; set; } /// /// /// - public global::PromptLayer.IngestOtlpTracesResponse2? Type509 { get; set; } + public global::PromptLayer.GetReportResponseStatus? Type509 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesResponse? Type510 { get; set; } + public global::PromptLayer.GetReportResponseStats? Type510 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type511 { get; set; } + public global::PromptLayer.GetReportResponseStatsStatusCounts? Type511 { get; set; } /// /// /// - public global::PromptLayer.ListToolRegistriesResponseToolRegistrie? Type512 { get; set; } + public global::System.Collections.Generic.IList? Type512 { get; set; } /// /// /// - public global::PromptLayer.CreateToolRegistryResponse? Type513 { get; set; } + public global::PromptLayer.GetReportResponseReportColumn? Type513 { get; set; } /// /// /// - public global::PromptLayer.GetToolRegistryResponse? Type514 { get; set; } + public global::PromptLayer.GetReportScoreResponse? Type514 { get; set; } /// /// /// - public global::PromptLayer.GetToolRegistryResponseToolRegistry? Type515 { get; set; } + public global::PromptLayer.GetReportScoreResponseScore? Type515 { get; set; } /// /// /// - public global::PromptLayer.CreateToolVersionResponse? Type516 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreScoreType? Type516 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolResponse? Type517 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant1? Type517 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolResponseResult? Type518 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2? Type518 { get; set; } /// /// /// - public global::PromptLayer.TestExecuteToolResponseResultStatus? Type519 { get; set; } + public global::System.Collections.Generic.IList? Type519 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponse? Type520 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant2Column? Type520 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponseClosure? Type521 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant3? Type521 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponseClosureStatus? Type522 { get; set; } + public global::PromptLayer.GetReportScoreResponseScoreDetailsVariant4? Type522 { get; set; } /// /// /// - public global::PromptLayer.CloseTraceResponse2? Type523 { get; set; } + public global::PromptLayer.ListDatasetsResponse? Type523 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type524 { get; set; } + /// + /// + /// + public global::PromptLayer.ListEvaluationsResponse? Type525 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type526 { get; set; } + /// + /// + /// + public global::PromptLayer.AnyOf? Type527 { get; set; } + /// + /// + /// + public global::PromptLayer.OneOf, object>? Type528 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type529 { get; set; } + /// + /// + /// + public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant12? Type530 { get; set; } + /// + /// + /// + public global::PromptLayer.OneOf, object>? Type531 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type532 { get; set; } + /// + /// + /// + public global::PromptLayer.GetWorkflowVersionExecutionResultsResponseVariant14? Type533 { get; set; } + /// + /// + /// + public global::PromptLayer.ListWorkflowsResponse? Type534 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type535 { get; set; } + /// + /// + /// + public global::PromptLayer.ListWorkflowsResponseItem? Type536 { get; set; } + /// + /// + /// + public global::PromptLayer.ListWorkflowsResponse2? Type537 { get; set; } + /// + /// + /// + public global::PromptLayer.ListWorkflowsResponse3? Type538 { get; set; } + /// + /// + /// + public global::PromptLayer.GetWorkflowResponse? Type539 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type540 { get; set; } + /// + /// + /// + public global::PromptLayer.GetWorkflowResponseNode? Type541 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type542 { get; set; } + /// + /// + /// + public global::PromptLayer.GetWorkflowResponseEdge? Type543 { get; set; } + /// + /// + /// + public global::PromptLayer.GetWorkflowLabelsResponse? Type544 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type545 { get; set; } + /// + /// + /// + public global::PromptLayer.GetWorkflowLabelsResponseReleaseLabel? Type546 { get; set; } + /// + /// + /// + public global::PromptLayer.AnyOf? Type547 { get; set; } + /// + /// + /// + public global::PromptLayer.IngestOtlpTracesResponse2? Type548 { get; set; } + /// + /// + /// + public global::PromptLayer.ListToolRegistriesResponse? Type549 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type550 { get; set; } + /// + /// + /// + public global::PromptLayer.ListToolRegistriesResponseToolRegistrie? Type551 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateToolRegistryResponse? Type552 { get; set; } + /// + /// + /// + public global::PromptLayer.GetToolRegistryResponse? Type553 { get; set; } + /// + /// + /// + public global::PromptLayer.GetToolRegistryResponseToolRegistry? Type554 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateTableResponse? Type555 { get; set; } + /// + /// + /// + public global::PromptLayer.ListTablesResponse? Type556 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type557 { get; set; } + /// + /// + /// + public global::PromptLayer.GetTableResponse? Type558 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateTableResponse? Type559 { get; set; } + /// + /// + /// + public global::PromptLayer.ListTableSheetsResponse? Type560 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type561 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateTableSheetResponse? Type562 { get; set; } + /// + /// + /// + public global::PromptLayer.GetTableSheetOperationResponse? Type563 { get; set; } + /// + /// + /// + public global::PromptLayer.GetTableSheetResponse? Type564 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateTableSheetResponse? Type565 { get; set; } + /// + /// + /// + public global::PromptLayer.ListTableSheetColumnsResponse? Type566 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type567 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateTableSheetColumnResponse? Type568 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type569 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateTableSheetColumnResponse? Type570 { get; set; } + /// + /// + /// + public global::PromptLayer.ListTableSheetRowsResponse? Type571 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type572 { get; set; } + /// + /// + /// + public global::PromptLayer.ListTableSheetRowsResponseDataItem? Type573 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type574 { get; set; } + /// + /// + /// + public global::PromptLayer.AddTableSheetRowsResponse? Type575 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type576 { get; set; } + /// + /// + /// + public global::PromptLayer.AddTableSheetRowsResponseRow? Type577 { get; set; } + /// + /// + /// + public global::PromptLayer.GetTableSheetCellResponse? Type578 { get; set; } + /// + /// + /// + public global::PromptLayer.UpdateTableSheetCellResponse? Type579 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse? Type580 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateTableSheetCellRecalculationResponse? Type581 { get; set; } + /// + /// + /// + public global::PromptLayer.CreateToolVersionResponse? Type582 { get; set; } + /// + /// + /// + public global::PromptLayer.TestExecuteToolResponse? Type583 { get; set; } + /// + /// + /// + public global::PromptLayer.TestExecuteToolResponseResult? Type584 { get; set; } + /// + /// + /// + public global::PromptLayer.TestExecuteToolResponseResultStatus? Type585 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponse? Type586 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponseClosure? Type587 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponseClosureStatus? Type588 { get; set; } + /// + /// + /// + public global::PromptLayer.CloseTraceResponse2? Type589 { get; set; } /// /// @@ -2377,50 +2641,86 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::PromptLayer.AnyOf>? ListType63 { get; set; } + public global::System.Collections.Generic.List? ListType63 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType64 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType65 { get; set; } + /// + /// + /// + public global::PromptLayer.AnyOf>? ListType66 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType67 { get; set; } + /// + /// + /// + public global::PromptLayer.OneOf>? ListType68 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType69 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType70 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType71 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType72 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType64 { get; set; } + public global::System.Collections.Generic.List? ListType73 { get; set; } /// /// /// - public global::PromptLayer.OneOf>? ListType65 { get; set; } + public global::System.Collections.Generic.List? ListType74 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType66 { get; set; } + public global::System.Collections.Generic.List? ListType75 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType67 { get; set; } + public global::System.Collections.Generic.List? ListType76 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType68 { get; set; } + public global::System.Collections.Generic.List? ListType77 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType69 { get; set; } + public global::System.Collections.Generic.List? ListType78 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType70 { get; set; } + public global::System.Collections.Generic.List? ListType79 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType71 { get; set; } + public global::System.Collections.Generic.List? ListType80 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType72 { get; set; } + public global::System.Collections.Generic.List? ListType81 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType73 { get; set; } + public global::System.Collections.Generic.List? ListType82 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType74 { get; set; } + public global::System.Collections.Generic.List? ListType83 { get; set; } } } \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequest.Json.g.cs new file mode 100644 index 0000000..c702624 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class AddTableSheetRowsRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.AddTableSheetRowsRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.AddTableSheetRowsRequest), + jsonSerializerContext) as global::PromptLayer.AddTableSheetRowsRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.AddTableSheetRowsRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.AddTableSheetRowsRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.AddTableSheetRowsRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequest.g.cs new file mode 100644 index 0000000..688ecc2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequest.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class AddTableSheetRowsRequest + { + /// + /// Number of rows to append (1–100).
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("count")] + public int? Count { get; set; } + + /// + /// Per-row initial values for text columns. Each element is a map of column_id → value. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("values")] + public global::System.Collections.Generic.IList? Values { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Number of rows to append (1–100).
+ /// Default Value: 1 + /// + /// + /// Per-row initial values for text columns. Each element is a map of column_id → value. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AddTableSheetRowsRequest( + int? count, + global::System.Collections.Generic.IList? values) + { + this.Count = count; + this.Values = values; + } + + /// + /// Initializes a new instance of the class. + /// + public AddTableSheetRowsRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequestValue.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequestValue.Json.g.cs new file mode 100644 index 0000000..c94523f --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequestValue.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class AddTableSheetRowsRequestValue + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.AddTableSheetRowsRequestValue? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.AddTableSheetRowsRequestValue), + jsonSerializerContext) as global::PromptLayer.AddTableSheetRowsRequestValue; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.AddTableSheetRowsRequestValue? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.AddTableSheetRowsRequestValue), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.AddTableSheetRowsRequestValue; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequestValue.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequestValue.g.cs new file mode 100644 index 0000000..029476a --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsRequestValue.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class AddTableSheetRowsRequestValue + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponse.Json.g.cs new file mode 100644 index 0000000..652d454 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class AddTableSheetRowsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.AddTableSheetRowsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.AddTableSheetRowsResponse), + jsonSerializerContext) as global::PromptLayer.AddTableSheetRowsResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.AddTableSheetRowsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.AddTableSheetRowsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.AddTableSheetRowsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponse.g.cs new file mode 100644 index 0000000..0c47283 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponse.g.cs @@ -0,0 +1,107 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class AddTableSheetRowsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rows_created")] + public int? RowsCreated { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_row_index")] + public int? StartRowIndex { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_indices")] + public global::System.Collections.Generic.IList? RowIndices { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rows")] + public global::System.Collections.Generic.IList? Rows { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cell_count")] + public int? CellCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_count")] + public int? RowCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AddTableSheetRowsResponse( + bool? success, + int? rowsCreated, + int? startRowIndex, + global::System.Collections.Generic.IList? rowIndices, + global::System.Collections.Generic.IList? rows, + int? cellCount, + int? rowCount, + int? version) + { + this.Success = success; + this.RowsCreated = rowsCreated; + this.StartRowIndex = startRowIndex; + this.RowIndices = rowIndices; + this.Rows = rows; + this.CellCount = cellCount; + this.RowCount = rowCount; + this.Version = version; + } + + /// + /// Initializes a new instance of the class. + /// + public AddTableSheetRowsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRow.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRow.Json.g.cs new file mode 100644 index 0000000..a9e16fe --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRow.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class AddTableSheetRowsResponseRow + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.AddTableSheetRowsResponseRow? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.AddTableSheetRowsResponseRow), + jsonSerializerContext) as global::PromptLayer.AddTableSheetRowsResponseRow; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.AddTableSheetRowsResponseRow? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.AddTableSheetRowsResponseRow), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.AddTableSheetRowsResponseRow; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRow.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRow.g.cs new file mode 100644 index 0000000..d65a672 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRow.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class AddTableSheetRowsResponseRow + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_index")] + public int? RowIndex { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cells")] + public global::System.Collections.Generic.Dictionary? Cells { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AddTableSheetRowsResponseRow( + int? rowIndex, + global::System.Collections.Generic.Dictionary? cells) + { + this.RowIndex = rowIndex; + this.Cells = cells; + } + + /// + /// Initializes a new instance of the class. + /// + public AddTableSheetRowsResponseRow() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRowCells.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRowCells.Json.g.cs new file mode 100644 index 0000000..1b793e3 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRowCells.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class AddTableSheetRowsResponseRowCells + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.AddTableSheetRowsResponseRowCells? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.AddTableSheetRowsResponseRowCells), + jsonSerializerContext) as global::PromptLayer.AddTableSheetRowsResponseRowCells; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.AddTableSheetRowsResponseRowCells? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.AddTableSheetRowsResponseRowCells), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.AddTableSheetRowsResponseRowCells; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRowCells.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRowCells.g.cs new file mode 100644 index 0000000..e805cf1 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.AddTableSheetRowsResponseRowCells.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class AddTableSheetRowsResponseRowCells + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Cell.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Cell.Json.g.cs new file mode 100644 index 0000000..8f43d3f --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Cell.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class Cell + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.Cell? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.Cell), + jsonSerializerContext) as global::PromptLayer.Cell; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.Cell? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.Cell), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.Cell; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Cell.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Cell.g.cs new file mode 100644 index 0000000..b727ddc --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Cell.g.cs @@ -0,0 +1,145 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// A single cell at the intersection of a column and a row. + /// + public sealed partial class Cell + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public global::System.Guid? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet_id")] + public global::System.Guid? SheetId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("column_id")] + public global::System.Guid? ColumnId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_index")] + public int? RowIndex { get; set; } + + /// + /// Current computation status of the cell. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.CellStatusJsonConverter))] + public global::PromptLayer.CellStatus? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("display_value")] + public string? DisplayValue { get; set; } + + /// + /// Structured cell value (type depends on column type). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + public object? Value { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { get; set; } + + /// + /// Hash of the inputs used to compute this cell, used for cache invalidation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_hash")] + public string? InputHash { get; set; } + + /// + /// ISO 8601 timestamp of the last update. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Execution metrics populated for prompt-template column cells. Present only when the cell has an associated request log. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_metrics")] + public global::PromptLayer.SmartTableRequestMetrics? RequestMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// Current computation status of the cell. + /// + /// + /// + /// Structured cell value (type depends on column type). + /// + /// + /// + /// Hash of the inputs used to compute this cell, used for cache invalidation. + /// + /// + /// ISO 8601 timestamp of the last update. + /// + /// + /// Execution metrics populated for prompt-template column cells. Present only when the cell has an associated request log. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Cell( + global::System.Guid? id, + global::System.Guid? sheetId, + global::System.Guid? columnId, + int? rowIndex, + global::PromptLayer.CellStatus? status, + string? displayValue, + object? value, + string? error, + string? inputHash, + global::System.DateTime? updatedAt, + global::PromptLayer.SmartTableRequestMetrics? requestMetrics) + { + this.Id = id; + this.SheetId = sheetId; + this.ColumnId = columnId; + this.RowIndex = rowIndex; + this.Status = status; + this.DisplayValue = displayValue; + this.Value = value; + this.Error = error; + this.InputHash = inputHash; + this.UpdatedAt = updatedAt; + this.RequestMetrics = requestMetrics; + } + + /// + /// Initializes a new instance of the class. + /// + public Cell() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CellStatus.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CellStatus.g.cs new file mode 100644 index 0000000..abda429 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CellStatus.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Current computation status of the cell. + /// + public enum CellStatus + { + /// + /// + /// + Cancelled, + /// + /// + /// + Completed, + /// + /// + /// + Error, + /// + /// + /// + Queued, + /// + /// + /// + Running, + /// + /// + /// + Stale, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CellStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CellStatus value) + { + return value switch + { + CellStatus.Cancelled => "cancelled", + CellStatus.Completed => "completed", + CellStatus.Error => "error", + CellStatus.Queued => "queued", + CellStatus.Running => "running", + CellStatus.Stale => "stale", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CellStatus? ToEnum(string value) + { + return value switch + { + "cancelled" => CellStatus.Cancelled, + "completed" => CellStatus.Completed, + "error" => CellStatus.Error, + "queued" => CellStatus.Queued, + "running" => CellStatus.Running, + "stale" => CellStatus.Stale, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CellValue.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CellValue.Json.g.cs new file mode 100644 index 0000000..5ca96ee --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CellValue.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CellValue + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CellValue? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CellValue), + jsonSerializerContext) as global::PromptLayer.CellValue; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CellValue? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CellValue), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CellValue; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CellValue.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CellValue.g.cs new file mode 100644 index 0000000..8b3d039 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CellValue.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Structured cell value (type depends on column type). + /// + public sealed partial class CellValue + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Column.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Column.Json.g.cs new file mode 100644 index 0000000..eca3a5f --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Column.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class Column + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.Column? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.Column), + jsonSerializerContext) as global::PromptLayer.Column; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.Column? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.Column), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.Column; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Column.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Column.g.cs new file mode 100644 index 0000000..d8ccdf7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Column.g.cs @@ -0,0 +1,120 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// A column within a Table sheet. + /// + public sealed partial class Column + { + /// + /// Unique identifier of the column. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public global::System.Guid? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet_id")] + public global::System.Guid? SheetId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// Display title of the column. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// Column type. 'text' columns store free-text; 'prompt_template', 'llm', 'code', 'score', 'comparison', and 'composition' columns run automated computations. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.ColumnTypeJsonConverter))] + public global::PromptLayer.ColumnType? Type { get; set; } + + /// + /// Type-specific configuration. Shape depends on the column type. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config")] + public object? Config { get; set; } + + /// + /// Fractional position rank used for ordering. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("position_rank")] + public double? PositionRank { get; set; } + + /// + /// Whether this column is designated as an output column. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_output_column")] + public bool? IsOutputColumn { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique identifier of the column. + /// + /// + /// + /// + /// Display title of the column. + /// + /// + /// Column type. 'text' columns store free-text; 'prompt_template', 'llm', 'code', 'score', 'comparison', and 'composition' columns run automated computations. + /// + /// + /// Type-specific configuration. Shape depends on the column type. + /// + /// + /// Fractional position rank used for ordering. + /// + /// + /// Whether this column is designated as an output column. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Column( + global::System.Guid? id, + global::System.Guid? sheetId, + int? workspaceId, + string? title, + global::PromptLayer.ColumnType? type, + object? config, + double? positionRank, + bool? isOutputColumn) + { + this.Id = id; + this.SheetId = sheetId; + this.WorkspaceId = workspaceId; + this.Title = title; + this.Type = type; + this.Config = config; + this.PositionRank = positionRank; + this.IsOutputColumn = isOutputColumn; + } + + /// + /// Initializes a new instance of the class. + /// + public Column() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnConfig.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnConfig.Json.g.cs new file mode 100644 index 0000000..b50e655 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ColumnConfig + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ColumnConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ColumnConfig), + jsonSerializerContext) as global::PromptLayer.ColumnConfig; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ColumnConfig? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ColumnConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ColumnConfig; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnConfig.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnConfig.g.cs new file mode 100644 index 0000000..6be9634 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnConfig.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Type-specific configuration. Shape depends on the column type. + /// + public sealed partial class ColumnConfig + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnType.g.cs new file mode 100644 index 0000000..83e09ce --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ColumnType.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Column type. 'text' columns store free-text; 'prompt_template', 'llm', 'code', 'score', 'comparison', and 'composition' columns run automated computations. + /// + public enum ColumnType + { + /// + /// + /// + Code, + /// + /// + /// + Comparison, + /// + /// + /// + Composition, + /// + /// + /// + Llm, + /// + /// + /// + PromptTemplate, + /// + /// + /// + Score, + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ColumnTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ColumnType value) + { + return value switch + { + ColumnType.Code => "code", + ColumnType.Comparison => "comparison", + ColumnType.Composition => "composition", + ColumnType.Llm => "llm", + ColumnType.PromptTemplate => "prompt_template", + ColumnType.Score => "score", + ColumnType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ColumnType? ToEnum(string value) + { + return value switch + { + "code" => ColumnType.Code, + "comparison" => ColumnType.Comparison, + "composition" => ColumnType.Composition, + "llm" => ColumnType.Llm, + "prompt_template" => ColumnType.PromptTemplate, + "score" => ColumnType.Score, + "text" => ColumnType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableRequest.Json.g.cs new file mode 100644 index 0000000..81419c2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableRequest), + jsonSerializerContext) as global::PromptLayer.CreateTableRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableRequest.g.cs new file mode 100644 index 0000000..8eabdaf --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableRequest.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableRequest + { + /// + /// Table title. Defaults to a unique 'Untitled Table' name if omitted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// Folder to place the table in. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] + public int? FolderId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Table title. Defaults to a unique 'Untitled Table' name if omitted. + /// + /// + /// Folder to place the table in. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableRequest( + string? title, + int? folderId) + { + this.Title = title; + this.FolderId = folderId; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableResponse.Json.g.cs new file mode 100644 index 0000000..9b1e5ad --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableResponse), + jsonSerializerContext) as global::PromptLayer.CreateTableResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableResponse.g.cs new file mode 100644 index 0000000..d3e4a24 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableResponse.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("table")] + public global::PromptLayer.TableDetail? Table { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableResponse( + bool? success, + string? message, + global::PromptLayer.TableDetail? table) + { + this.Success = success; + this.Message = message; + this.Table = table; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationResponse.Json.g.cs new file mode 100644 index 0000000..24037ba --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetCellRecalculationResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetCellRecalculationResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetCellRecalculationResponse), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetCellRecalculationResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetCellRecalculationResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetCellRecalculationResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetCellRecalculationResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationResponse.g.cs new file mode 100644 index 0000000..0f8f4b8 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationResponse.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetCellRecalculationResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution_id")] + public string? ExecutionId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cell_count")] + public int? CellCount { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetCellRecalculationResponse( + bool? success, + string? executionId, + int? cellCount) + { + this.Success = success; + this.ExecutionId = executionId; + this.CellCount = cellCount; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetCellRecalculationResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchRequest.Json.g.cs new file mode 100644 index 0000000..81ed1a5 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetCellRecalculationsBatchRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchRequest.g.cs new file mode 100644 index 0000000..a2e426e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchRequest.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetCellRecalculationsBatchRequest + { + /// + /// List of cell IDs to recalculate. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cell_ids")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList CellIds { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// List of cell IDs to recalculate. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetCellRecalculationsBatchRequest( + global::System.Collections.Generic.IList cellIds) + { + this.CellIds = cellIds ?? throw new global::System.ArgumentNullException(nameof(cellIds)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetCellRecalculationsBatchRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchResponse.Json.g.cs new file mode 100644 index 0000000..0c00e96 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetCellRecalculationsBatchResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchResponse.g.cs new file mode 100644 index 0000000..2dfbb54 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetCellRecalculationsBatchResponse.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetCellRecalculationsBatchResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution_id")] + public string? ExecutionId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cell_count")] + public int? CellCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("selected_cell_count")] + public int? SelectedCellCount { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetCellRecalculationsBatchResponse( + bool? success, + string? executionId, + int? cellCount, + int? selectedCellCount) + { + this.Success = success; + this.ExecutionId = executionId; + this.CellCount = cellCount; + this.SelectedCellCount = selectedCellCount; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetCellRecalculationsBatchResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequest.Json.g.cs new file mode 100644 index 0000000..7f6c33d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetColumnRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetColumnRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetColumnRequest), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetColumnRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetColumnRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetColumnRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetColumnRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequest.g.cs new file mode 100644 index 0000000..7da2874 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequest.g.cs @@ -0,0 +1,78 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetColumnRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.CreateTableSheetColumnRequestTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::PromptLayer.CreateTableSheetColumnRequestType Type { get; set; } + + /// + /// Type-specific column configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config")] + public object? Config { get; set; } + + /// + /// Column dependency edges for non-text columns. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dependencies")] + public global::System.Collections.Generic.IList? Dependencies { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// Type-specific column configuration. + /// + /// + /// Column dependency edges for non-text columns. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetColumnRequest( + string title, + global::PromptLayer.CreateTableSheetColumnRequestType type, + object? config, + global::System.Collections.Generic.IList? dependencies) + { + this.Title = title ?? throw new global::System.ArgumentNullException(nameof(title)); + this.Type = type; + this.Config = config; + this.Dependencies = dependencies; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetColumnRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestConfig.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestConfig.Json.g.cs new file mode 100644 index 0000000..fd27f0b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetColumnRequestConfig + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetColumnRequestConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetColumnRequestConfig), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetColumnRequestConfig; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetColumnRequestConfig? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetColumnRequestConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetColumnRequestConfig; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestConfig.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestConfig.g.cs new file mode 100644 index 0000000..18e55cd --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestConfig.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Type-specific column configuration. + /// + public sealed partial class CreateTableSheetColumnRequestConfig + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencie.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencie.Json.g.cs new file mode 100644 index 0000000..3a75c27 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencie.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetColumnRequestDependencie + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetColumnRequestDependencie? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetColumnRequestDependencie), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetColumnRequestDependencie; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetColumnRequestDependencie? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetColumnRequestDependencie), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetColumnRequestDependencie; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencie.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencie.g.cs new file mode 100644 index 0000000..2f1f752 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencie.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetColumnRequestDependencie + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("column_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid ColumnId { get; set; } + + /// + /// Default Value: value + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reference_type")] + public string? ReferenceType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config_meta")] + public object? ConfigMeta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Default Value: value + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetColumnRequestDependencie( + global::System.Guid columnId, + string? referenceType, + string? configKey, + object? configMeta) + { + this.ColumnId = columnId; + this.ReferenceType = referenceType; + this.ConfigKey = configKey; + this.ConfigMeta = configMeta; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetColumnRequestDependencie() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencieConfigMeta.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencieConfigMeta.Json.g.cs new file mode 100644 index 0000000..00a0432 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencieConfigMeta.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetColumnRequestDependencieConfigMeta + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetColumnRequestDependencieConfigMeta? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetColumnRequestDependencieConfigMeta), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetColumnRequestDependencieConfigMeta; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetColumnRequestDependencieConfigMeta? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetColumnRequestDependencieConfigMeta), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetColumnRequestDependencieConfigMeta; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencieConfigMeta.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencieConfigMeta.g.cs new file mode 100644 index 0000000..683b539 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestDependencieConfigMeta.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetColumnRequestDependencieConfigMeta + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestType.g.cs new file mode 100644 index 0000000..2160be6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnRequestType.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public enum CreateTableSheetColumnRequestType + { + /// + /// + /// + Code, + /// + /// + /// + Comparison, + /// + /// + /// + Composition, + /// + /// + /// + Llm, + /// + /// + /// + PromptTemplate, + /// + /// + /// + Score, + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateTableSheetColumnRequestTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateTableSheetColumnRequestType value) + { + return value switch + { + CreateTableSheetColumnRequestType.Code => "code", + CreateTableSheetColumnRequestType.Comparison => "comparison", + CreateTableSheetColumnRequestType.Composition => "composition", + CreateTableSheetColumnRequestType.Llm => "llm", + CreateTableSheetColumnRequestType.PromptTemplate => "prompt_template", + CreateTableSheetColumnRequestType.Score => "score", + CreateTableSheetColumnRequestType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateTableSheetColumnRequestType? ToEnum(string value) + { + return value switch + { + "code" => CreateTableSheetColumnRequestType.Code, + "comparison" => CreateTableSheetColumnRequestType.Comparison, + "composition" => CreateTableSheetColumnRequestType.Composition, + "llm" => CreateTableSheetColumnRequestType.Llm, + "prompt_template" => CreateTableSheetColumnRequestType.PromptTemplate, + "score" => CreateTableSheetColumnRequestType.Score, + "text" => CreateTableSheetColumnRequestType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnResponse.Json.g.cs new file mode 100644 index 0000000..7a8c524 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetColumnResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetColumnResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetColumnResponse), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetColumnResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetColumnResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetColumnResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetColumnResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnResponse.g.cs new file mode 100644 index 0000000..d38fb5a --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetColumnResponse.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetColumnResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// A column within a Table sheet. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("column")] + public global::PromptLayer.Column? Column { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cells")] + public global::System.Collections.Generic.IList? Cells { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// A column within a Table sheet. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetColumnResponse( + bool? success, + global::PromptLayer.Column? column, + global::System.Collections.Generic.IList? cells, + int? version) + { + this.Success = success; + this.Column = column; + this.Cells = cells; + this.Version = version; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetColumnResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequest.Json.g.cs new file mode 100644 index 0000000..823e0cd --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetRequest), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequest.g.cs new file mode 100644 index 0000000..7a71cac --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequest.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetRequest + { + /// + /// Sheet title. Defaults to the source file name or 'Request Logs'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// Display position within the table (0-based). Defaults to appending at the end. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int? Index { get; set; } + + /// + /// Optional idempotency key for the import operation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation_id")] + public string? OperationId { get; set; } + + /// + /// Data source for the sheet. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::PromptLayer.OneOf Source { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Data source for the sheet. + /// + /// + /// Sheet title. Defaults to the source file name or 'Request Logs'. + /// + /// + /// Display position within the table (0-based). Defaults to appending at the end. + /// + /// + /// Optional idempotency key for the import operation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetRequest( + global::PromptLayer.OneOf source, + string? title, + int? index, + string? operationId) + { + this.Title = title; + this.Index = index; + this.OperationId = operationId; + this.Source = source; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSource.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSource.Json.g.cs new file mode 100644 index 0000000..311d7da --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetRequestSourceFileSource + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetRequestSourceFileSource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetRequestSourceFileSource), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetRequestSourceFileSource; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetRequestSourceFileSource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetRequestSourceFileSource), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetRequestSourceFileSource; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSource.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSource.g.cs new file mode 100644 index 0000000..2f90530 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSource.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetRequestSourceFileSource + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceFileSourceTypeJsonConverter))] + public global::PromptLayer.CreateTableSheetRequestSourceFileSourceType Type { get; set; } + + /// + /// Original file name (must end in .csv or .json). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileName { get; set; } + + /// + /// Base64-encoded file content (max 100 MB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_content_base64")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileContentBase64 { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Original file name (must end in .csv or .json). + /// + /// + /// Base64-encoded file content (max 100 MB). + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetRequestSourceFileSource( + string fileName, + string fileContentBase64, + global::PromptLayer.CreateTableSheetRequestSourceFileSourceType type) + { + this.Type = type; + this.FileName = fileName ?? throw new global::System.ArgumentNullException(nameof(fileName)); + this.FileContentBase64 = fileContentBase64 ?? throw new global::System.ArgumentNullException(nameof(fileContentBase64)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetRequestSourceFileSource() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSourceType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSourceType.g.cs new file mode 100644 index 0000000..a22f68c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceFileSourceType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public enum CreateTableSheetRequestSourceFileSourceType + { + /// + /// + /// + File, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateTableSheetRequestSourceFileSourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateTableSheetRequestSourceFileSourceType value) + { + return value switch + { + CreateTableSheetRequestSourceFileSourceType.File => "file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateTableSheetRequestSourceFileSourceType? ToEnum(string value) + { + return value switch + { + "file" => CreateTableSheetRequestSourceFileSourceType.File, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSource.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSource.Json.g.cs new file mode 100644 index 0000000..8497f48 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetRequestSourceRequestLogsSource + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSource; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSource.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSource.g.cs new file mode 100644 index 0000000..140b547 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSource.g.cs @@ -0,0 +1,101 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetRequestSourceRequestLogsSource + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.CreateTableSheetRequestSourceRequestLogsSourceTypeJsonConverter))] + public global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType Type { get; set; } + + /// + /// Specific request log IDs to import. When omitted, filter params are used. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_log_ids")] + public global::System.Collections.Generic.IList? RequestLogIds { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_id")] + public int? PromptId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_version_id")] + public int? PromptVersionId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_label_id")] + public int? PromptLabelId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] + public global::System.DateTime? StartTime { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] + public global::System.DateTime? EndTime { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Specific request log IDs to import. When omitted, filter params are used. + /// + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetRequestSourceRequestLogsSource( + global::PromptLayer.CreateTableSheetRequestSourceRequestLogsSourceType type, + global::System.Collections.Generic.IList? requestLogIds, + int? promptId, + int? promptVersionId, + int? promptLabelId, + global::System.DateTime? startTime, + global::System.DateTime? endTime) + { + this.Type = type; + this.RequestLogIds = requestLogIds; + this.PromptId = promptId; + this.PromptVersionId = promptVersionId; + this.PromptLabelId = promptLabelId; + this.StartTime = startTime; + this.EndTime = endTime; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetRequestSourceRequestLogsSource() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSourceType.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSourceType.g.cs new file mode 100644 index 0000000..4768c16 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetRequestSourceRequestLogsSourceType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public enum CreateTableSheetRequestSourceRequestLogsSourceType + { + /// + /// + /// + RequestLogs, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateTableSheetRequestSourceRequestLogsSourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateTableSheetRequestSourceRequestLogsSourceType value) + { + return value switch + { + CreateTableSheetRequestSourceRequestLogsSourceType.RequestLogs => "request_logs", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateTableSheetRequestSourceRequestLogsSourceType? ToEnum(string value) + { + return value switch + { + "request_logs" => CreateTableSheetRequestSourceRequestLogsSourceType.RequestLogs, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetResponse.Json.g.cs new file mode 100644 index 0000000..22f0f30 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class CreateTableSheetResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.CreateTableSheetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.CreateTableSheetResponse), + jsonSerializerContext) as global::PromptLayer.CreateTableSheetResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.CreateTableSheetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.CreateTableSheetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.CreateTableSheetResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetResponse.g.cs new file mode 100644 index 0000000..c3282aa --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.CreateTableSheetResponse.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class CreateTableSheetResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation_id")] + public string? OperationId { get; set; } + + /// + /// Status of an asynchronous sheet import operation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + public global::PromptLayer.TableImportOperation? Operation { get; set; } + + /// + /// A sheet within a Table. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet")] + public global::PromptLayer.Sheet? Sheet { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// Status of an asynchronous sheet import operation. + /// + /// + /// A sheet within a Table. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTableSheetResponse( + bool? success, + string? message, + string? operationId, + global::PromptLayer.TableImportOperation? operation, + global::PromptLayer.Sheet? sheet) + { + this.Success = success; + this.Message = message; + this.OperationId = operationId; + this.Operation = operation; + this.Sheet = sheet; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTableSheetResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregates.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregates.Json.g.cs new file mode 100644 index 0000000..75e13a7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregates.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ExecutionMetadataAggregates + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ExecutionMetadataAggregates? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ExecutionMetadataAggregates), + jsonSerializerContext) as global::PromptLayer.ExecutionMetadataAggregates; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ExecutionMetadataAggregates? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ExecutionMetadataAggregates), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ExecutionMetadataAggregates; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregates.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregates.g.cs new file mode 100644 index 0000000..bf1b216 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregates.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Sheet-level and per-column aggregates for execution metrics (price and latency) across all prompt-template columns. + /// + public sealed partial class ExecutionMetadataAggregates + { + /// + /// Per-column aggregates keyed by the system-managed metadata column ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("by_column_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary ByColumnId { get; set; } + + /// + /// Sheet-wide aggregates rolled up across all prompt-template columns. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::PromptLayer.ExecutionMetadataAggregatesSheet Sheet { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Per-column aggregates keyed by the system-managed metadata column ID. + /// + /// + /// Sheet-wide aggregates rolled up across all prompt-template columns. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ExecutionMetadataAggregates( + global::System.Collections.Generic.Dictionary byColumnId, + global::PromptLayer.ExecutionMetadataAggregatesSheet sheet) + { + this.ByColumnId = byColumnId ?? throw new global::System.ArgumentNullException(nameof(byColumnId)); + this.Sheet = sheet ?? throw new global::System.ArgumentNullException(nameof(sheet)); + } + + /// + /// Initializes a new instance of the class. + /// + public ExecutionMetadataAggregates() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesByColumnId.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesByColumnId.Json.g.cs new file mode 100644 index 0000000..35e7ea2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesByColumnId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ExecutionMetadataAggregatesByColumnId + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ExecutionMetadataAggregatesByColumnId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ExecutionMetadataAggregatesByColumnId), + jsonSerializerContext) as global::PromptLayer.ExecutionMetadataAggregatesByColumnId; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ExecutionMetadataAggregatesByColumnId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ExecutionMetadataAggregatesByColumnId), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ExecutionMetadataAggregatesByColumnId; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesByColumnId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesByColumnId.g.cs new file mode 100644 index 0000000..05ed7fa --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesByColumnId.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Per-column aggregates keyed by the system-managed metadata column ID. + /// + public sealed partial class ExecutionMetadataAggregatesByColumnId + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheet.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheet.Json.g.cs new file mode 100644 index 0000000..99559c5 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheet.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ExecutionMetadataAggregatesSheet + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ExecutionMetadataAggregatesSheet? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ExecutionMetadataAggregatesSheet), + jsonSerializerContext) as global::PromptLayer.ExecutionMetadataAggregatesSheet; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ExecutionMetadataAggregatesSheet? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ExecutionMetadataAggregatesSheet), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ExecutionMetadataAggregatesSheet; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheet.g.cs new file mode 100644 index 0000000..e5c284b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheet.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Sheet-wide aggregates rolled up across all prompt-template columns. + /// + public sealed partial class ExecutionMetadataAggregatesSheet + { + /// + /// Aggregates keyed by metric key (`price`, `latency_ms`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("by_metric")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary ByMetric { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Aggregates keyed by metric key (`price`, `latency_ms`). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ExecutionMetadataAggregatesSheet( + global::System.Collections.Generic.Dictionary byMetric) + { + this.ByMetric = byMetric ?? throw new global::System.ArgumentNullException(nameof(byMetric)); + } + + /// + /// Initializes a new instance of the class. + /// + public ExecutionMetadataAggregatesSheet() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheetByMetric.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheetByMetric.Json.g.cs new file mode 100644 index 0000000..56e88e6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheetByMetric.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ExecutionMetadataAggregatesSheetByMetric + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ExecutionMetadataAggregatesSheetByMetric? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ExecutionMetadataAggregatesSheetByMetric), + jsonSerializerContext) as global::PromptLayer.ExecutionMetadataAggregatesSheetByMetric; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ExecutionMetadataAggregatesSheetByMetric? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ExecutionMetadataAggregatesSheetByMetric), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ExecutionMetadataAggregatesSheetByMetric; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheetByMetric.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheetByMetric.g.cs new file mode 100644 index 0000000..dcf28cc --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataAggregatesSheetByMetric.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Aggregates keyed by metric key (`price`, `latency_ms`). + /// + public sealed partial class ExecutionMetadataAggregatesSheetByMetric + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregate.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregate.Json.g.cs new file mode 100644 index 0000000..82db0cb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregate.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ExecutionMetadataMetricAggregate + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ExecutionMetadataMetricAggregate? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ExecutionMetadataMetricAggregate), + jsonSerializerContext) as global::PromptLayer.ExecutionMetadataMetricAggregate; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ExecutionMetadataMetricAggregate? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ExecutionMetadataMetricAggregate), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ExecutionMetadataMetricAggregate; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregate.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregate.g.cs new file mode 100644 index 0000000..9082eeb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregate.g.cs @@ -0,0 +1,138 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Aggregated statistics for a single execution metric (e.g. price or latency) across all rows in a sheet. + /// + public sealed partial class ExecutionMetadataMetricAggregate + { + /// + /// Internal metric identifier. One of `price` or `latency_ms`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metric_key")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.ExecutionMetadataMetricAggregateMetricKeyJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey MetricKey { get; set; } + + /// + /// Human-readable label for the metric. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metric_label")] + public string? MetricLabel { get; set; } + + /// + /// Number of rows that have a value for this metric. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("count")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Count { get; set; } + + /// + /// Sum of all metric values. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sum")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Sum { get; set; } + + /// + /// Average metric value, or null if count is 0. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("avg")] + public double? Avg { get; set; } + + /// + /// Minimum metric value, or null if count is 0. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("min")] + public double? Min { get; set; } + + /// + /// Maximum metric value, or null if count is 0. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max")] + public double? Max { get; set; } + + /// + /// ID of the system-managed metadata column for this metric. Omitted for sheet-level aggregates. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("column_id")] + public global::System.Guid? ColumnId { get; set; } + + /// + /// ID of the prompt-template source column. Omitted for sheet-level aggregates. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source_column_id")] + public global::System.Guid? SourceColumnId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Internal metric identifier. One of `price` or `latency_ms`. + /// + /// + /// Number of rows that have a value for this metric. + /// + /// + /// Sum of all metric values. + /// + /// + /// Human-readable label for the metric. + /// + /// + /// Average metric value, or null if count is 0. + /// + /// + /// Minimum metric value, or null if count is 0. + /// + /// + /// Maximum metric value, or null if count is 0. + /// + /// + /// ID of the system-managed metadata column for this metric. Omitted for sheet-level aggregates. + /// + /// + /// ID of the prompt-template source column. Omitted for sheet-level aggregates. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ExecutionMetadataMetricAggregate( + global::PromptLayer.ExecutionMetadataMetricAggregateMetricKey metricKey, + int count, + double sum, + string? metricLabel, + double? avg, + double? min, + double? max, + global::System.Guid? columnId, + global::System.Guid? sourceColumnId) + { + this.MetricKey = metricKey; + this.MetricLabel = metricLabel; + this.Count = count; + this.Sum = sum; + this.Avg = avg; + this.Min = min; + this.Max = max; + this.ColumnId = columnId; + this.SourceColumnId = sourceColumnId; + } + + /// + /// Initializes a new instance of the class. + /// + public ExecutionMetadataMetricAggregate() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregateMetricKey.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregateMetricKey.g.cs new file mode 100644 index 0000000..859138b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ExecutionMetadataMetricAggregateMetricKey.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Internal metric identifier. One of `price` or `latency_ms`. + /// + public enum ExecutionMetadataMetricAggregateMetricKey + { + /// + /// + /// + LatencyMs, + /// + /// + /// + Price, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ExecutionMetadataMetricAggregateMetricKeyExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ExecutionMetadataMetricAggregateMetricKey value) + { + return value switch + { + ExecutionMetadataMetricAggregateMetricKey.LatencyMs => "latency_ms", + ExecutionMetadataMetricAggregateMetricKey.Price => "price", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ExecutionMetadataMetricAggregateMetricKey? ToEnum(string value) + { + return value switch + { + "latency_ms" => ExecutionMetadataMetricAggregateMetricKey.LatencyMs, + "price" => ExecutionMetadataMetricAggregateMetricKey.Price, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableResponse.Json.g.cs new file mode 100644 index 0000000..c2ced1e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class GetTableResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.GetTableResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.GetTableResponse), + jsonSerializerContext) as global::PromptLayer.GetTableResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.GetTableResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.GetTableResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.GetTableResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableResponse.g.cs new file mode 100644 index 0000000..58f1b50 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class GetTableResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("table")] + public global::PromptLayer.TableDetail? Table { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetTableResponse( + bool? success, + global::PromptLayer.TableDetail? table) + { + this.Success = success; + this.Table = table; + } + + /// + /// Initializes a new instance of the class. + /// + public GetTableResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetCellResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetCellResponse.Json.g.cs new file mode 100644 index 0000000..d9905ac --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetCellResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class GetTableSheetCellResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.GetTableSheetCellResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.GetTableSheetCellResponse), + jsonSerializerContext) as global::PromptLayer.GetTableSheetCellResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.GetTableSheetCellResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.GetTableSheetCellResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.GetTableSheetCellResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetCellResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetCellResponse.g.cs new file mode 100644 index 0000000..2173816 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetCellResponse.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class GetTableSheetCellResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// A single cell at the intersection of a column and a row. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cell")] + public global::PromptLayer.Cell? Cell { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// A single cell at the intersection of a column and a row. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetTableSheetCellResponse( + bool? success, + global::PromptLayer.Cell? cell) + { + this.Success = success; + this.Cell = cell; + } + + /// + /// Initializes a new instance of the class. + /// + public GetTableSheetCellResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetOperationResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetOperationResponse.Json.g.cs new file mode 100644 index 0000000..9095c3a --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetOperationResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class GetTableSheetOperationResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.GetTableSheetOperationResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.GetTableSheetOperationResponse), + jsonSerializerContext) as global::PromptLayer.GetTableSheetOperationResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.GetTableSheetOperationResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.GetTableSheetOperationResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.GetTableSheetOperationResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetOperationResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetOperationResponse.g.cs new file mode 100644 index 0000000..e221dfd --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetOperationResponse.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class GetTableSheetOperationResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// Status of an asynchronous sheet import operation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + public global::PromptLayer.TableImportOperation? Operation { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Status of an asynchronous sheet import operation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetTableSheetOperationResponse( + bool? success, + global::PromptLayer.TableImportOperation? operation) + { + this.Success = success; + this.Operation = operation; + } + + /// + /// Initializes a new instance of the class. + /// + public GetTableSheetOperationResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetResponse.Json.g.cs new file mode 100644 index 0000000..20e69ab --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class GetTableSheetResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.GetTableSheetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.GetTableSheetResponse), + jsonSerializerContext) as global::PromptLayer.GetTableSheetResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.GetTableSheetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.GetTableSheetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.GetTableSheetResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetResponse.g.cs new file mode 100644 index 0000000..c62374b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.GetTableSheetResponse.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class GetTableSheetResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// A sheet within a Table. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet")] + public global::PromptLayer.Sheet? Sheet { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// A sheet within a Table. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetTableSheetResponse( + bool? success, + global::PromptLayer.Sheet? sheet) + { + this.Success = success; + this.Sheet = sheet; + } + + /// + /// Initializes a new instance of the class. + /// + public GetTableSheetResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetColumnsResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetColumnsResponse.Json.g.cs new file mode 100644 index 0000000..fae3bcb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetColumnsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListTableSheetColumnsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListTableSheetColumnsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListTableSheetColumnsResponse), + jsonSerializerContext) as global::PromptLayer.ListTableSheetColumnsResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ListTableSheetColumnsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListTableSheetColumnsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListTableSheetColumnsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetColumnsResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetColumnsResponse.g.cs new file mode 100644 index 0000000..970513b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetColumnsResponse.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListTableSheetColumnsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::System.Collections.Generic.IList? Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_cursor")] + public string? NextCursor { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool? HasMore { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListTableSheetColumnsResponse( + global::System.Collections.Generic.IList? data, + string? nextCursor, + bool? hasMore) + { + this.Data = data; + this.NextCursor = nextCursor; + this.HasMore = hasMore; + } + + /// + /// Initializes a new instance of the class. + /// + public ListTableSheetColumnsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsOrder.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsOrder.g.cs new file mode 100644 index 0000000..3239acc --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Default Value: asc + /// + public enum ListTableSheetRowsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListTableSheetRowsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListTableSheetRowsOrder value) + { + return value switch + { + ListTableSheetRowsOrder.Asc => "asc", + ListTableSheetRowsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListTableSheetRowsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListTableSheetRowsOrder.Asc, + "desc" => ListTableSheetRowsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponse.Json.g.cs new file mode 100644 index 0000000..395dd34 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListTableSheetRowsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListTableSheetRowsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListTableSheetRowsResponse), + jsonSerializerContext) as global::PromptLayer.ListTableSheetRowsResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ListTableSheetRowsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListTableSheetRowsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListTableSheetRowsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponse.g.cs new file mode 100644 index 0000000..776ce4a --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponse.g.cs @@ -0,0 +1,102 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListTableSheetRowsResponse + { + /// + /// Each item represents one row. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::System.Collections.Generic.IList? Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_cursor")] + public string? NextCursor { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool? HasMore { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_count")] + public int? RowCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("columns")] + public global::System.Collections.Generic.IList? Columns { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + + /// + /// Sheet-level and per-column aggregates for price and latency metrics. Only present when `include_execution_metadata_aggregates=true`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution_metadata_aggregates")] + public global::PromptLayer.ExecutionMetadataAggregates? ExecutionMetadataAggregates { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Each item represents one row. + /// + /// + /// + /// + /// + /// + /// + /// Sheet-level and per-column aggregates for price and latency metrics. Only present when `include_execution_metadata_aggregates=true`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListTableSheetRowsResponse( + global::System.Collections.Generic.IList? data, + string? nextCursor, + bool? hasMore, + int? rowCount, + global::System.Collections.Generic.IList? columns, + int? version, + global::PromptLayer.ExecutionMetadataAggregates? executionMetadataAggregates) + { + this.Data = data; + this.NextCursor = nextCursor; + this.HasMore = hasMore; + this.RowCount = rowCount; + this.Columns = columns; + this.Version = version; + this.ExecutionMetadataAggregates = executionMetadataAggregates; + } + + /// + /// Initializes a new instance of the class. + /// + public ListTableSheetRowsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItem.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItem.Json.g.cs new file mode 100644 index 0000000..3c1ae2b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListTableSheetRowsResponseDataItem + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListTableSheetRowsResponseDataItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListTableSheetRowsResponseDataItem), + jsonSerializerContext) as global::PromptLayer.ListTableSheetRowsResponseDataItem; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ListTableSheetRowsResponseDataItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListTableSheetRowsResponseDataItem), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListTableSheetRowsResponseDataItem; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItem.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItem.g.cs new file mode 100644 index 0000000..c73c110 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItem.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListTableSheetRowsResponseDataItem + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_index")] + public int? RowIndex { get; set; } + + /// + /// Map of column_id (UUID string) → cell object. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cells")] + public global::System.Collections.Generic.Dictionary? Cells { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Map of column_id (UUID string) → cell object. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListTableSheetRowsResponseDataItem( + int? rowIndex, + global::System.Collections.Generic.Dictionary? cells) + { + this.RowIndex = rowIndex; + this.Cells = cells; + } + + /// + /// Initializes a new instance of the class. + /// + public ListTableSheetRowsResponseDataItem() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItemCells.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItemCells.Json.g.cs new file mode 100644 index 0000000..c5acd75 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItemCells.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListTableSheetRowsResponseDataItemCells + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListTableSheetRowsResponseDataItemCells? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListTableSheetRowsResponseDataItemCells), + jsonSerializerContext) as global::PromptLayer.ListTableSheetRowsResponseDataItemCells; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ListTableSheetRowsResponseDataItemCells? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListTableSheetRowsResponseDataItemCells), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListTableSheetRowsResponseDataItemCells; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItemCells.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItemCells.g.cs new file mode 100644 index 0000000..e40c574 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetRowsResponseDataItemCells.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Map of column_id (UUID string) → cell object. + /// + public sealed partial class ListTableSheetRowsResponseDataItemCells + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsOrder.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsOrder.g.cs new file mode 100644 index 0000000..9a71715 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Default Value: asc + /// + public enum ListTableSheetsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListTableSheetsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListTableSheetsOrder value) + { + return value switch + { + ListTableSheetsOrder.Asc => "asc", + ListTableSheetsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListTableSheetsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListTableSheetsOrder.Asc, + "desc" => ListTableSheetsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsResponse.Json.g.cs new file mode 100644 index 0000000..d8d8b20 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListTableSheetsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListTableSheetsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListTableSheetsResponse), + jsonSerializerContext) as global::PromptLayer.ListTableSheetsResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ListTableSheetsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListTableSheetsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListTableSheetsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsResponse.g.cs new file mode 100644 index 0000000..2c9d000 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTableSheetsResponse.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListTableSheetsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::System.Collections.Generic.IList? Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_cursor")] + public string? NextCursor { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool? HasMore { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListTableSheetsResponse( + global::System.Collections.Generic.IList? data, + string? nextCursor, + bool? hasMore) + { + this.Data = data; + this.NextCursor = nextCursor; + this.HasMore = hasMore; + } + + /// + /// Initializes a new instance of the class. + /// + public ListTableSheetsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesOrder.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesOrder.g.cs new file mode 100644 index 0000000..efbccc6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Default Value: desc + /// + public enum ListTablesOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListTablesOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListTablesOrder value) + { + return value switch + { + ListTablesOrder.Asc => "asc", + ListTablesOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListTablesOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListTablesOrder.Asc, + "desc" => ListTablesOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesResponse.Json.g.cs new file mode 100644 index 0000000..9258a92 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class ListTablesResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.ListTablesResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.ListTablesResponse), + jsonSerializerContext) as global::PromptLayer.ListTablesResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.ListTablesResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.ListTablesResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.ListTablesResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesResponse.g.cs new file mode 100644 index 0000000..2e0fc74 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.ListTablesResponse.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class ListTablesResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::System.Collections.Generic.IList? Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_cursor")] + public string? NextCursor { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool? HasMore { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListTablesResponse( + global::System.Collections.Generic.IList? data, + string? nextCursor, + bool? hasMore) + { + this.Data = data; + this.NextCursor = nextCursor; + this.HasMore = hasMore; + } + + /// + /// Initializes a new instance of the class. + /// + public ListTablesResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Sheet.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Sheet.Json.g.cs new file mode 100644 index 0000000..7a11637 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Sheet.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class Sheet + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.Sheet? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.Sheet), + jsonSerializerContext) as global::PromptLayer.Sheet; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.Sheet? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.Sheet), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.Sheet; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Sheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Sheet.g.cs new file mode 100644 index 0000000..e2f3b82 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Sheet.g.cs @@ -0,0 +1,118 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// A sheet within a Table. + /// + public sealed partial class Sheet + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public global::System.Guid? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("table_id")] + public global::System.Guid? TableId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// Display order of the sheet within the table (0-based). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int? Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_count")] + public int? RowCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version_count")] + public int? VersionCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// Display order of the sheet within the table (0-based). + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Sheet( + global::System.Guid? id, + global::System.Guid? tableId, + int? workspaceId, + string? title, + int? index, + int? rowCount, + int? versionCount, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt) + { + this.Id = id; + this.TableId = tableId; + this.WorkspaceId = workspaceId; + this.Title = title; + this.Index = index; + this.RowCount = rowCount; + this.VersionCount = versionCount; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Initializes a new instance of the class. + /// + public Sheet() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.SmartTableRequestMetrics.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.SmartTableRequestMetrics.Json.g.cs new file mode 100644 index 0000000..4b423e0 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.SmartTableRequestMetrics.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class SmartTableRequestMetrics + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.SmartTableRequestMetrics? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.SmartTableRequestMetrics), + jsonSerializerContext) as global::PromptLayer.SmartTableRequestMetrics; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.SmartTableRequestMetrics? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.SmartTableRequestMetrics), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.SmartTableRequestMetrics; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.SmartTableRequestMetrics.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.SmartTableRequestMetrics.g.cs new file mode 100644 index 0000000..9cdc5e7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.SmartTableRequestMetrics.g.cs @@ -0,0 +1,112 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Execution metrics for a prompt-template cell, derived from the underlying request log. + /// + public sealed partial class SmartTableRequestMetrics + { + /// + /// Number of LLM requests made to produce this cell's value. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_count")] + public int? RequestCount { get; set; } + + /// + /// IDs of the request logs associated with this cell. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_ids")] + public global::System.Collections.Generic.IList? RequestIds { get; set; } + + /// + /// Total end-to-end latency in milliseconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("latency_ms")] + public int? LatencyMs { get; set; } + + /// + /// Total cost in USD for all requests that produced this cell. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("price")] + public double? Price { get; set; } + + /// + /// Total number of input tokens across all requests. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + public int? InputTokens { get; set; } + + /// + /// Total number of output tokens across all requests. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] + public int? OutputTokens { get; set; } + + /// + /// Trace IDs linked to this cell (present when the cell was produced via an OpenTelemetry-traced workflow). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("trace_ids")] + public global::System.Collections.Generic.IList? TraceIds { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Number of LLM requests made to produce this cell's value. + /// + /// + /// IDs of the request logs associated with this cell. + /// + /// + /// Total end-to-end latency in milliseconds. + /// + /// + /// Total cost in USD for all requests that produced this cell. + /// + /// + /// Total number of input tokens across all requests. + /// + /// + /// Total number of output tokens across all requests. + /// + /// + /// Trace IDs linked to this cell (present when the cell was produced via an OpenTelemetry-traced workflow). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SmartTableRequestMetrics( + int? requestCount, + global::System.Collections.Generic.IList? requestIds, + int? latencyMs, + double? price, + int? inputTokens, + int? outputTokens, + global::System.Collections.Generic.IList? traceIds) + { + this.RequestCount = requestCount; + this.RequestIds = requestIds; + this.LatencyMs = latencyMs; + this.Price = price; + this.InputTokens = inputTokens; + this.OutputTokens = outputTokens; + this.TraceIds = traceIds; + } + + /// + /// Initializes a new instance of the class. + /// + public SmartTableRequestMetrics() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Table.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Table.Json.g.cs new file mode 100644 index 0000000..ea58f33 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Table.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class Table + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.Table? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.Table), + jsonSerializerContext) as global::PromptLayer.Table; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.Table? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.Table), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.Table; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.Table.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.Table.g.cs new file mode 100644 index 0000000..a1154ee --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.Table.g.cs @@ -0,0 +1,102 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// A Table — a versioned, multi-sheet table that can run LLM columns to generate or evaluate data at scale. + /// + public sealed partial class Table + { + /// + /// Unique table identifier. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public global::System.Guid? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workspace_id")] + public int? WorkspaceId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] + public int? FolderId { get; set; } + + /// + /// Number of active sheets. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet_count")] + public int? SheetCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique table identifier. + /// + /// + /// + /// + /// + /// Number of active sheets. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Table( + global::System.Guid? id, + int? workspaceId, + string? title, + int? folderId, + int? sheetCount, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt) + { + this.Id = id; + this.WorkspaceId = workspaceId; + this.Title = title; + this.FolderId = folderId; + this.SheetCount = sheetCount; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Initializes a new instance of the class. + /// + public Table() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetail.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetail.Json.g.cs new file mode 100644 index 0000000..a93cee5 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetail.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class TableDetail + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.TableDetail? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.TableDetail), + jsonSerializerContext) as global::PromptLayer.TableDetail; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.TableDetail? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.TableDetail), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.TableDetail; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetail.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetail.g.cs new file mode 100644 index 0000000..b5392e6 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetail.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class TableDetail + { + /// + /// Map of sheet_id → row count. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet_row_counts")] + public global::System.Collections.Generic.Dictionary? SheetRowCounts { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Map of sheet_id → row count. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TableDetail( + global::System.Collections.Generic.Dictionary? sheetRowCounts) + { + this.SheetRowCounts = sheetRowCounts; + } + + /// + /// Initializes a new instance of the class. + /// + public TableDetail() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetailSheetRowCounts.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetailSheetRowCounts.Json.g.cs new file mode 100644 index 0000000..e2a638d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetailSheetRowCounts.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class TableDetailSheetRowCounts + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.TableDetailSheetRowCounts? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.TableDetailSheetRowCounts), + jsonSerializerContext) as global::PromptLayer.TableDetailSheetRowCounts; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.TableDetailSheetRowCounts? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.TableDetailSheetRowCounts), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.TableDetailSheetRowCounts; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetailSheetRowCounts.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetailSheetRowCounts.g.cs new file mode 100644 index 0000000..1fa1c22 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableDetailSheetRowCounts.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Map of sheet_id → row count. + /// + public sealed partial class TableDetailSheetRowCounts + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperation.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperation.Json.g.cs new file mode 100644 index 0000000..f77fcff --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class TableImportOperation + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.TableImportOperation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.TableImportOperation), + jsonSerializerContext) as global::PromptLayer.TableImportOperation; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.TableImportOperation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.TableImportOperation), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.TableImportOperation; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperation.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperation.g.cs new file mode 100644 index 0000000..0a8d924 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperation.g.cs @@ -0,0 +1,136 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Status of an asynchronous sheet import operation. + /// + public sealed partial class TableImportOperation + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation_id")] + public string? OperationId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.TableImportOperationSourceJsonConverter))] + public global::PromptLayer.TableImportOperationSource? Source { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::PromptLayer.JsonConverters.TableImportOperationStatusJsonConverter))] + public global::PromptLayer.TableImportOperationStatus? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("progress")] + public double? Progress { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rows_added")] + public int? RowsAdded { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("row_count")] + public int? RowCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_name")] + public string? FileName { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_message")] + public string? ErrorMessage { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TableImportOperation( + string? operationId, + global::PromptLayer.TableImportOperationSource? source, + global::PromptLayer.TableImportOperationStatus? status, + double? progress, + string? message, + int? rowsAdded, + int? rowCount, + string? fileName, + string? errorMessage, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt) + { + this.OperationId = operationId; + this.Source = source; + this.Status = status; + this.Progress = progress; + this.Message = message; + this.RowsAdded = rowsAdded; + this.RowCount = rowCount; + this.FileName = fileName; + this.ErrorMessage = errorMessage; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Initializes a new instance of the class. + /// + public TableImportOperation() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperationSource.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperationSource.g.cs new file mode 100644 index 0000000..e329c4e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperationSource.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public enum TableImportOperationSource + { + /// + /// + /// + File, + /// + /// + /// + RequestLogs, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TableImportOperationSourceExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TableImportOperationSource value) + { + return value switch + { + TableImportOperationSource.File => "file", + TableImportOperationSource.RequestLogs => "request_logs", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TableImportOperationSource? ToEnum(string value) + { + return value switch + { + "file" => TableImportOperationSource.File, + "request_logs" => TableImportOperationSource.RequestLogs, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperationStatus.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperationStatus.g.cs new file mode 100644 index 0000000..b3453bc --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.TableImportOperationStatus.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public enum TableImportOperationStatus + { + /// + /// + /// + Completed, + /// + /// + /// + Failed, + /// + /// + /// + Pending, + /// + /// + /// + Running, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TableImportOperationStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TableImportOperationStatus value) + { + return value switch + { + TableImportOperationStatus.Completed => "completed", + TableImportOperationStatus.Failed => "failed", + TableImportOperationStatus.Pending => "pending", + TableImportOperationStatus.Running => "running", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TableImportOperationStatus? ToEnum(string value) + { + return value switch + { + "completed" => TableImportOperationStatus.Completed, + "failed" => TableImportOperationStatus.Failed, + "pending" => TableImportOperationStatus.Pending, + "running" => TableImportOperationStatus.Running, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableRequest.Json.g.cs new file mode 100644 index 0000000..45a91d7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableRequest), + jsonSerializerContext) as global::PromptLayer.UpdateTableRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableRequest.g.cs new file mode 100644 index 0000000..21fe491 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableRequest.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] + public int? FolderId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableRequest( + string? title, + int? folderId) + { + this.Title = title; + this.FolderId = folderId; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableResponse.Json.g.cs new file mode 100644 index 0000000..a7255cc --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableResponse), + jsonSerializerContext) as global::PromptLayer.UpdateTableResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableResponse.g.cs new file mode 100644 index 0000000..84eff0b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableResponse.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("table")] + public global::PromptLayer.TableDetail? Table { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableResponse( + bool? success, + global::PromptLayer.TableDetail? table) + { + this.Success = success; + this.Table = table; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequest.Json.g.cs new file mode 100644 index 0000000..2a7cee8 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetCellRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetCellRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetCellRequest), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetCellRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetCellRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetCellRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetCellRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequest.g.cs new file mode 100644 index 0000000..3e5dd37 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequest.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetCellRequest + { + /// + /// Human-readable display value. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("display_value")] + public string? DisplayValue { get; set; } + + /// + /// Structured value to store. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + public object? Value { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Human-readable display value. + /// + /// + /// Structured value to store. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableSheetCellRequest( + string? displayValue, + object? value) + { + this.DisplayValue = displayValue; + this.Value = value; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableSheetCellRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequestValue.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequestValue.Json.g.cs new file mode 100644 index 0000000..d3c227c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequestValue.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetCellRequestValue + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetCellRequestValue? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetCellRequestValue), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetCellRequestValue; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetCellRequestValue? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetCellRequestValue), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetCellRequestValue; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequestValue.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequestValue.g.cs new file mode 100644 index 0000000..58d1309 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellRequestValue.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// Structured value to store. + /// + public sealed partial class UpdateTableSheetCellRequestValue + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellResponse.Json.g.cs new file mode 100644 index 0000000..ef18b51 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetCellResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetCellResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetCellResponse), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetCellResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetCellResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetCellResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetCellResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellResponse.g.cs new file mode 100644 index 0000000..1defc42 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetCellResponse.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetCellResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// A single cell at the intersection of a column and a row. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cell")] + public global::PromptLayer.Cell? Cell { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + + /// + /// Number of downstream cells marked stale due to this edit. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stale_count")] + public int? StaleCount { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// A single cell at the intersection of a column and a row. + /// + /// + /// + /// Number of downstream cells marked stale due to this edit. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableSheetCellResponse( + bool? success, + global::PromptLayer.Cell? cell, + int? version, + int? staleCount) + { + this.Success = success; + this.Cell = cell; + this.Version = version; + this.StaleCount = staleCount; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableSheetCellResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequest.Json.g.cs new file mode 100644 index 0000000..767d9de --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetColumnRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetColumnRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetColumnRequest), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetColumnRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetColumnRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetColumnRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetColumnRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequest.g.cs new file mode 100644 index 0000000..03eb554 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequest.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetColumnRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config")] + public object? Config { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dependencies")] + public global::System.Collections.Generic.IList? Dependencies { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableSheetColumnRequest( + string? title, + object? config, + global::System.Collections.Generic.IList? dependencies) + { + this.Title = title; + this.Config = config; + this.Dependencies = dependencies; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableSheetColumnRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestConfig.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestConfig.Json.g.cs new file mode 100644 index 0000000..c7fbf58 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetColumnRequestConfig + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetColumnRequestConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetColumnRequestConfig), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetColumnRequestConfig; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetColumnRequestConfig? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetColumnRequestConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetColumnRequestConfig; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestConfig.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestConfig.g.cs new file mode 100644 index 0000000..bbec669 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestConfig.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetColumnRequestConfig + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencie.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencie.Json.g.cs new file mode 100644 index 0000000..3a816c2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencie.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetColumnRequestDependencie + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetColumnRequestDependencie? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetColumnRequestDependencie), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetColumnRequestDependencie; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetColumnRequestDependencie? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetColumnRequestDependencie), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetColumnRequestDependencie; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencie.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencie.g.cs new file mode 100644 index 0000000..7e34ffd --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencie.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetColumnRequestDependencie + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("column_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid ColumnId { get; set; } + + /// + /// Default Value: value + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reference_type")] + public string? ReferenceType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config_meta")] + public object? ConfigMeta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Default Value: value + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableSheetColumnRequestDependencie( + global::System.Guid columnId, + string? referenceType, + string? configKey, + object? configMeta) + { + this.ColumnId = columnId; + this.ReferenceType = referenceType; + this.ConfigKey = configKey; + this.ConfigMeta = configMeta; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableSheetColumnRequestDependencie() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencieConfigMeta.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencieConfigMeta.Json.g.cs new file mode 100644 index 0000000..1cb1919 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencieConfigMeta.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetColumnRequestDependencieConfigMeta + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetColumnRequestDependencieConfigMeta? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetColumnRequestDependencieConfigMeta), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetColumnRequestDependencieConfigMeta; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetColumnRequestDependencieConfigMeta? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetColumnRequestDependencieConfigMeta), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetColumnRequestDependencieConfigMeta; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencieConfigMeta.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencieConfigMeta.g.cs new file mode 100644 index 0000000..3f866a2 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnRequestDependencieConfigMeta.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetColumnRequestDependencieConfigMeta + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnResponse.Json.g.cs new file mode 100644 index 0000000..c789526 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetColumnResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetColumnResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetColumnResponse), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetColumnResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetColumnResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetColumnResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetColumnResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnResponse.g.cs new file mode 100644 index 0000000..a41bfdd --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetColumnResponse.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetColumnResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// A column within a Table sheet. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("column")] + public global::PromptLayer.Column? Column { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("requires_recalculation")] + public bool? RequiresRecalculation { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("affected_column_ids")] + public global::System.Collections.Generic.IList? AffectedColumnIds { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// A column within a Table sheet. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableSheetColumnResponse( + bool? success, + global::PromptLayer.Column? column, + bool? requiresRecalculation, + global::System.Collections.Generic.IList? affectedColumnIds, + int? version) + { + this.Success = success; + this.Column = column; + this.RequiresRecalculation = requiresRecalculation; + this.AffectedColumnIds = affectedColumnIds; + this.Version = version; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableSheetColumnResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetRequest.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetRequest.Json.g.cs new file mode 100644 index 0000000..a594181 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetRequest), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetRequest.g.cs new file mode 100644 index 0000000..66950c1 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetRequest.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// New display position within the table (0-based). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int? Index { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// New display position within the table (0-based). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableSheetRequest( + string? title, + int? index) + { + this.Title = title; + this.Index = index; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableSheetRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetResponse.Json.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetResponse.Json.g.cs new file mode 100644 index 0000000..5f0677d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace PromptLayer +{ + public sealed partial class UpdateTableSheetResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::PromptLayer.UpdateTableSheetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::PromptLayer.UpdateTableSheetResponse), + jsonSerializerContext) as global::PromptLayer.UpdateTableSheetResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::PromptLayer.UpdateTableSheetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::PromptLayer.UpdateTableSheetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::PromptLayer.UpdateTableSheetResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetResponse.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetResponse.g.cs new file mode 100644 index 0000000..b6f44cb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.Models.UpdateTableSheetResponse.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// + /// + public sealed partial class UpdateTableSheetResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + public bool? Success { get; set; } + + /// + /// A sheet within a Table. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sheet")] + public global::PromptLayer.Sheet? Sheet { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// A sheet within a Table. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateTableSheetResponse( + bool? success, + global::PromptLayer.Sheet? sheet, + int? version) + { + this.Success = success; + this.Sheet = sheet; + this.Version = version; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateTableSheetResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs index 0f899b6..8b29437 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptLayerClient.g.cs @@ -174,6 +174,15 @@ public sealed partial class PromptLayerClient : global::PromptLayer.IPromptLayer JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public SmartTablesClient SmartTables => new SmartTablesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.AddTableSheetRows.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.AddTableSheetRows.g.cs new file mode 100644 index 0000000..b72aecb --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.AddTableSheetRows.g.cs @@ -0,0 +1,640 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_AddTableSheetRowsSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_AddTableSheetRowsSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_AddTableSheetRowsSecurityRequirement0, + }; + partial void PrepareAddTableSheetRowsArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + global::PromptLayer.AddTableSheetRowsRequest request); + partial void PrepareAddTableSheetRowsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.AddTableSheetRowsRequest request); + partial void ProcessAddTableSheetRowsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAddTableSheetRowsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Add Rows
+ /// Append one or more rows to a sheet. Text column values can be set immediately; non-text column cells are created with `stale` status and must be triggered via a recalculation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AddTableSheetRowsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.AddTableSheetRowsRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddTableSheetRowsAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Rows
+ /// Append one or more rows to a sheet. Text column values can be set immediately; non-text column cells are created with `stale` status and must be triggered via a recalculation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AddTableSheetRowsAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.AddTableSheetRowsRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAddTableSheetRowsArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_AddTableSheetRowsSecurityRequirements, + operationName: "AddTableSheetRowsAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAddTableSheetRowsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddTableSheetRows", + methodName: "AddTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddTableSheetRows", + methodName: "AddTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddTableSheetRows", + methodName: "AddTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAddTableSheetRowsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddTableSheetRows", + methodName: "AddTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddTableSheetRows", + methodName: "AddTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // No columns defined + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::PromptLayer.ErrorResponse? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table or sheet not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAddTableSheetRowsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.AddTableSheetRowsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.AddTableSheetRowsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Add Rows
+ /// Append one or more rows to a sheet. Text column values can be set immediately; non-text column cells are created with `stale` status and must be triggered via a recalculation. + ///
+ /// + /// + /// + /// Number of rows to append (1–100).
+ /// Default Value: 1 + /// + /// + /// Per-row initial values for text columns. Each element is a map of column_id → value. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AddTableSheetRowsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + int? count = default, + global::System.Collections.Generic.IList? values = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.AddTableSheetRowsRequest + { + Count = count, + Values = values, + }; + + return await AddTableSheetRowsAsync( + tableId: tableId, + sheetId: sheetId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTable.g.cs new file mode 100644 index 0000000..5d89757 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTable.g.cs @@ -0,0 +1,615 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_CreateTableSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_CreateTableSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_CreateTableSecurityRequirement0, + }; + partial void PrepareCreateTableArguments( + global::System.Net.Http.HttpClient httpClient, + global::PromptLayer.CreateTableRequest request); + partial void PrepareCreateTableRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::PromptLayer.CreateTableRequest request); + partial void ProcessCreateTableResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTableResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Table
+ /// Create a new Table. A default sheet with one text column is created automatically. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableAsync( + + global::PromptLayer.CreateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTableAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Table
+ /// Create a new Table. A default sheet with one text column is created automatically. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateTableAsResponseAsync( + + global::PromptLayer.CreateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateTableArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateTableSecurityRequirements, + operationName: "CreateTableAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: "/api/public/v2/tables", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateTableRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTable", + methodName: "CreateTableAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTable", + methodName: "CreateTableAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTable", + methodName: "CreateTableAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateTableResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTable", + methodName: "CreateTableAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTable", + methodName: "CreateTableAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Invalid request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::PromptLayer.ErrorResponse? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Folder not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateTableResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.CreateTableResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.CreateTableResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Table
+ /// Create a new Table. A default sheet with one text column is created automatically. + ///
+ /// + /// Table title. Defaults to a unique 'Untitled Table' name if omitted. + /// + /// + /// Folder to place the table in. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableAsync( + string? title = default, + int? folderId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.CreateTableRequest + { + Title = title, + FolderId = folderId, + }; + + return await CreateTableAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheet.g.cs new file mode 100644 index 0000000..6886e1c --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheet.g.cs @@ -0,0 +1,637 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_CreateTableSheetSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_CreateTableSheetSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_CreateTableSheetSecurityRequirement0, + }; + partial void PrepareCreateTableSheetArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + global::PromptLayer.CreateTableSheetRequest request); + partial void PrepareCreateTableSheetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::PromptLayer.CreateTableSheetRequest request); + partial void ProcessCreateTableSheetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTableSheetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Sheet
+ /// Create a new sheet in a table by importing data from a file (CSV or JSON, base64-encoded) or from request log history. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableSheetAsync( + global::System.Guid tableId, + + global::PromptLayer.CreateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTableSheetAsResponseAsync( + tableId: tableId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Sheet
+ /// Create a new sheet in a table by importing data from a file (CSV or JSON, base64-encoded) or from request log history. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateTableSheetAsResponseAsync( + global::System.Guid tableId, + + global::PromptLayer.CreateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateTableSheetArguments( + httpClient: HttpClient, + tableId: ref tableId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateTableSheetSecurityRequirements, + operationName: "CreateTableSheetAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateTableSheetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheet", + methodName: "CreateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheet", + methodName: "CreateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheet", + methodName: "CreateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateTableSheetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheet", + methodName: "CreateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheet", + methodName: "CreateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Invalid request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::PromptLayer.ErrorResponse? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateTableSheetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.CreateTableSheetResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.CreateTableSheetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Sheet
+ /// Create a new sheet in a table by importing data from a file (CSV or JSON, base64-encoded) or from request log history. + ///
+ /// + /// + /// Sheet title. Defaults to the source file name or 'Request Logs'. + /// + /// + /// Display position within the table (0-based). Defaults to appending at the end. + /// + /// + /// Optional idempotency key for the import operation. + /// + /// + /// Data source for the sheet. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableSheetAsync( + global::System.Guid tableId, + global::PromptLayer.OneOf source, + string? title = default, + int? index = default, + string? operationId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.CreateTableSheetRequest + { + Title = title, + Index = index, + OperationId = operationId, + Source = source, + }; + + return await CreateTableSheetAsync( + tableId: tableId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetCellRecalculation.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetCellRecalculation.g.cs new file mode 100644 index 0000000..0d7808d --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetCellRecalculation.g.cs @@ -0,0 +1,518 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_CreateTableSheetCellRecalculationSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_CreateTableSheetCellRecalculationSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_CreateTableSheetCellRecalculationSecurityRequirement0, + }; + partial void PrepareCreateTableSheetCellRecalculationArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + ref global::System.Guid cellId); + partial void PrepareCreateTableSheetCellRecalculationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId); + partial void ProcessCreateTableSheetCellRecalculationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTableSheetCellRecalculationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Recalculate Cell
+ /// Trigger recalculation for a single cell. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableSheetCellRecalculationAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTableSheetCellRecalculationAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + cellId: cellId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recalculate Cell
+ /// Trigger recalculation for a single cell. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateTableSheetCellRecalculationAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCreateTableSheetCellRecalculationArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + cellId: ref cellId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateTableSheetCellRecalculationSecurityRequirements, + operationName: "CreateTableSheetCellRecalculationAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}/recalculations", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateTableSheetCellRecalculationRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + cellId: cellId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculation", + methodName: "CreateTableSheetCellRecalculationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculation", + methodName: "CreateTableSheetCellRecalculationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculation", + methodName: "CreateTableSheetCellRecalculationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateTableSheetCellRecalculationResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculation", + methodName: "CreateTableSheetCellRecalculationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculation", + methodName: "CreateTableSheetCellRecalculationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table, sheet, or cell not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateTableSheetCellRecalculationResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.CreateTableSheetCellRecalculationResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.CreateTableSheetCellRecalculationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetCellRecalculationsBatch.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetCellRecalculationsBatch.g.cs new file mode 100644 index 0000000..6565529 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetCellRecalculationsBatch.g.cs @@ -0,0 +1,597 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_CreateTableSheetCellRecalculationsBatchSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_CreateTableSheetCellRecalculationsBatchSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_CreateTableSheetCellRecalculationsBatchSecurityRequirement0, + }; + partial void PrepareCreateTableSheetCellRecalculationsBatchArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest request); + partial void PrepareCreateTableSheetCellRecalculationsBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest request); + partial void ProcessCreateTableSheetCellRecalculationsBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTableSheetCellRecalculationsBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Recalculate Cells (Batch)
+ /// Trigger recalculation for a batch of cells identified by ID. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableSheetCellRecalculationsBatchAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTableSheetCellRecalculationsBatchAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recalculate Cells (Batch)
+ /// Trigger recalculation for a batch of cells identified by ID. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateTableSheetCellRecalculationsBatchAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateTableSheetCellRecalculationsBatchArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateTableSheetCellRecalculationsBatchSecurityRequirements, + operationName: "CreateTableSheetCellRecalculationsBatchAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/recalculations", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateTableSheetCellRecalculationsBatchRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculationsBatch", + methodName: "CreateTableSheetCellRecalculationsBatchAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculationsBatch", + methodName: "CreateTableSheetCellRecalculationsBatchAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculationsBatch", + methodName: "CreateTableSheetCellRecalculationsBatchAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateTableSheetCellRecalculationsBatchResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculationsBatch", + methodName: "CreateTableSheetCellRecalculationsBatchAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetCellRecalculationsBatch", + methodName: "CreateTableSheetCellRecalculationsBatchAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/recalculations\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Invalid request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::PromptLayer.ErrorResponse? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table, sheet, or cells not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateTableSheetCellRecalculationsBatchResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.CreateTableSheetCellRecalculationsBatchResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Recalculate Cells (Batch)
+ /// Trigger recalculation for a batch of cells identified by ID. + ///
+ /// + /// + /// + /// List of cell IDs to recalculate. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableSheetCellRecalculationsBatchAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Collections.Generic.IList cellIds, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.CreateTableSheetCellRecalculationsBatchRequest + { + CellIds = cellIds, + }; + + return await CreateTableSheetCellRecalculationsBatchAsync( + tableId: tableId, + sheetId: sheetId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetColumn.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetColumn.g.cs new file mode 100644 index 0000000..17b375e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.CreateTableSheetColumn.g.cs @@ -0,0 +1,645 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_CreateTableSheetColumnSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_CreateTableSheetColumnSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_CreateTableSheetColumnSecurityRequirement0, + }; + partial void PrepareCreateTableSheetColumnArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + global::PromptLayer.CreateTableSheetColumnRequest request); + partial void PrepareCreateTableSheetColumnRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.CreateTableSheetColumnRequest request); + partial void ProcessCreateTableSheetColumnResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTableSheetColumnResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Column
+ /// Add a new column to a sheet. Non-text columns will generate cells for all existing rows. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTableSheetColumnAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Column
+ /// Add a new column to a sheet. Non-text columns will generate cells for all existing rows. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateTableSheetColumnAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.CreateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateTableSheetColumnArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateTableSheetColumnSecurityRequirements, + operationName: "CreateTableSheetColumnAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateTableSheetColumnRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetColumn", + methodName: "CreateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetColumn", + methodName: "CreateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetColumn", + methodName: "CreateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateTableSheetColumnResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetColumn", + methodName: "CreateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateTableSheetColumn", + methodName: "CreateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Cycle detected or invalid config + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::PromptLayer.ErrorResponse? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table or sheet not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateTableSheetColumnResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.CreateTableSheetColumnResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.CreateTableSheetColumnResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Column
+ /// Add a new column to a sheet. Non-text columns will generate cells for all existing rows. + ///
+ /// + /// + /// + /// + /// + /// Type-specific column configuration. + /// + /// + /// Column dependency edges for non-text columns. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + string title, + global::PromptLayer.CreateTableSheetColumnRequestType type, + object? config = default, + global::System.Collections.Generic.IList? dependencies = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.CreateTableSheetColumnRequest + { + Title = title, + Type = type, + Config = config, + Dependencies = dependencies, + }; + + return await CreateTableSheetColumnAsync( + tableId: tableId, + sheetId: sheetId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTable.g.cs new file mode 100644 index 0000000..9104806 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTable.g.cs @@ -0,0 +1,535 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_GetTableSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_GetTableSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_GetTableSecurityRequirement0, + }; + partial void PrepareGetTableArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId); + partial void PrepareGetTableRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId); + partial void ProcessGetTableResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetTableResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Table + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetTableAsync( + global::System.Guid tableId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTableAsResponseAsync( + tableId: tableId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Table + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTableAsResponseAsync( + global::System.Guid tableId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetTableArguments( + httpClient: HttpClient, + tableId: ref tableId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetTableSecurityRequirements, + operationName: "GetTableAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetTableRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTable", + methodName: "GetTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTable", + methodName: "GetTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTable", + methodName: "GetTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetTableResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTable", + methodName: "GetTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTable", + methodName: "GetTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetTableResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.GetTableResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.GetTableResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheet.g.cs new file mode 100644 index 0000000..b14a4da --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheet.g.cs @@ -0,0 +1,507 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_GetTableSheetSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_GetTableSheetSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_GetTableSheetSecurityRequirement0, + }; + partial void PrepareGetTableSheetArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId); + partial void PrepareGetTableSheetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId); + partial void ProcessGetTableSheetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetTableSheetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Sheet + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetTableSheetAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTableSheetAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Sheet + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTableSheetAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetTableSheetArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetTableSheetSecurityRequirements, + operationName: "GetTableSheetAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetTableSheetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheet", + methodName: "GetTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheet", + methodName: "GetTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheet", + methodName: "GetTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetTableSheetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheet", + methodName: "GetTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheet", + methodName: "GetTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table or sheet not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetTableSheetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.GetTableSheetResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.GetTableSheetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheetCell.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheetCell.g.cs new file mode 100644 index 0000000..c1b43f7 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheetCell.g.cs @@ -0,0 +1,518 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_GetTableSheetCellSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_GetTableSheetCellSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_GetTableSheetCellSecurityRequirement0, + }; + partial void PrepareGetTableSheetCellArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + ref global::System.Guid cellId); + partial void PrepareGetTableSheetCellRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId); + partial void ProcessGetTableSheetCellResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetTableSheetCellResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Cell
+ /// Retrieve a single cell by ID. For prompt-template column cells, the response includes a `request_metrics` object with price, latency, and token usage when available. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetTableSheetCellAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTableSheetCellAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + cellId: cellId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Cell
+ /// Retrieve a single cell by ID. For prompt-template column cells, the response includes a `request_metrics` object with price, latency, and token usage when available. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTableSheetCellAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetTableSheetCellArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + cellId: ref cellId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetTableSheetCellSecurityRequirements, + operationName: "GetTableSheetCellAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetTableSheetCellRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + cellId: cellId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetCell", + methodName: "GetTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetCell", + methodName: "GetTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetCell", + methodName: "GetTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetTableSheetCellResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetCell", + methodName: "GetTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetCell", + methodName: "GetTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Cell not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetTableSheetCellResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.GetTableSheetCellResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.GetTableSheetCellResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheetOperation.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheetOperation.g.cs new file mode 100644 index 0000000..82e3cf1 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.GetTableSheetOperation.g.cs @@ -0,0 +1,509 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_GetTableSheetOperationSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_GetTableSheetOperationSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_GetTableSheetOperationSecurityRequirement0, + }; + partial void PrepareGetTableSheetOperationArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref string operationId); + partial void PrepareGetTableSheetOperationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + string operationId); + partial void ProcessGetTableSheetOperationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetTableSheetOperationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Sheet Import Operation
+ /// Poll the status of an asynchronous sheet import operation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetTableSheetOperationAsync( + global::System.Guid tableId, + string operationId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTableSheetOperationAsResponseAsync( + tableId: tableId, + operationId: operationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Sheet Import Operation
+ /// Poll the status of an asynchronous sheet import operation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTableSheetOperationAsResponseAsync( + global::System.Guid tableId, + string operationId, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetTableSheetOperationArguments( + httpClient: HttpClient, + tableId: ref tableId, + operationId: ref operationId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetTableSheetOperationSecurityRequirements, + operationName: "GetTableSheetOperationAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/operations/{operationId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetTableSheetOperationRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + operationId: operationId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetOperation", + methodName: "GetTableSheetOperationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/operations/{operationId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetOperation", + methodName: "GetTableSheetOperationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/operations/{operationId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetOperation", + methodName: "GetTableSheetOperationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/operations/{operationId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetTableSheetOperationResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetOperation", + methodName: "GetTableSheetOperationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/operations/{operationId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetTableSheetOperation", + methodName: "GetTableSheetOperationAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/operations/{operationId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Operation not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetTableSheetOperationResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.GetTableSheetOperationResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.GetTableSheetOperationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheetColumns.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheetColumns.g.cs new file mode 100644 index 0000000..d5ebc97 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheetColumns.g.cs @@ -0,0 +1,549 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_ListTableSheetColumnsSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_ListTableSheetColumnsSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_ListTableSheetColumnsSecurityRequirement0, + }; + partial void PrepareListTableSheetColumnsArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + ref bool? includeSystemColumns, + ref string? cursor, + ref int? limit); + partial void PrepareListTableSheetColumnsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns, + string? cursor, + int? limit); + partial void ProcessListTableSheetColumnsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListTableSheetColumnsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Columns
+ /// List columns in a sheet, ordered by position rank. By default, system-managed metadata columns such as price and latency columns are excluded; pass `include_system_columns=true` to include them. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListTableSheetColumnsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListTableSheetColumnsAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + includeSystemColumns: includeSystemColumns, + cursor: cursor, + limit: limit, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Columns
+ /// List columns in a sheet, ordered by position rank. By default, system-managed metadata columns such as price and latency columns are excluded; pass `include_system_columns=true` to include them. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListTableSheetColumnsAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListTableSheetColumnsArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + includeSystemColumns: ref includeSystemColumns, + cursor: ref cursor, + limit: ref limit); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListTableSheetColumnsSecurityRequirements, + operationName: "ListTableSheetColumnsAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("include_system_columns", includeSystemColumns?.ToString().ToLowerInvariant()) + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("limit", limit?.ToString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListTableSheetColumnsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + includeSystemColumns: includeSystemColumns, + cursor: cursor, + limit: limit); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetColumns", + methodName: "ListTableSheetColumnsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetColumns", + methodName: "ListTableSheetColumnsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetColumns", + methodName: "ListTableSheetColumnsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListTableSheetColumnsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetColumns", + methodName: "ListTableSheetColumnsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetColumns", + methodName: "ListTableSheetColumnsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table or sheet not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListTableSheetColumnsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.ListTableSheetColumnsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.ListTableSheetColumnsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheetRows.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheetRows.g.cs new file mode 100644 index 0000000..793d39e --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheetRows.g.cs @@ -0,0 +1,605 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_ListTableSheetRowsSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_ListTableSheetRowsSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_ListTableSheetRowsSecurityRequirement0, + }; + partial void PrepareListTableSheetRowsArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + ref bool? includeSystemColumns, + ref bool? includeExecutionMetadataAggregates, + ref string? cursor, + ref int? limit, + ref global::PromptLayer.ListTableSheetRowsOrder? order, + ref bool? includeColumns, + ref bool? includeRowCount); + partial void PrepareListTableSheetRowsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns, + bool? includeExecutionMetadataAggregates, + string? cursor, + int? limit, + global::PromptLayer.ListTableSheetRowsOrder? order, + bool? includeColumns, + bool? includeRowCount); + partial void ProcessListTableSheetRowsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListTableSheetRowsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Rows
+ /// List rows in a sheet, each containing a map of column_id to cell. For prompt-template column cells, each cell can include a `request_metrics` object with price, latency, and token usage when available. Pass `include_columns=true` on the first page to receive column metadata alongside rows. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: asc + /// + /// + /// Include column metadata in the response. Defaults to true on the first page. + /// + /// + /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListTableSheetRowsAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + bool? includeExecutionMetadataAggregates = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetRowsOrder? order = default, + bool? includeColumns = default, + bool? includeRowCount = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListTableSheetRowsAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + includeSystemColumns: includeSystemColumns, + includeExecutionMetadataAggregates: includeExecutionMetadataAggregates, + cursor: cursor, + limit: limit, + order: order, + includeColumns: includeColumns, + includeRowCount: includeRowCount, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Rows
+ /// List rows in a sheet, each containing a map of column_id to cell. For prompt-template column cells, each cell can include a `request_metrics` object with price, latency, and token usage when available. Pass `include_columns=true` on the first page to receive column metadata alongside rows. + ///
+ /// + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: asc + /// + /// + /// Include column metadata in the response. Defaults to true on the first page. + /// + /// + /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListTableSheetRowsAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + bool? includeSystemColumns = default, + bool? includeExecutionMetadataAggregates = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetRowsOrder? order = default, + bool? includeColumns = default, + bool? includeRowCount = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListTableSheetRowsArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + includeSystemColumns: ref includeSystemColumns, + includeExecutionMetadataAggregates: ref includeExecutionMetadataAggregates, + cursor: ref cursor, + limit: ref limit, + order: ref order, + includeColumns: ref includeColumns, + includeRowCount: ref includeRowCount); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListTableSheetRowsSecurityRequirements, + operationName: "ListTableSheetRowsAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("include_system_columns", includeSystemColumns?.ToString().ToLowerInvariant()) + .AddOptionalParameter("include_execution_metadata_aggregates", includeExecutionMetadataAggregates?.ToString().ToLowerInvariant()) + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("include_columns", includeColumns?.ToString().ToLowerInvariant()) + .AddOptionalParameter("include_row_count", includeRowCount?.ToString().ToLowerInvariant()) + ; + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListTableSheetRowsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + includeSystemColumns: includeSystemColumns, + includeExecutionMetadataAggregates: includeExecutionMetadataAggregates, + cursor: cursor, + limit: limit, + order: order, + includeColumns: includeColumns, + includeRowCount: includeRowCount); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetRows", + methodName: "ListTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetRows", + methodName: "ListTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetRows", + methodName: "ListTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListTableSheetRowsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetRows", + methodName: "ListTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheetRows", + methodName: "ListTableSheetRowsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/rows\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table or sheet not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListTableSheetRowsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.ListTableSheetRowsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.ListTableSheetRowsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheets.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheets.g.cs new file mode 100644 index 0000000..05ecefa --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTableSheets.g.cs @@ -0,0 +1,607 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_ListTableSheetsSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_ListTableSheetsSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_ListTableSheetsSecurityRequirement0, + }; + partial void PrepareListTableSheetsArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref string? cursor, + ref int? limit, + ref global::PromptLayer.ListTableSheetsOrder? order, + ref int? promptId, + ref int? promptVersionId, + ref int? promptLabelId); + partial void PrepareListTableSheetsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + string? cursor, + int? limit, + global::PromptLayer.ListTableSheetsOrder? order, + int? promptId, + int? promptVersionId, + int? promptLabelId); + partial void ProcessListTableSheetsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListTableSheetsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Sheets
+ /// List all sheets in a table, ordered by their index. + ///
+ /// + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: asc + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListTableSheetsAsync( + global::System.Guid tableId, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetsOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListTableSheetsAsResponseAsync( + tableId: tableId, + cursor: cursor, + limit: limit, + order: order, + promptId: promptId, + promptVersionId: promptVersionId, + promptLabelId: promptLabelId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Sheets
+ /// List all sheets in a table, ordered by their index. + ///
+ /// + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: asc + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListTableSheetsAsResponseAsync( + global::System.Guid tableId, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTableSheetsOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListTableSheetsArguments( + httpClient: HttpClient, + tableId: ref tableId, + cursor: ref cursor, + limit: ref limit, + order: ref order, + promptId: ref promptId, + promptVersionId: ref promptVersionId, + promptLabelId: ref promptLabelId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListTableSheetsSecurityRequirements, + operationName: "ListTableSheetsAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("prompt_id", promptId?.ToString()) + .AddOptionalParameter("prompt_version_id", promptVersionId?.ToString()) + .AddOptionalParameter("prompt_label_id", promptLabelId?.ToString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListTableSheetsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + cursor: cursor, + limit: limit, + order: order, + promptId: promptId, + promptVersionId: promptVersionId, + promptLabelId: promptLabelId); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheets", + methodName: "ListTableSheetsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheets", + methodName: "ListTableSheetsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheets", + methodName: "ListTableSheetsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListTableSheetsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheets", + methodName: "ListTableSheetsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTableSheets", + methodName: "ListTableSheetsAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListTableSheetsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.ListTableSheetsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.ListTableSheetsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTables.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTables.g.cs new file mode 100644 index 0000000..60dc2e4 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.ListTables.g.cs @@ -0,0 +1,597 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_ListTablesSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_ListTablesSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_ListTablesSecurityRequirement0, + }; + partial void PrepareListTablesArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? folderId, + ref string? name, + ref string? cursor, + ref int? limit, + ref global::PromptLayer.ListTablesOrder? order, + ref int? promptId, + ref int? promptVersionId, + ref int? promptLabelId); + partial void PrepareListTablesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? folderId, + string? name, + string? cursor, + int? limit, + global::PromptLayer.ListTablesOrder? order, + int? promptId, + int? promptVersionId, + int? promptLabelId); + partial void ProcessListTablesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListTablesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Tables
+ /// List Tables in the workspace. Supports cursor-based pagination and optional filtering by folder or prompt column. + ///
+ /// + /// Filter by folder ID. + /// + /// + /// Filter by title (case-insensitive contains match). + /// + /// + /// Pagination cursor from a previous response. + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: desc + /// + /// + /// Filter to tables containing a column referencing this prompt. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListTablesAsync( + int? folderId = default, + string? name = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTablesOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListTablesAsResponseAsync( + folderId: folderId, + name: name, + cursor: cursor, + limit: limit, + order: order, + promptId: promptId, + promptVersionId: promptVersionId, + promptLabelId: promptLabelId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Tables
+ /// List Tables in the workspace. Supports cursor-based pagination and optional filtering by folder or prompt column. + ///
+ /// + /// Filter by folder ID. + /// + /// + /// Filter by title (case-insensitive contains match). + /// + /// + /// Pagination cursor from a previous response. + /// + /// + /// Default Value: 20 + /// + /// + /// Default Value: desc + /// + /// + /// Filter to tables containing a column referencing this prompt. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListTablesAsResponseAsync( + int? folderId = default, + string? name = default, + string? cursor = default, + int? limit = default, + global::PromptLayer.ListTablesOrder? order = default, + int? promptId = default, + int? promptVersionId = default, + int? promptLabelId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListTablesArguments( + httpClient: HttpClient, + folderId: ref folderId, + name: ref name, + cursor: ref cursor, + limit: ref limit, + order: ref order, + promptId: ref promptId, + promptVersionId: ref promptVersionId, + promptLabelId: ref promptLabelId); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListTablesSecurityRequirements, + operationName: "ListTablesAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: "/api/public/v2/tables", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("folder_id", folderId?.ToString()) + .AddOptionalParameter("name", name) + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("prompt_id", promptId?.ToString()) + .AddOptionalParameter("prompt_version_id", promptVersionId?.ToString()) + .AddOptionalParameter("prompt_label_id", promptLabelId?.ToString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListTablesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + folderId: folderId, + name: name, + cursor: cursor, + limit: limit, + order: order, + promptId: promptId, + promptVersionId: promptVersionId, + promptLabelId: promptLabelId); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTables", + methodName: "ListTablesAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTables", + methodName: "ListTablesAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTables", + methodName: "ListTablesAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListTablesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTables", + methodName: "ListTablesAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListTables", + methodName: "ListTablesAsync", + pathTemplate: "\"/api/public/v2/tables\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListTablesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.ListTablesResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.ListTablesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTable.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTable.g.cs new file mode 100644 index 0000000..8bbe864 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTable.g.cs @@ -0,0 +1,583 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_UpdateTableSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_UpdateTableSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_UpdateTableSecurityRequirement0, + }; + partial void PrepareUpdateTableArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + global::PromptLayer.UpdateTableRequest request); + partial void PrepareUpdateTableRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::PromptLayer.UpdateTableRequest request); + partial void ProcessUpdateTableResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateTableResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Table + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableAsync( + global::System.Guid tableId, + + global::PromptLayer.UpdateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateTableAsResponseAsync( + tableId: tableId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Table + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateTableAsResponseAsync( + global::System.Guid tableId, + + global::PromptLayer.UpdateTableRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateTableArguments( + httpClient: HttpClient, + tableId: ref tableId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateTableSecurityRequirements, + operationName: "UpdateTableAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateTableRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTable", + methodName: "UpdateTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTable", + methodName: "UpdateTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTable", + methodName: "UpdateTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateTableResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTable", + methodName: "UpdateTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTable", + methodName: "UpdateTableAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Validation error - request parameters or body are invalid. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::PromptLayer.OneOf? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::PromptLayer.OneOf.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::PromptLayer.ApiException?>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateTableResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.UpdateTableResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.UpdateTableResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update Table + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableAsync( + global::System.Guid tableId, + string? title = default, + int? folderId = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.UpdateTableRequest + { + Title = title, + FolderId = folderId, + }; + + return await UpdateTableAsync( + tableId: tableId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheet.g.cs new file mode 100644 index 0000000..434124b --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheet.g.cs @@ -0,0 +1,560 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_UpdateTableSheetSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_UpdateTableSheetSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_UpdateTableSheetSecurityRequirement0, + }; + partial void PrepareUpdateTableSheetArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + global::PromptLayer.UpdateTableSheetRequest request); + partial void PrepareUpdateTableSheetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::PromptLayer.UpdateTableSheetRequest request); + partial void ProcessUpdateTableSheetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateTableSheetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Sheet + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableSheetAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.UpdateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateTableSheetAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Sheet + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateTableSheetAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + + global::PromptLayer.UpdateTableSheetRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateTableSheetArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateTableSheetSecurityRequirements, + operationName: "UpdateTableSheetAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateTableSheetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheet", + methodName: "UpdateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheet", + methodName: "UpdateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheet", + methodName: "UpdateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateTableSheetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheet", + methodName: "UpdateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheet", + methodName: "UpdateTableSheetAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table or sheet not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateTableSheetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.UpdateTableSheetResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.UpdateTableSheetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update Sheet + /// + /// + /// + /// + /// + /// New display position within the table (0-based). + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableSheetAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + string? title = default, + int? index = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.UpdateTableSheetRequest + { + Title = title, + Index = index, + }; + + return await UpdateTableSheetAsync( + tableId: tableId, + sheetId: sheetId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheetCell.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheetCell.g.cs new file mode 100644 index 0000000..8e13072 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheetCell.g.cs @@ -0,0 +1,614 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_UpdateTableSheetCellSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_UpdateTableSheetCellSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_UpdateTableSheetCellSecurityRequirement0, + }; + partial void PrepareUpdateTableSheetCellArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + ref global::System.Guid cellId, + global::PromptLayer.UpdateTableSheetCellRequest request); + partial void PrepareUpdateTableSheetCellRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + global::PromptLayer.UpdateTableSheetCellRequest request); + partial void ProcessUpdateTableSheetCellResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateTableSheetCellResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Cell
+ /// Edit the value of a text column cell. Only cells in `text` type columns can be edited directly; computed cells are recalculated automatically. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableSheetCellAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + + global::PromptLayer.UpdateTableSheetCellRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateTableSheetCellAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + cellId: cellId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Cell
+ /// Edit the value of a text column cell. Only cells in `text` type columns can be edited directly; computed cells are recalculated automatically. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateTableSheetCellAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + + global::PromptLayer.UpdateTableSheetCellRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateTableSheetCellArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + cellId: ref cellId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateTableSheetCellSecurityRequirements, + operationName: "UpdateTableSheetCellAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateTableSheetCellRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + cellId: cellId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetCell", + methodName: "UpdateTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetCell", + methodName: "UpdateTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetCell", + methodName: "UpdateTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateTableSheetCellResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetCell", + methodName: "UpdateTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetCell", + methodName: "UpdateTableSheetCellAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/cells/{cellId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Cell is not a text column cell + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::PromptLayer.ErrorResponse? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Cell not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateTableSheetCellResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.UpdateTableSheetCellResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.UpdateTableSheetCellResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update Cell
+ /// Edit the value of a text column cell. Only cells in `text` type columns can be edited directly; computed cells are recalculated automatically. + ///
+ /// + /// + /// + /// + /// Human-readable display value. + /// + /// + /// Structured value to store. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableSheetCellAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid cellId, + string? displayValue = default, + object? value = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.UpdateTableSheetCellRequest + { + DisplayValue = displayValue, + Value = value, + }; + + return await UpdateTableSheetCellAsync( + tableId: tableId, + sheetId: sheetId, + cellId: cellId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheetColumn.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheetColumn.g.cs new file mode 100644 index 0000000..40f2839 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.UpdateTableSheetColumn.g.cs @@ -0,0 +1,613 @@ + +#nullable enable + +namespace PromptLayer +{ + public partial class SmartTablesClient + { + + + private static readonly global::PromptLayer.EndPointSecurityRequirement s_UpdateTableSheetColumnSecurityRequirement0 = + new global::PromptLayer.EndPointSecurityRequirement + { + Authorizations = new global::PromptLayer.EndPointAuthorizationRequirement[] + { new global::PromptLayer.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::PromptLayer.EndPointSecurityRequirement[] s_UpdateTableSheetColumnSecurityRequirements = + new global::PromptLayer.EndPointSecurityRequirement[] + { s_UpdateTableSheetColumnSecurityRequirement0, + }; + partial void PrepareUpdateTableSheetColumnArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid tableId, + ref global::System.Guid sheetId, + ref global::System.Guid columnId, + global::PromptLayer.UpdateTableSheetColumnRequest request); + partial void PrepareUpdateTableSheetColumnRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid columnId, + global::PromptLayer.UpdateTableSheetColumnRequest request); + partial void ProcessUpdateTableSheetColumnResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateTableSheetColumnResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Column
+ /// Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid columnId, + + global::PromptLayer.UpdateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateTableSheetColumnAsResponseAsync( + tableId: tableId, + sheetId: sheetId, + columnId: columnId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Column
+ /// Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateTableSheetColumnAsResponseAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid columnId, + + global::PromptLayer.UpdateTableSheetColumnRequest request, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateTableSheetColumnArguments( + httpClient: HttpClient, + tableId: ref tableId, + sheetId: ref sheetId, + columnId: ref columnId, + request: request); + + + var __authorizations = global::PromptLayer.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateTableSheetColumnSecurityRequirements, + operationName: "UpdateTableSheetColumnAsync"); + + using var __timeoutCancellationTokenSource = global::PromptLayer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::PromptLayer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::PromptLayer.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::PromptLayer.PathBuilder( + path: $"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns/{columnId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::PromptLayer.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + 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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::PromptLayer.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateTableSheetColumnRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + tableId: tableId!, + sheetId: sheetId!, + columnId: columnId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetColumn", + methodName: "UpdateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns/{columnId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetColumn", + methodName: "UpdateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns/{columnId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::PromptLayer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::PromptLayer.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetColumn", + methodName: "UpdateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns/{columnId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::PromptLayer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateTableSheetColumnResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetColumn", + methodName: "UpdateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns/{columnId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::PromptLayer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::PromptLayer.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UpdateTableSheetColumn", + methodName: "UpdateTableSheetColumnAsync", + pathTemplate: "$\"/api/public/v2/tables/{tableId}/sheets/{sheetId}/columns/{columnId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Cycle detected or invalid config + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::PromptLayer.ErrorResponse? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::PromptLayer.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized - missing or invalid API key. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::PromptLayer.ErrorResponse? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::PromptLayer.ErrorResponse.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Table, sheet, or column not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::PromptLayer.ErrorResponse? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::PromptLayer.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateTableSheetColumnResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::PromptLayer.UpdateTableSheetColumnResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::PromptLayer.UpdateTableSheetColumnResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::PromptLayer.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::PromptLayer.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update Column
+ /// Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateTableSheetColumnAsync( + global::System.Guid tableId, + global::System.Guid sheetId, + global::System.Guid columnId, + string? title = default, + object? config = default, + global::System.Collections.Generic.IList? dependencies = default, + global::PromptLayer.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::PromptLayer.UpdateTableSheetColumnRequest + { + Title = title, + Config = config, + Dependencies = dependencies, + }; + + return await UpdateTableSheetColumnAsync( + tableId: tableId, + sheetId: sheetId, + columnId: columnId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.g.cs new file mode 100644 index 0000000..6c89c69 --- /dev/null +++ b/src/libs/PromptLayer/Generated/PromptLayer.SmartTablesClient.g.cs @@ -0,0 +1,136 @@ + +#nullable enable + +namespace PromptLayer +{ + /// + /// 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. + ///
+ public sealed partial class SmartTablesClient : global::PromptLayer.ISmartTablesClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.promptlayer.com/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::PromptLayer.AutoSDKClientOptions Options { get; } + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::PromptLayer.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the SmartTablesClient. + /// 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. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public SmartTablesClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the SmartTablesClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public SmartTablesClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::PromptLayer.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the SmartTablesClient. + /// 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. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public SmartTablesClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::PromptLayer.AutoSDKClientOptions? options, + 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(); + Options = options ?? new global::PromptLayer.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/PromptLayer/openapi.json b/src/libs/PromptLayer/openapi.json index e833cf6..a4b7ed4 100644 --- a/src/libs/PromptLayer/openapi.json +++ b/src/libs/PromptLayer/openapi.json @@ -9085,249 +9085,6 @@ } } }, - "/api/public/v2/tool-registry/{identifier}/versions": { - "post": { - "tags": [ - "tool-registry" - ], - "summary": "Create Tool Version", - "operationId": "create_tool_version", - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Tool ID (numeric) or name" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "tool_definition" - ], - "properties": { - "tool_definition": { - "type": "object", - "description": "Tool definition in OpenAI function-calling format" - }, - "execution": { - "type": "object", - "description": "Optional sandbox-executable body. When set, PromptLayer auto-runs the body between LLM turns whenever a prompt uses this version. See Auto Tool Execution.", - "nullable": true, - "required": [ - "type", - "language", - "code" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code" - ] - }, - "language": { - "type": "string", - "enum": [ - "python", - "javascript" - ] - }, - "code": { - "type": "string", - "description": "The function BODY only — the signature `def (args):` (Python) or `function (args) { ... }` (JavaScript) is generated automatically. LLM arguments arrive as a single `args` object." - } - } - }, - "commit_message": { - "type": "string", - "description": "Commit message for the new version", - "nullable": true - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Version created", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "version": { - "type": "object" - } - } - } - } - } - }, - "404": { - "description": "Tool not found" - } - } - } - }, - "/api/public/v2/tool-registry/{identifier}/test-execute": { - "post": { - "tags": [ - "tool-registry" - ], - "summary": "Test Execute Tool", - "operationId": "test_execute_tool", - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Tool ID (numeric) or name" - } - }, - { - "name": "label", - "in": "query", - "required": false, - "schema": { - "type": "string", - "description": "Resolve version by label name (e.g. production). Falls back to latest if neither label nor version supplied." - } - }, - { - "name": "version", - "in": "query", - "required": false, - "schema": { - "type": "string", - "description": "Resolve by specific version number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "inputs": { - "type": "object", - "description": "Arguments passed to the tool body. Same shape the LLM would emit — keys match the tool's parameter names.", - "additionalProperties": true - }, - "execution": { - "type": "object", - "description": "In-flight override of the stored execution config. Lets you test unsaved code.", - "nullable": true, - "required": [ - "type", - "language", - "code" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code" - ] - }, - "language": { - "type": "string", - "enum": [ - "python", - "javascript" - ] - }, - "code": { - "type": "string" - } - } - }, - "tool_definition": { - "type": "object", - "description": "In-flight override of the stored tool definition. Used to test against a different function name without saving.", - "nullable": true - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Tool executed (success or user-code error). User-code errors return status=\"error\" inside the result object — they do NOT raise.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "result": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "success", - "error" - ] - }, - "result": { - "description": "The tool body's return value (any JSON-serializable type). Present on status=\"success\".", - "nullable": true - }, - "stdout": { - "type": "string" - }, - "stderr": { - "type": "string" - }, - "duration_ms": { - "type": "integer" - }, - "error": { - "type": "object", - "nullable": true, - "description": "Present on status=\"error\". Includes `type` and `message`." - } - } - } - } - } - } - } - }, - "400": { - "description": "Missing execution config or function name" - }, - "404": { - "description": "Tool or version not found" - }, - "502": { - "description": "Sandbox infrastructure failure" - } - } - } - }, "/api/public/v2/tool-registry/{tool_id}/external-ids": { "post": { "tags": [ @@ -10024,22 +9781,2178 @@ } } }, - "/api/public/v2/traces/{trace_id}/close": { + "/api/public/v2/tables": { "post": { - "summary": "Close Trace", - "operationId": "closeTrace", "tags": [ - "tracking" + "smart-tables" ], - "description": "Marks a trace as closed, preventing any further span ingestion for that trace. Once closed, subsequent calls to `/spans-bulk` or `/v1/traces` that include spans for this trace will have those spans rejected.", - "parameters": [ - { - "name": "trace_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, + "summary": "Create Table", + "description": "Create a new Table. A default sheet with one text column is created automatically.", + "operationId": "create_table", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Table title. Defaults to a unique 'Untitled Table' name if omitted.", + "nullable": true + }, + "folder_id": { + "type": "integer", + "description": "Folder to place the table in.", + "nullable": true + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Table created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "table": { + "$ref": "#/components/schemas/TableDetail" + } + } + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Folder not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + }, + "get": { + "tags": [ + "smart-tables" + ], + "summary": "List Tables", + "description": "List Tables in the workspace. Supports cursor-based pagination and optional filtering by folder or prompt column.", + "operationId": "list_tables", + "parameters": [ + { + "name": "folder_id", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "Filter by folder ID." + } + }, + { + "name": "name", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Filter by title (case-insensitive contains match)." + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Pagination cursor from a previous response." + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "prompt_id", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "Filter to tables containing a column referencing this prompt." + } + }, + { + "name": "prompt_version_id", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "prompt_label_id", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "List of tables", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Table" + } + }, + "next_cursor": { + "type": "string", + "nullable": true + }, + "has_more": { + "type": "boolean" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/tables/{table_id}": { + "get": { + "tags": [ + "smart-tables" + ], + "summary": "Get Table", + "operationId": "get_table", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Table detail", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "table": { + "$ref": "#/components/schemas/TableDetail" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + }, + "patch": { + "tags": [ + "smart-tables" + ], + "summary": "Update Table", + "operationId": "update_table", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "folder_id": { + "type": "integer", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Table updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "table": { + "$ref": "#/components/schemas/TableDetail" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets": { + "get": { + "tags": [ + "smart-tables" + ], + "summary": "List Sheets", + "description": "List all sheets in a table, ordered by their index.", + "operationId": "list_table_sheets", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + }, + { + "name": "prompt_id", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "prompt_version_id", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "prompt_label_id", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "List of sheets", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sheet" + } + }, + "next_cursor": { + "type": "string", + "nullable": true + }, + "has_more": { + "type": "boolean" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + }, + "post": { + "tags": [ + "smart-tables" + ], + "summary": "Create Sheet", + "description": "Create a new sheet in a table by importing data from a file (CSV or JSON, base64-encoded) or from request log history.", + "operationId": "create_table_sheet", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "source" + ], + "properties": { + "title": { + "type": "string", + "nullable": true, + "description": "Sheet title. Defaults to the source file name or 'Request Logs'." + }, + "index": { + "type": "integer", + "nullable": true, + "description": "Display position within the table (0-based). Defaults to appending at the end." + }, + "operation_id": { + "type": "string", + "nullable": true, + "description": "Optional idempotency key for the import operation." + }, + "source": { + "description": "Data source for the sheet.", + "oneOf": [ + { + "type": "object", + "title": "File source", + "required": [ + "type", + "file_name", + "file_content_base64" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "file_name": { + "type": "string", + "description": "Original file name (must end in .csv or .json)." + }, + "file_content_base64": { + "type": "string", + "description": "Base64-encoded file content (max 100 MB)." + } + } + }, + { + "type": "object", + "title": "Request logs source", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "request_logs" + ] + }, + "request_log_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "nullable": true, + "description": "Specific request log IDs to import. When omitted, filter params are used." + }, + "prompt_id": { + "type": "integer", + "nullable": true + }, + "prompt_version_id": { + "type": "integer", + "nullable": true + }, + "prompt_label_id": { + "type": "integer", + "nullable": true + }, + "start_time": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "end_time": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "202": { + "description": "Import started. Poll the operation endpoint to track progress.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "operation_id": { + "type": "string" + }, + "operation": { + "$ref": "#/components/schemas/TableImportOperation" + }, + "sheet": { + "$ref": "#/components/schemas/Sheet" + } + } + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/operations/{operation_id}": { + "get": { + "tags": [ + "smart-tables" + ], + "summary": "Get Sheet Import Operation", + "description": "Poll the status of an asynchronous sheet import operation.", + "operationId": "get_table_sheet_operation", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "operation_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Operation status", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "operation": { + "$ref": "#/components/schemas/TableImportOperation" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Operation not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/{sheet_id}": { + "get": { + "tags": [ + "smart-tables" + ], + "summary": "Get Sheet", + "operationId": "get_table_sheet", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Sheet detail", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "sheet": { + "$ref": "#/components/schemas/Sheet" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table or sheet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "patch": { + "tags": [ + "smart-tables" + ], + "summary": "Update Sheet", + "operationId": "update_table_sheet", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "index": { + "type": "integer", + "nullable": true, + "description": "New display position within the table (0-based)." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Sheet updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "sheet": { + "$ref": "#/components/schemas/Sheet" + }, + "version": { + "type": "integer" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table or sheet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/{sheet_id}/columns": { + "get": { + "tags": [ + "smart-tables" + ], + "summary": "List Columns", + "description": "List columns in a sheet, ordered by position rank. By default, system-managed metadata columns such as price and latency columns are excluded; pass `include_system_columns=true` to include them.", + "operationId": "list_table_sheet_columns", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "include_system_columns", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "description": "When true, include system-managed metadata columns such as price and latency columns for prompt-template outputs." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 100, + "minimum": 1, + "maximum": 100 + } + } + ], + "responses": { + "200": { + "description": "List of columns", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Column" + } + }, + "next_cursor": { + "type": "string", + "nullable": true + }, + "has_more": { + "type": "boolean" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table or sheet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "post": { + "tags": [ + "smart-tables" + ], + "summary": "Create Column", + "description": "Add a new column to a sheet. Non-text columns will generate cells for all existing rows.", + "operationId": "create_table_sheet_column", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title", + "type" + ], + "properties": { + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text", + "prompt_template", + "llm", + "code", + "score", + "comparison", + "composition" + ] + }, + "config": { + "type": "object", + "nullable": true, + "description": "Type-specific column configuration." + }, + "dependencies": { + "type": "array", + "nullable": true, + "description": "Column dependency edges for non-text columns.", + "items": { + "type": "object", + "required": [ + "column_id" + ], + "properties": { + "column_id": { + "type": "string", + "format": "uuid" + }, + "reference_type": { + "type": "string", + "default": "value" + }, + "config_key": { + "type": "string", + "nullable": true + }, + "config_meta": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Column created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "column": { + "$ref": "#/components/schemas/Column" + }, + "cells": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Cell" + } + }, + "version": { + "type": "integer" + } + } + } + } + } + }, + "400": { + "description": "Cycle detected or invalid config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table or sheet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/{sheet_id}/columns/{column_id}": { + "patch": { + "tags": [ + "smart-tables" + ], + "summary": "Update Column", + "description": "Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values.", + "operationId": "update_table_sheet_column", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "column_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "config": { + "type": "object", + "nullable": true + }, + "dependencies": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "column_id" + ], + "properties": { + "column_id": { + "type": "string", + "format": "uuid" + }, + "reference_type": { + "type": "string", + "default": "value" + }, + "config_key": { + "type": "string", + "nullable": true + }, + "config_meta": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Column updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "column": { + "$ref": "#/components/schemas/Column" + }, + "requires_recalculation": { + "type": "boolean" + }, + "affected_column_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "version": { + "type": "integer" + } + } + } + } + } + }, + "400": { + "description": "Cycle detected or invalid config", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table, sheet, or column not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/{sheet_id}/rows": { + "get": { + "tags": [ + "smart-tables" + ], + "summary": "List Rows", + "description": "List rows in a sheet, each containing a map of column_id to cell. For prompt-template column cells, each cell can include a `request_metrics` object with price, latency, and token usage when available. Pass `include_columns=true` on the first page to receive column metadata alongside rows.", + "operationId": "list_table_sheet_rows", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "include_system_columns", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "description": "When true, include system-managed metadata columns such as price and latency columns for prompt-template outputs." + }, + { + "name": "include_execution_metadata_aggregates", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "description": "When true, include sheet-level and per-column aggregates for execution metrics such as price and latency." + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 100, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + } + }, + { + "name": "include_columns", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Include column metadata in the response. Defaults to true on the first page." + } + }, + { + "name": "include_row_count", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "List of rows", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Each item represents one row.", + "items": { + "type": "object", + "properties": { + "row_index": { + "type": "integer" + }, + "cells": { + "type": "object", + "description": "Map of column_id (UUID string) → cell object.", + "additionalProperties": { + "$ref": "#/components/schemas/Cell" + } + } + } + } + }, + "next_cursor": { + "type": "string", + "nullable": true + }, + "has_more": { + "type": "boolean" + }, + "row_count": { + "type": "integer" + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Column" + } + }, + "version": { + "type": "integer" + }, + "execution_metadata_aggregates": { + "allOf": [ + { + "$ref": "#/components/schemas/ExecutionMetadataAggregates" + } + ], + "description": "Sheet-level and per-column aggregates for price and latency metrics. Only present when `include_execution_metadata_aggregates=true`." + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table or sheet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "post": { + "tags": [ + "smart-tables" + ], + "summary": "Add Rows", + "description": "Append one or more rows to a sheet. Text column values can be set immediately; non-text column cells are created with `stale` status and must be triggered via a recalculation.", + "operationId": "add_table_sheet_rows", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Number of rows to append (1–100).", + "default": 1, + "minimum": 1, + "maximum": 100 + }, + "values": { + "type": "array", + "nullable": true, + "description": "Per-row initial values for text columns. Each element is a map of column_id → value.", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Rows added", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "rows_created": { + "type": "integer" + }, + "start_row_index": { + "type": "integer" + }, + "row_indices": { + "type": "array", + "items": { + "type": "integer" + } + }, + "rows": { + "type": "array", + "items": { + "type": "object", + "properties": { + "row_index": { + "type": "integer" + }, + "cells": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Cell" + } + } + } + } + }, + "cell_count": { + "type": "integer" + }, + "row_count": { + "type": "integer" + }, + "version": { + "type": "integer" + } + } + } + } + } + }, + "400": { + "description": "No columns defined", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table or sheet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "$ref": "#/components/responses/ValidationError" + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/{sheet_id}/cells/{cell_id}": { + "get": { + "tags": [ + "smart-tables" + ], + "summary": "Get Cell", + "operationId": "get_table_sheet_cell", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "cell_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Cell detail", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "cell": { + "$ref": "#/components/schemas/Cell" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Cell not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "description": "Retrieve a single cell by ID. For prompt-template column cells, the response includes a `request_metrics` object with price, latency, and token usage when available." + }, + "patch": { + "tags": [ + "smart-tables" + ], + "summary": "Update Cell", + "description": "Edit the value of a text column cell. Only cells in `text` type columns can be edited directly; computed cells are recalculated automatically.", + "operationId": "update_table_sheet_cell", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "cell_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "display_value": { + "type": "string", + "nullable": true, + "description": "Human-readable display value." + }, + "value": { + "description": "Structured value to store." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Cell updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "cell": { + "$ref": "#/components/schemas/Cell" + }, + "version": { + "type": "integer" + }, + "stale_count": { + "type": "integer", + "description": "Number of downstream cells marked stale due to this edit." + } + } + } + } + } + }, + "400": { + "description": "Cell is not a text column cell", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Cell not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/{sheet_id}/cells/recalculations": { + "post": { + "tags": [ + "smart-tables" + ], + "summary": "Recalculate Cells (Batch)", + "description": "Trigger recalculation for a batch of cells identified by ID.", + "operationId": "create_table_sheet_cell_recalculations_batch", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "cell_ids" + ], + "properties": { + "cell_ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "List of cell IDs to recalculate." + } + } + } + } + } + }, + "responses": { + "202": { + "description": "Recalculation started", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "execution_id": { + "type": "string" + }, + "cell_count": { + "type": "integer" + }, + "selected_cell_count": { + "type": "integer" + } + } + } + } + } + }, + "200": { + "description": "No cells to recalculate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table, sheet, or cells not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/public/v2/tables/{table_id}/sheets/{sheet_id}/cells/{cell_id}/recalculations": { + "post": { + "tags": [ + "smart-tables" + ], + "summary": "Recalculate Cell", + "description": "Trigger recalculation for a single cell.", + "operationId": "create_table_sheet_cell_recalculation", + "parameters": [ + { + "name": "table_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "sheet_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "cell_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "202": { + "description": "Recalculation started", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "execution_id": { + "type": "string" + }, + "cell_count": { + "type": "integer" + } + } + } + } + } + }, + "200": { + "description": "No cells to recalculate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "description": "Table, sheet, or cell not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/public/v2/tool-registry/{identifier}/versions": { + "post": { + "tags": [ + "tool-registry" + ], + "summary": "Create Tool Version", + "operationId": "create_tool_version", + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Tool ID (numeric) or name" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "tool_definition" + ], + "properties": { + "tool_definition": { + "type": "object", + "description": "Tool definition in OpenAI function-calling format" + }, + "execution": { + "type": "object", + "description": "Optional sandbox-executable body. When set, PromptLayer auto-runs the body between LLM turns whenever a prompt uses this version. See Auto Tool Execution.", + "nullable": true, + "required": [ + "type", + "language", + "code" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code" + ] + }, + "language": { + "type": "string", + "enum": [ + "python", + "javascript" + ] + }, + "code": { + "type": "string", + "description": "The function BODY only — the signature `def (args):` (Python) or `function (args) { ... }` (JavaScript) is generated automatically. LLM arguments arrive as a single `args` object." + } + } + }, + "commit_message": { + "type": "string", + "description": "Commit message for the new version", + "nullable": true + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Version created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "version": { + "type": "object" + } + } + } + } + } + }, + "404": { + "description": "Tool not found" + } + } + } + }, + "/api/public/v2/tool-registry/{identifier}/test-execute": { + "post": { + "tags": [ + "tool-registry" + ], + "summary": "Test Execute Tool", + "operationId": "test_execute_tool", + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Tool ID (numeric) or name" + } + }, + { + "name": "label", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Resolve version by label name (e.g. production). Falls back to latest if neither label nor version supplied." + } + }, + { + "name": "version", + "in": "query", + "required": false, + "schema": { + "type": "string", + "description": "Resolve by specific version number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "inputs": { + "type": "object", + "description": "Arguments passed to the tool body. Same shape the LLM would emit — keys match the tool's parameter names.", + "additionalProperties": true + }, + "execution": { + "type": "object", + "description": "In-flight override of the stored execution config. Lets you test unsaved code.", + "nullable": true, + "required": [ + "type", + "language", + "code" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code" + ] + }, + "language": { + "type": "string", + "enum": [ + "python", + "javascript" + ] + }, + "code": { + "type": "string" + } + } + }, + "tool_definition": { + "type": "object", + "description": "In-flight override of the stored tool definition. Used to test against a different function name without saving.", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Tool executed (success or user-code error). User-code errors return status=\"error\" inside the result object — they do NOT raise.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "result": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "success", + "error" + ] + }, + "result": { + "description": "The tool body's return value (any JSON-serializable type). Present on status=\"success\".", + "nullable": true + }, + "stdout": { + "type": "string" + }, + "stderr": { + "type": "string" + }, + "duration_ms": { + "type": "integer" + }, + "error": { + "type": "object", + "nullable": true, + "description": "Present on status=\"error\". Includes `type` and `message`." + } + } + } + } + } + } + } + }, + "400": { + "description": "Missing execution config or function name" + }, + "404": { + "description": "Tool or version not found" + }, + "502": { + "description": "Sandbox infrastructure failure" + } + } + } + }, + "/api/public/v2/traces/{trace_id}/close": { + "post": { + "summary": "Close Trace", + "operationId": "closeTrace", + "tags": [ + "tracking" + ], + "description": "Marks a trace as closed, preventing any further span ingestion for that trace. Once closed, subsequent calls to `/spans-bulk` or `/v1/traces` that include spans for this trace will have those spans rejected.", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, "description": "The trace ID to close.", "example": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" } @@ -18403,164 +20316,555 @@ "maxLength": 255, "description": "Name of the CSV or JSON file. Must end with .csv or .json." }, - "file_content_base64": { + "file_content_base64": { + "type": "string", + "minLength": 1, + "description": "Base64-encoded file content. Maximum decoded file size is 100MB." + } + } + }, + "CreateDatasetVersionFromFileResponse": { + "type": "object", + "title": "CreateDatasetVersionFromFileResponse", + "required": [ + "success", + "message", + "dataset_id" + ], + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "message": { + "type": "string" + }, + "dataset_id": { + "type": "integer", + "description": "ID of the draft dataset created for asynchronous processing." + } + } + }, + "CreateDraftDatasetVersionRequest": { + "type": "object", + "title": "CreateDraftDatasetVersionRequest", + "required": [ + "dataset_group_id" + ], + "properties": { + "dataset_group_id": { + "type": "integer", + "minimum": 1, + "description": "ID of the dataset group to create a draft version for." + }, + "source_dataset_id": { + "type": "integer", + "minimum": 1, + "nullable": true, + "description": "Optional existing dataset version to copy rows from. Must belong to the same dataset group." + } + } + }, + "DraftDatasetVersionResponse": { + "type": "object", + "title": "DraftDatasetVersionResponse", + "required": [ + "success", + "message", + "draft_dataset_id" + ], + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "message": { + "type": "string" + }, + "draft_dataset_id": { + "type": "integer", + "description": "ID of the draft dataset." + } + } + }, + "AddRequestLogToDatasetRequest": { + "type": "object", + "title": "AddRequestLogToDatasetRequest", + "required": [ + "dataset_group_id", + "request_log_id" + ], + "properties": { + "dataset_group_id": { + "type": "integer", + "minimum": 1, + "description": "ID of the dataset group containing the draft." + }, + "request_log_id": { + "type": "integer", + "minimum": 1, + "description": "ID of the request log to add as a dataset row." + } + } + }, + "SaveDraftDatasetVersionRequest": { + "type": "object", + "title": "SaveDraftDatasetVersionRequest", + "required": [ + "dataset_group_id" + ], + "properties": { + "dataset_group_id": { + "type": "integer", + "minimum": 1, + "description": "ID of the dataset group containing the draft to save." + } + } + }, + "AddTraceToDatasetRequest": { + "type": "object", + "title": "AddTraceToDatasetRequest", + "required": [ + "dataset_group_id", + "trace_id" + ], + "properties": { + "dataset_group_id": { + "type": "integer", + "minimum": 1, + "description": "ID of the dataset group to add the trace row to." + }, + "trace_id": { + "type": "string", + "minLength": 1, + "description": "ID of the trace to add as a dataset row." + }, + "span_id": { + "type": "string", + "minLength": 1, + "nullable": true, + "description": "Optional span ID. When omitted the row anchors on the trace's earliest root span (Trace export). When provided the row anchors on that span and its direct children become the columns (Span export)." + } + } + }, + "AddTraceToDatasetResponse": { + "type": "object", + "title": "AddTraceToDatasetResponse", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "draft_dataset_id": { + "type": "integer", + "description": "ID of the draft dataset the trace row was added to." + }, + "mode": { + "type": "string", + "enum": [ + "trace", + "span" + ], + "description": "Indicates whether the row was created from a full trace root (`trace`) or a specific span subtree (`span`)." + } + } + }, + "Table": { + "type": "object", + "description": "A Table — a versioned, multi-sheet table that can run LLM columns to generate or evaluate data at scale.", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique table identifier." + }, + "workspace_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "folder_id": { + "type": "integer", + "nullable": true + }, + "sheet_count": { + "type": "integer", + "description": "Number of active sheets." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + }, + "TableDetail": { + "allOf": [ + { + "$ref": "#/components/schemas/Table" + } + ], + "type": "object", + "properties": { + "sheet_row_counts": { + "type": "object", + "description": "Map of sheet_id → row count.", + "additionalProperties": { + "type": "integer" + } + } + } + }, + "Sheet": { + "type": "object", + "description": "A sheet within a Table.", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "table_id": { + "type": "string", + "format": "uuid" + }, + "workspace_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "index": { + "type": "integer", + "description": "Display order of the sheet within the table (0-based)." + }, + "row_count": { + "type": "integer" + }, + "version_count": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { "type": "string", - "minLength": 1, - "description": "Base64-encoded file content. Maximum decoded file size is 100MB." + "format": "date-time" } } }, - "CreateDatasetVersionFromFileResponse": { + "Column": { "type": "object", - "title": "CreateDatasetVersionFromFileResponse", - "required": [ - "success", - "message", - "dataset_id" - ], + "description": "A column within a Table sheet.", "properties": { - "success": { - "type": "boolean", + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier of the column." + }, + "sheet_id": { + "type": "string", + "format": "uuid" + }, + "workspace_id": { + "type": "integer" + }, + "title": { + "type": "string", + "description": "Display title of the column." + }, + "type": { + "type": "string", + "description": "Column type. 'text' columns store free-text; 'prompt_template', 'llm', 'code', 'score', 'comparison', and 'composition' columns run automated computations.", "enum": [ - true + "text", + "prompt_template", + "llm", + "code", + "score", + "comparison", + "composition" ] }, - "message": { - "type": "string" + "config": { + "type": "object", + "description": "Type-specific configuration. Shape depends on the column type." }, - "dataset_id": { - "type": "integer", - "description": "ID of the draft dataset created for asynchronous processing." + "position_rank": { + "type": "number", + "description": "Fractional position rank used for ordering." + }, + "is_output_column": { + "type": "boolean", + "description": "Whether this column is designated as an output column." } } }, - "CreateDraftDatasetVersionRequest": { + "Cell": { "type": "object", - "title": "CreateDraftDatasetVersionRequest", - "required": [ - "dataset_group_id" - ], + "description": "A single cell at the intersection of a column and a row.", "properties": { - "dataset_group_id": { - "type": "integer", - "minimum": 1, - "description": "ID of the dataset group to create a draft version for." + "id": { + "type": "string", + "format": "uuid" }, - "source_dataset_id": { - "type": "integer", - "minimum": 1, + "sheet_id": { + "type": "string", + "format": "uuid" + }, + "column_id": { + "type": "string", + "format": "uuid" + }, + "row_index": { + "type": "integer" + }, + "status": { + "type": "string", + "enum": [ + "completed", + "stale", + "running", + "queued", + "error", + "cancelled" + ], + "description": "Current computation status of the cell." + }, + "display_value": { + "type": "string", + "nullable": true + }, + "value": { + "description": "Structured cell value (type depends on column type)." + }, + "error": { + "type": "string", + "nullable": true + }, + "input_hash": { + "type": "string", "nullable": true, - "description": "Optional existing dataset version to copy rows from. Must belong to the same dataset group." + "description": "Hash of the inputs used to compute this cell, used for cache invalidation." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp of the last update." + }, + "request_metrics": { + "allOf": [ + { + "$ref": "#/components/schemas/SmartTableRequestMetrics" + } + ], + "nullable": true, + "description": "Execution metrics populated for prompt-template column cells. Present only when the cell has an associated request log." } } }, - "DraftDatasetVersionResponse": { + "TableImportOperation": { "type": "object", - "title": "DraftDatasetVersionResponse", - "required": [ - "success", - "message", - "draft_dataset_id" - ], + "description": "Status of an asynchronous sheet import operation.", "properties": { - "success": { - "type": "boolean", + "operation_id": { + "type": "string" + }, + "source": { + "type": "string", "enum": [ - true + "file", + "request_logs" + ] + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "completed", + "failed" ] }, + "progress": { + "type": "number", + "nullable": true + }, "message": { - "type": "string" + "type": "string", + "nullable": true }, - "draft_dataset_id": { + "rows_added": { "type": "integer", - "description": "ID of the draft dataset." + "nullable": true + }, + "row_count": { + "type": "integer", + "nullable": true + }, + "file_name": { + "type": "string", + "nullable": true + }, + "error_message": { + "type": "string", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true } } }, - "AddRequestLogToDatasetRequest": { + "SmartTableRequestMetrics": { "type": "object", - "title": "AddRequestLogToDatasetRequest", - "required": [ - "dataset_group_id", - "request_log_id" - ], + "description": "Execution metrics for a prompt-template cell, derived from the underlying request log.", "properties": { - "dataset_group_id": { + "request_count": { "type": "integer", - "minimum": 1, - "description": "ID of the dataset group containing the draft." + "description": "Number of LLM requests made to produce this cell's value." }, - "request_log_id": { + "request_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "IDs of the request logs associated with this cell." + }, + "latency_ms": { "type": "integer", - "minimum": 1, - "description": "ID of the request log to add as a dataset row." - } - } - }, - "SaveDraftDatasetVersionRequest": { - "type": "object", - "title": "SaveDraftDatasetVersionRequest", - "required": [ - "dataset_group_id" - ], - "properties": { - "dataset_group_id": { + "nullable": true, + "description": "Total end-to-end latency in milliseconds." + }, + "price": { + "type": "number", + "nullable": true, + "description": "Total cost in USD for all requests that produced this cell." + }, + "input_tokens": { "type": "integer", - "minimum": 1, - "description": "ID of the dataset group containing the draft to save." + "nullable": true, + "description": "Total number of input tokens across all requests." + }, + "output_tokens": { + "type": "integer", + "nullable": true, + "description": "Total number of output tokens across all requests." + }, + "trace_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Trace IDs linked to this cell (present when the cell was produced via an OpenTelemetry-traced workflow)." } } }, - "AddTraceToDatasetRequest": { + "ExecutionMetadataMetricAggregate": { "type": "object", - "title": "AddTraceToDatasetRequest", - "required": [ - "dataset_group_id", - "trace_id" - ], + "description": "Aggregated statistics for a single execution metric (e.g. price or latency) across all rows in a sheet.", "properties": { - "dataset_group_id": { + "metric_key": { + "type": "string", + "description": "Internal metric identifier. One of `price` or `latency_ms`.", + "enum": [ + "price", + "latency_ms" + ] + }, + "metric_label": { + "type": "string", + "nullable": true, + "description": "Human-readable label for the metric." + }, + "count": { "type": "integer", - "minimum": 1, - "description": "ID of the dataset group to add the trace row to." + "description": "Number of rows that have a value for this metric." }, - "trace_id": { + "sum": { + "type": "number", + "description": "Sum of all metric values." + }, + "avg": { + "type": "number", + "nullable": true, + "description": "Average metric value, or null if count is 0." + }, + "min": { + "type": "number", + "nullable": true, + "description": "Minimum metric value, or null if count is 0." + }, + "max": { + "type": "number", + "nullable": true, + "description": "Maximum metric value, or null if count is 0." + }, + "column_id": { "type": "string", - "minLength": 1, - "description": "ID of the trace to add as a dataset row." + "format": "uuid", + "description": "ID of the system-managed metadata column for this metric. Omitted for sheet-level aggregates." }, - "span_id": { + "source_column_id": { "type": "string", - "minLength": 1, - "nullable": true, - "description": "Optional span ID. When omitted the row anchors on the trace's earliest root span (Trace export). When provided the row anchors on that span and its direct children become the columns (Span export)." + "format": "uuid", + "description": "ID of the prompt-template source column. Omitted for sheet-level aggregates." } - } + }, + "required": [ + "metric_key", + "count", + "sum" + ] }, - "AddTraceToDatasetResponse": { + "ExecutionMetadataAggregates": { "type": "object", - "title": "AddTraceToDatasetResponse", + "description": "Sheet-level and per-column aggregates for execution metrics (price and latency) across all prompt-template columns.", "properties": { - "success": { - "type": "boolean", - "enum": [ - true - ] - }, - "draft_dataset_id": { - "type": "integer", - "description": "ID of the draft dataset the trace row was added to." + "by_column_id": { + "type": "object", + "description": "Per-column aggregates keyed by the system-managed metadata column ID.", + "additionalProperties": { + "$ref": "#/components/schemas/ExecutionMetadataMetricAggregate" + } }, - "mode": { - "type": "string", - "enum": [ - "trace", - "span" - ], - "description": "Indicates whether the row was created from a full trace root (`trace`) or a specific span subtree (`span`)." + "sheet": { + "type": "object", + "description": "Sheet-wide aggregates rolled up across all prompt-template columns.", + "properties": { + "by_metric": { + "type": "object", + "description": "Aggregates keyed by metric key (`price`, `latency_ms`).", + "additionalProperties": { + "$ref": "#/components/schemas/ExecutionMetadataMetricAggregate" + } + } + }, + "required": [ + "by_metric" + ] } - } + }, + "required": [ + "by_column_id", + "sheet" + ] } }, "responses": {