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/Serper/Generated/Serper.AutoSDKHttpResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@

#nullable enable

namespace Serper
{
/// <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; }
}
}
13 changes: 13 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.Autocomplete.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface ISerperClient
/// Autocomplete<br/>
/// Get Google autocomplete suggestions for a partial query.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.AutocompleteResponse>> AutocompleteAsResponseAsync(

global::Serper.AutocompleteRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Autocomplete<br/>
/// Get Google autocomplete suggestions for a partial query.
/// </summary>
/// <param name="q">
/// Partial query string for autocomplete suggestions.<br/>
/// Example: apple
Expand Down
13 changes: 13 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.ImageSearch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface ISerperClient
/// Image Search<br/>
/// Search Google Images for image results.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.ImageSearchResponse>> ImageSearchAsResponseAsync(

global::Serper.ImageSearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Image Search<br/>
/// Search Google Images for image results.
/// </summary>
/// <param name="q">
/// Search query string.<br/>
/// Example: apple inc
Expand Down
13 changes: 13 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.NewsSearch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface ISerperClient
/// News Search<br/>
/// Search Google News for recent articles and stories.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.NewsSearchResponse>> NewsSearchAsResponseAsync(

global::Serper.NewsSearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// News Search<br/>
/// Search Google News for recent articles and stories.
/// </summary>
/// <param name="q">
/// Search query string.<br/>
/// Example: apple inc
Expand Down
13 changes: 13 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.PatentSearch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface ISerperClient
/// Patent Search<br/>
/// Search Google Patents for patent documents and applications.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.PatentSearchResponse>> PatentSearchAsResponseAsync(

global::Serper.PatentSearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Patent Search<br/>
/// Search Google Patents for patent documents and applications.
/// </summary>
/// <param name="q">
/// Search query string.<br/>
/// Example: apple inc
Expand Down
13 changes: 13 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.PlacesSearch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface ISerperClient
/// Places Search<br/>
/// Search Google Maps/Places for local businesses and points of interest.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.PlacesSearchResponse>> PlacesSearchAsResponseAsync(

global::Serper.PlacesSearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Places Search<br/>
/// Search Google Maps/Places for local businesses and points of interest.
/// </summary>
/// <param name="q">
/// Search query string.<br/>
/// Example: apple inc
Expand Down
14 changes: 14 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.ScholarSearch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ public partial interface ISerperClient
/// Search Google Scholar for academic papers, articles, theses, and citations.<br/>
/// Supports filtering by year range and finding papers that cite a specific work.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.ScholarSearchResponse>> ScholarSearchAsResponseAsync(

global::Serper.ScholarSearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Scholar Search<br/>
/// Search Google Scholar for academic papers, articles, theses, and citations.<br/>
/// Supports filtering by year range and finding papers that cite a specific work.
/// </summary>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand Down
14 changes: 14 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.Search.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ public partial interface ISerperClient
/// Perform a Google web search. Returns organic results, knowledge graph, answer box,<br/>
/// people also ask, and related searches.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.SearchResponse>> SearchAsResponseAsync(

global::Serper.SearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Google Search<br/>
/// Perform a Google web search. Returns organic results, knowledge graph, answer box,<br/>
/// people also ask, and related searches.
/// </summary>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand Down
13 changes: 13 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.ShoppingSearch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface ISerperClient
/// Shopping Search<br/>
/// Search Google Shopping for product listings and prices.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.ShoppingSearchResponse>> ShoppingSearchAsResponseAsync(

global::Serper.ShoppingSearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Shopping Search<br/>
/// Search Google Shopping for product listings and prices.
/// </summary>
/// <param name="q">
/// Search query string.<br/>
/// Example: apple inc
Expand Down
13 changes: 13 additions & 0 deletions src/libs/Serper/Generated/Serper.ISerperClient.VideoSearch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ public partial interface ISerperClient
/// Video Search<br/>
/// Search Google for video results from YouTube and other video platforms.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Serper.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Serper.AutoSDKHttpResponse<global::Serper.VideoSearchResponse>> VideoSearchAsResponseAsync(

global::Serper.VideoSearchRequest request,
global::Serper.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Video Search<br/>
/// Search Google for video results from YouTube and other video platforms.
/// </summary>
/// <param name="q">
/// Search query string.<br/>
/// Example: apple inc
Expand Down
Loading