Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions src/libs/Recombee/Generated/Recombee.AutoSDKHttpResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@

#nullable enable

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

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

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

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

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

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

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

return headers;
}
}

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

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

/// <summary>
/// Gets the response body.
/// </summary>
public T Body { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ public partial interface IItemPropertiesClient
string databaseId,
string itemId,

string request,
bool? cascadeCreate = default,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Set Item Values<br/>
/// Sets/updates (some) property values of the given item. The properties (columns) must be previously created by [Add item property](https://docs.recombee.com/api#add-item-property).
/// </summary>
/// <param name="databaseId"></param>
/// <param name="itemId"></param>
/// <param name="cascadeCreate"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse> CreateByDatabaseIdItemsByItemIdAsResponseAsync(
string databaseId,
string itemId,

string request,
bool? cascadeCreate = default,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,28 @@ public partial interface IItemPropertiesClient
/// ```
/// </summary>
/// <param name="databaseId"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse<global::Recombee.UpdateMoreItemsResponse>> CreateByDatabaseIdMoreItemsAsResponseAsync(
string databaseId,

global::Recombee.UpdateMoreItemsParameters request,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Update More Items<br/>
/// Updates (some) property values of all the items that pass the filter.<br/>
/// Example: *Setting all the items that are older than a week as unavailable*<br/>
/// ```json<br/>
/// {<br/>
/// "filter": "'releaseDate' &lt; now() - 7*24*3600",<br/>
/// "changes": {"available": false}<br/>
/// }<br/>
/// ```
/// </summary>
/// <param name="databaseId"></param>
/// <param name="filter">
/// A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,19 @@ public partial interface IItemPropertiesClient
string propertyName,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Delete Item Property<br/>
/// Deleting an item property is roughly equivalent to removing a column from the table of items.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="propertyName"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse> DeleteByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync(
string databaseId,
string propertyName,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,19 @@ public partial interface IItemPropertiesClient
string itemId,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Get Item Values<br/>
/// Gets all the current property values of the given item.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="itemId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse<string>> GetByDatabaseIdItemsByItemIdAsResponseAsync(
string databaseId,
string itemId,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,19 @@ public partial interface IItemPropertiesClient
string propertyName,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Get Item Property Info<br/>
/// Gets information about specified item property.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="propertyName"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse<global::Recombee.PropertyInfo>> GetByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync(
string databaseId,
string propertyName,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,17 @@ public partial interface IItemPropertiesClient
string databaseId,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List Item Properties<br/>
/// Gets the list of all the item properties in your database.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse<global::System.Collections.Generic.IList<global::Recombee.PropertyInfo>>> GetByDatabaseIdItemsPropertiesListAsResponseAsync(
string databaseId,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,21 @@ public partial interface IItemPropertiesClient
global::Recombee.PutItemsPropertiesType type,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Add Item Property<br/>
/// Adding an item property is somewhat equivalent to adding a column to the table of items. The items may be characterized by various properties of different types.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="propertyName"></param>
/// <param name="type"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse> PutByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync(
string databaseId,
string propertyName,
global::Recombee.PutItemsPropertiesType type,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,21 @@ public partial interface IItemsClient
string itemId,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Delete Item<br/>
/// Deletes an item of the given `itemId` from the catalog.<br/>
/// If there are any *purchases*, *ratings*, *bookmarks*, *cart additions*, or *detail views* of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some *series*, it will be removed from all the *series* where present.<br/>
/// If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="itemId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse> DeleteByDatabaseIdItemsByItemIdAsResponseAsync(
string databaseId,
string itemId,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ public partial interface IItemsClient
/// If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse<global::Recombee.DeleteMoreItemsResponse>> DeleteByDatabaseIdMoreItemsAsResponseAsync(
string databaseId,

global::Recombee.DeleteMoreItemsParameters request,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Delete More Items<br/>
/// Deletes all the items that pass the filter.<br/>
/// If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="filter">
/// A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,27 @@ public partial interface IItemsClient
global::System.Collections.Generic.IList<string>? includedProperties = default,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List Items<br/>
/// Gets a list of IDs of items currently present in the catalog.
/// </summary>
/// <param name="databaseId"></param>
/// <param name="filter"></param>
/// <param name="count"></param>
/// <param name="offset"></param>
/// <param name="returnProperties"></param>
/// <param name="includedProperties"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Recombee.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Recombee.AutoSDKHttpResponse<global::System.Collections.Generic.IList<global::Recombee.Item>>> GetByDatabaseIdItemsListAsResponseAsync(
string databaseId,
string? filter = default,
int? count = default,
int? offset = default,
bool? returnProperties = default,
global::System.Collections.Generic.IList<string>? includedProperties = default,
global::Recombee.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Loading