From f5a0a9a88d668a7dd7ea6597e1ada1b6ec49d591 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 May 2026 02:26:25 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Serper.Models.ImageSearchRequest.g.cs | 35 ++++++++++- .../Serper.Models.NewsSearchRequest.g.cs | 35 ++++++++++- .../Serper.Models.PatentSearchRequest.g.cs | 35 ++++++++++- .../Serper.Models.PlacesSearchRequest.g.cs | 35 ++++++++++- .../Serper.Models.ScholarSearchRequest.g.cs | 58 +++++++++++++++++-- .../Serper.Models.SearchRequest.g.cs | 58 +++++++++++++++++-- .../Serper.Models.ShoppingSearchRequest.g.cs | 35 ++++++++++- .../Serper.Models.VideoSearchRequest.g.cs | 35 ++++++++++- ...perClient.Constructors.ApiKeyInHeader.g.cs | 1 + 9 files changed, 307 insertions(+), 20 deletions(-) diff --git a/src/libs/Serper/Generated/Serper.Models.ImageSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.ImageSearchRequest.g.cs index 471bf06..e13eb74 100644 --- a/src/libs/Serper/Generated/Serper.Models.ImageSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.ImageSearchRequest.g.cs @@ -25,6 +25,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, + global::System.Func? @base = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.Models.NewsSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.NewsSearchRequest.g.cs index abc6811..ab6e798 100644 --- a/src/libs/Serper/Generated/Serper.Models.NewsSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.NewsSearchRequest.g.cs @@ -25,6 +25,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, + global::System.Func? @base = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.Models.PatentSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.PatentSearchRequest.g.cs index 0e52cfb..bdaedcd 100644 --- a/src/libs/Serper/Generated/Serper.Models.PatentSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.PatentSearchRequest.g.cs @@ -25,6 +25,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, + global::System.Func? @base = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.Models.PlacesSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.PlacesSearchRequest.g.cs index 0c9c835..d2b2364 100644 --- a/src/libs/Serper/Generated/Serper.Models.PlacesSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.PlacesSearchRequest.g.cs @@ -25,6 +25,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, + global::System.Func? @base = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs index 41a87b6..1ccbf24 100644 --- a/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs @@ -26,6 +26,19 @@ namespace Serper #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ScholarSearchRequestVariant2))] #endif public bool IsScholarSearchRequestVariant2 => ScholarSearchRequestVariant2 != null; + + /// + /// + /// + public bool TryPickScholarSearchRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.ScholarSearchRequestVariant2? value) + { + value = ScholarSearchRequestVariant2; + return IsScholarSearchRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? scholarSearchRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? scholarSearchRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? scholarSearchRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? scholarSearchRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsScholarSearchRequestVariant2) + { + scholarSearchRequestVariant2?.Invoke(ScholarSearchRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? scholarSearchRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs index f6a2fa0..dca8a1c 100644 --- a/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs @@ -26,6 +26,19 @@ namespace Serper #endif public bool IsBase => Base != null; + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } + /// /// /// @@ -42,6 +55,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchRequestVariant2))] #endif public bool IsSearchRequestVariant2 => SearchRequestVariant2 != null; + + /// + /// + /// + public bool TryPickSearchRequestVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.SearchRequestVariant2? value) + { + value = SearchRequestVariant2; + return IsSearchRequestVariant2; + } /// /// /// @@ -118,8 +144,8 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, - global::System.Func? searchRequestVariant2 = null, + global::System.Func? @base = null, + global::System.Func? searchRequestVariant2 = null, bool validate = true) { if (validate) @@ -143,8 +169,32 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, - global::System.Action? searchRequestVariant2 = null, + global::System.Action? @base = null, + + global::System.Action? searchRequestVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsSearchRequestVariant2) + { + searchRequestVariant2?.Invoke(SearchRequestVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? searchRequestVariant2 = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.Models.ShoppingSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.ShoppingSearchRequest.g.cs index 3ca13de..e199da3 100644 --- a/src/libs/Serper/Generated/Serper.Models.ShoppingSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.ShoppingSearchRequest.g.cs @@ -25,6 +25,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, + global::System.Func? @base = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.Models.VideoSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.VideoSearchRequest.g.cs index da2a365..859548a 100644 --- a/src/libs/Serper/Generated/Serper.Models.VideoSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.VideoSearchRequest.g.cs @@ -25,6 +25,19 @@ namespace Serper [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Serper.BaseSearchRequest? value) + { + value = Base; + return IsBase; + } /// /// /// @@ -69,7 +82,7 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? @base = null, + global::System.Func? @base = null, bool validate = true) { if (validate) @@ -89,7 +102,25 @@ public bool Validate() /// /// public void Match( - global::System.Action? @base = null, + global::System.Action? @base = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, bool validate = true) { if (validate) diff --git a/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs index 09825bd..a4538ec 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs @@ -26,5 +26,6 @@ partial void Authorizing( ref string apiKey); partial void Authorized( global::System.Net.Http.HttpClient client); + } } \ No newline at end of file