diff --git a/src/libs/Serper/Generated/Serper.JsonConverters.ScholarSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.JsonConverters.ScholarSearchRequest.g.cs index 547e38d..f5b4157 100644 --- a/src/libs/Serper/Generated/Serper.JsonConverters.ScholarSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.JsonConverters.ScholarSearchRequest.g.cs @@ -42,8 +42,8 @@ public class ScholarSearchRequestJsonConverter : global::System.Text.Json.Serial if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::Serper.BaseSearchRequest? value1 = default; - global::Serper.ScholarSearchRequestVariant2? value2 = default; + global::Serper.BaseSearchRequest? @base = default; + global::Serper.ScholarSearchRequestVariant2? scholarSearchRequestVariant2 = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -52,7 +52,7 @@ public class ScholarSearchRequestJsonConverter : global::System.Text.Json.Serial { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.BaseSearchRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.BaseSearchRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -67,7 +67,7 @@ public class ScholarSearchRequestJsonConverter : global::System.Text.Json.Serial { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.ScholarSearchRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.ScholarSearchRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + scholarSearchRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -78,13 +78,13 @@ public class ScholarSearchRequestJsonConverter : global::System.Text.Json.Serial } } - if (value1 == null && value2 == null) + if (@base == null && scholarSearchRequestVariant2 == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.BaseSearchRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.BaseSearchRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -97,7 +97,7 @@ public class ScholarSearchRequestJsonConverter : global::System.Text.Json.Serial { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.ScholarSearchRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.ScholarSearchRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + scholarSearchRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -108,9 +108,9 @@ public class ScholarSearchRequestJsonConverter : global::System.Text.Json.Serial } var __value = new global::Serper.ScholarSearchRequest( - value1, + @base, - value2 + scholarSearchRequestVariant2 ); return __value; @@ -125,17 +125,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsBase) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.BaseSearchRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.BaseSearchRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); } - else if (value.IsValue2) + else if (value.IsScholarSearchRequestVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.ScholarSearchRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.ScholarSearchRequestVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ScholarSearchRequestVariant2!, typeInfo); } } } diff --git a/src/libs/Serper/Generated/Serper.JsonConverters.SearchRequest.g.cs b/src/libs/Serper/Generated/Serper.JsonConverters.SearchRequest.g.cs index 7efadf7..fd00cb1 100644 --- a/src/libs/Serper/Generated/Serper.JsonConverters.SearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.JsonConverters.SearchRequest.g.cs @@ -40,8 +40,8 @@ public class SearchRequestJsonConverter : global::System.Text.Json.Serialization if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::Serper.BaseSearchRequest? value1 = default; - global::Serper.SearchRequestVariant2? value2 = default; + global::Serper.BaseSearchRequest? @base = default; + global::Serper.SearchRequestVariant2? searchRequestVariant2 = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -50,7 +50,7 @@ public class SearchRequestJsonConverter : global::System.Text.Json.Serialization { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.BaseSearchRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.BaseSearchRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -65,7 +65,7 @@ public class SearchRequestJsonConverter : global::System.Text.Json.Serialization { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.SearchRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.SearchRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + searchRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -76,13 +76,13 @@ public class SearchRequestJsonConverter : global::System.Text.Json.Serialization } } - if (value1 == null && value2 == null) + if (@base == null && searchRequestVariant2 == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.BaseSearchRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.BaseSearchRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -95,7 +95,7 @@ public class SearchRequestJsonConverter : global::System.Text.Json.Serialization { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.SearchRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.SearchRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + searchRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -106,9 +106,9 @@ public class SearchRequestJsonConverter : global::System.Text.Json.Serialization } var __value = new global::Serper.SearchRequest( - value1, + @base, - value2 + searchRequestVariant2 ); return __value; @@ -123,17 +123,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsBase) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.BaseSearchRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.BaseSearchRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); } - else if (value.IsValue2) + else if (value.IsSearchRequestVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Serper.SearchRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Serper.SearchRequestVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchRequestVariant2!, typeInfo); } } } diff --git a/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs index 380b65c..41a87b6 100644 --- a/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.ScholarSearchRequest.g.cs @@ -13,35 +13,35 @@ namespace Serper /// /// #if NET6_0_OR_GREATER - public global::Serper.BaseSearchRequest? Value1 { get; init; } + public global::Serper.BaseSearchRequest? Base { get; init; } #else - public global::Serper.BaseSearchRequest? Value1 { get; } + public global::Serper.BaseSearchRequest? Base { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif - public bool IsValue1 => Value1 != null; + public bool IsBase => Base != null; /// /// /// #if NET6_0_OR_GREATER - public global::Serper.ScholarSearchRequestVariant2? Value2 { get; init; } + public global::Serper.ScholarSearchRequestVariant2? ScholarSearchRequestVariant2 { get; init; } #else - public global::Serper.ScholarSearchRequestVariant2? Value2 { get; } + public global::Serper.ScholarSearchRequestVariant2? ScholarSearchRequestVariant2 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ScholarSearchRequestVariant2))] #endif - public bool IsValue2 => Value2 != null; + public bool IsScholarSearchRequestVariant2 => ScholarSearchRequestVariant2 != null; /// /// /// @@ -50,14 +50,14 @@ namespace Serper /// /// /// - public static implicit operator global::Serper.BaseSearchRequest?(ScholarSearchRequest @this) => @this.Value1; + public static implicit operator global::Serper.BaseSearchRequest?(ScholarSearchRequest @this) => @this.Base; /// /// /// public ScholarSearchRequest(global::Serper.BaseSearchRequest? value) { - Value1 = value; + Base = value; } /// @@ -68,42 +68,42 @@ public ScholarSearchRequest(global::Serper.BaseSearchRequest? value) /// /// /// - public static implicit operator global::Serper.ScholarSearchRequestVariant2?(ScholarSearchRequest @this) => @this.Value2; + public static implicit operator global::Serper.ScholarSearchRequestVariant2?(ScholarSearchRequest @this) => @this.ScholarSearchRequestVariant2; /// /// /// public ScholarSearchRequest(global::Serper.ScholarSearchRequestVariant2? value) { - Value2 = value; + ScholarSearchRequestVariant2 = value; } /// /// /// public ScholarSearchRequest( - global::Serper.BaseSearchRequest? value1, - global::Serper.ScholarSearchRequestVariant2? value2 + global::Serper.BaseSearchRequest? @base, + global::Serper.ScholarSearchRequestVariant2? scholarSearchRequestVariant2 ) { - Value1 = value1; - Value2 = value2; + Base = @base; + ScholarSearchRequestVariant2 = scholarSearchRequestVariant2; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + ScholarSearchRequestVariant2 as object ?? + Base as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + Base?.ToString() ?? + ScholarSearchRequestVariant2?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsBase && IsScholarSearchRequestVariant2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? @base = null, + global::System.Func? scholarSearchRequestVariant2 = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsBase && @base != null) { - return value1(Value1!); + return @base(Base!); } - else if (IsValue2 && value2 != null) + else if (IsScholarSearchRequestVariant2 && scholarSearchRequestVariant2 != null) { - return value2(Value2!); + return scholarSearchRequestVariant2(ScholarSearchRequestVariant2!); } return default(TResult); @@ -143,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? @base = null, + global::System.Action? scholarSearchRequestVariant2 = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsBase) { - value1?.Invoke(Value1!); + @base?.Invoke(Base!); } - else if (IsValue2) + else if (IsScholarSearchRequestVariant2) { - value2?.Invoke(Value2!); + scholarSearchRequestVariant2?.Invoke(ScholarSearchRequestVariant2!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Base, typeof(global::Serper.BaseSearchRequest), - Value2, + ScholarSearchRequestVariant2, typeof(global::Serper.ScholarSearchRequestVariant2), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ScholarSearchRequest other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ScholarSearchRequestVariant2, other.ScholarSearchRequestVariant2) ; } diff --git a/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs b/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs index e35704e..f6a2fa0 100644 --- a/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs +++ b/src/libs/Serper/Generated/Serper.Models.SearchRequest.g.cs @@ -13,35 +13,35 @@ namespace Serper /// /// #if NET6_0_OR_GREATER - public global::Serper.BaseSearchRequest? Value1 { get; init; } + public global::Serper.BaseSearchRequest? Base { get; init; } #else - public global::Serper.BaseSearchRequest? Value1 { get; } + public global::Serper.BaseSearchRequest? Base { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif - public bool IsValue1 => Value1 != null; + public bool IsBase => Base != null; /// /// /// #if NET6_0_OR_GREATER - public global::Serper.SearchRequestVariant2? Value2 { get; init; } + public global::Serper.SearchRequestVariant2? SearchRequestVariant2 { get; init; } #else - public global::Serper.SearchRequestVariant2? Value2 { get; } + public global::Serper.SearchRequestVariant2? SearchRequestVariant2 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchRequestVariant2))] #endif - public bool IsValue2 => Value2 != null; + public bool IsSearchRequestVariant2 => SearchRequestVariant2 != null; /// /// /// @@ -50,14 +50,14 @@ namespace Serper /// /// /// - public static implicit operator global::Serper.BaseSearchRequest?(SearchRequest @this) => @this.Value1; + public static implicit operator global::Serper.BaseSearchRequest?(SearchRequest @this) => @this.Base; /// /// /// public SearchRequest(global::Serper.BaseSearchRequest? value) { - Value1 = value; + Base = value; } /// @@ -68,42 +68,42 @@ public SearchRequest(global::Serper.BaseSearchRequest? value) /// /// /// - public static implicit operator global::Serper.SearchRequestVariant2?(SearchRequest @this) => @this.Value2; + public static implicit operator global::Serper.SearchRequestVariant2?(SearchRequest @this) => @this.SearchRequestVariant2; /// /// /// public SearchRequest(global::Serper.SearchRequestVariant2? value) { - Value2 = value; + SearchRequestVariant2 = value; } /// /// /// public SearchRequest( - global::Serper.BaseSearchRequest? value1, - global::Serper.SearchRequestVariant2? value2 + global::Serper.BaseSearchRequest? @base, + global::Serper.SearchRequestVariant2? searchRequestVariant2 ) { - Value1 = value1; - Value2 = value2; + Base = @base; + SearchRequestVariant2 = searchRequestVariant2; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + SearchRequestVariant2 as object ?? + Base as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + Base?.ToString() ?? + SearchRequestVariant2?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsBase && IsSearchRequestVariant2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? @base = null, + global::System.Func? searchRequestVariant2 = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsBase && @base != null) { - return value1(Value1!); + return @base(Base!); } - else if (IsValue2 && value2 != null) + else if (IsSearchRequestVariant2 && searchRequestVariant2 != null) { - return value2(Value2!); + return searchRequestVariant2(SearchRequestVariant2!); } return default(TResult); @@ -143,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? @base = null, + global::System.Action? searchRequestVariant2 = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsBase) { - value1?.Invoke(Value1!); + @base?.Invoke(Base!); } - else if (IsValue2) + else if (IsSearchRequestVariant2) { - value2?.Invoke(Value2!); + searchRequestVariant2?.Invoke(SearchRequestVariant2!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Base, typeof(global::Serper.BaseSearchRequest), - Value2, + SearchRequestVariant2, typeof(global::Serper.SearchRequestVariant2), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(SearchRequest other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchRequestVariant2, other.SearchRequestVariant2) ; }