diff --git a/src/libs/Recraft/Generated/Recraft.JsonConverters.CreateStyleResponse.g.cs b/src/libs/Recraft/Generated/Recraft.JsonConverters.CreateStyleResponse.g.cs index acdffb5..7578ea5 100644 --- a/src/libs/Recraft/Generated/Recraft.JsonConverters.CreateStyleResponse.g.cs +++ b/src/libs/Recraft/Generated/Recraft.JsonConverters.CreateStyleResponse.g.cs @@ -39,8 +39,8 @@ public class CreateStyleResponseJsonConverter : global::System.Text.Json.Seriali if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::Recraft.Style? value1 = default; - global::Recraft.CreateStyleResponseVariant2? value2 = default; + global::Recraft.Style? style = default; + global::Recraft.CreateStyleResponseVariant2? createStyleResponseVariant2 = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -49,7 +49,7 @@ public class CreateStyleResponseJsonConverter : global::System.Text.Json.Seriali { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.Style), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.Style).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + style = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -64,7 +64,7 @@ public class CreateStyleResponseJsonConverter : global::System.Text.Json.Seriali { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.CreateStyleResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.CreateStyleResponseVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + createStyleResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -75,13 +75,13 @@ public class CreateStyleResponseJsonConverter : global::System.Text.Json.Seriali } } - if (value1 == null && value2 == null) + if (style == null && createStyleResponseVariant2 == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.Style), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.Style).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + style = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -94,7 +94,7 @@ public class CreateStyleResponseJsonConverter : global::System.Text.Json.Seriali { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.CreateStyleResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.CreateStyleResponseVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + createStyleResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -105,9 +105,9 @@ public class CreateStyleResponseJsonConverter : global::System.Text.Json.Seriali } var __value = new global::Recraft.CreateStyleResponse( - value1, + style, - value2 + createStyleResponseVariant2 ); return __value; @@ -122,17 +122,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.IsStyle) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.Style), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.Style).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Style!, typeInfo); } - else if (value.IsValue2) + else if (value.IsCreateStyleResponseVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.CreateStyleResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.CreateStyleResponseVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateStyleResponseVariant2!, typeInfo); } } } diff --git a/src/libs/Recraft/Generated/Recraft.JsonConverters.TransformImageWithMaskRequest.g.cs b/src/libs/Recraft/Generated/Recraft.JsonConverters.TransformImageWithMaskRequest.g.cs index 04784f6..eb37862 100644 --- a/src/libs/Recraft/Generated/Recraft.JsonConverters.TransformImageWithMaskRequest.g.cs +++ b/src/libs/Recraft/Generated/Recraft.JsonConverters.TransformImageWithMaskRequest.g.cs @@ -49,8 +49,8 @@ public class TransformImageWithMaskRequestJsonConverter : global::System.Text.Js if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::Recraft.TransformImageRequest? value1 = default; - global::Recraft.TransformImageWithMaskRequestVariant2? value2 = default; + global::Recraft.TransformImageRequest? transformImageRequest = default; + global::Recraft.TransformImageWithMaskRequestVariant2? transformImageWithMaskRequestVariant2 = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -59,7 +59,7 @@ public class TransformImageWithMaskRequestJsonConverter : global::System.Text.Js { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.TransformImageRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.TransformImageRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + transformImageRequest = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -74,7 +74,7 @@ public class TransformImageWithMaskRequestJsonConverter : global::System.Text.Js { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.TransformImageWithMaskRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.TransformImageWithMaskRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + transformImageWithMaskRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -85,13 +85,13 @@ public class TransformImageWithMaskRequestJsonConverter : global::System.Text.Js } } - if (value1 == null && value2 == null) + if (transformImageRequest == null && transformImageWithMaskRequestVariant2 == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.TransformImageRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.TransformImageRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + transformImageRequest = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -104,7 +104,7 @@ public class TransformImageWithMaskRequestJsonConverter : global::System.Text.Js { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.TransformImageWithMaskRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.TransformImageWithMaskRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + transformImageWithMaskRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -115,9 +115,9 @@ public class TransformImageWithMaskRequestJsonConverter : global::System.Text.Js } var __value = new global::Recraft.TransformImageWithMaskRequest( - value1, + transformImageRequest, - value2 + transformImageWithMaskRequestVariant2 ); return __value; @@ -132,17 +132,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.IsTransformImageRequest) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.TransformImageRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.TransformImageRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TransformImageRequest!, typeInfo); } - else if (value.IsValue2) + else if (value.IsTransformImageWithMaskRequestVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.TransformImageWithMaskRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.TransformImageWithMaskRequestVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TransformImageWithMaskRequestVariant2!, typeInfo); } } } diff --git a/src/libs/Recraft/Generated/Recraft.JsonConverters.VectorizeImageRequest.g.cs b/src/libs/Recraft/Generated/Recraft.JsonConverters.VectorizeImageRequest.g.cs index 5860cfa..6b1e773 100644 --- a/src/libs/Recraft/Generated/Recraft.JsonConverters.VectorizeImageRequest.g.cs +++ b/src/libs/Recraft/Generated/Recraft.JsonConverters.VectorizeImageRequest.g.cs @@ -45,8 +45,8 @@ public class VectorizeImageRequestJsonConverter : global::System.Text.Json.Seria if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::Recraft.ProcessImageRequest? value1 = default; - global::Recraft.VectorizeImageRequestVariant2? value2 = default; + global::Recraft.ProcessImageRequest? process = default; + global::Recraft.VectorizeImageRequestVariant2? vectorizeImageRequestVariant2 = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -55,7 +55,7 @@ public class VectorizeImageRequestJsonConverter : global::System.Text.Json.Seria { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.ProcessImageRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.ProcessImageRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + process = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -70,7 +70,7 @@ public class VectorizeImageRequestJsonConverter : global::System.Text.Json.Seria { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.VectorizeImageRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.VectorizeImageRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + vectorizeImageRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -81,13 +81,13 @@ public class VectorizeImageRequestJsonConverter : global::System.Text.Json.Seria } } - if (value1 == null && value2 == null) + if (process == null && vectorizeImageRequestVariant2 == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.ProcessImageRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.ProcessImageRequest).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + process = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -100,7 +100,7 @@ public class VectorizeImageRequestJsonConverter : global::System.Text.Json.Seria { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.VectorizeImageRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.VectorizeImageRequestVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + vectorizeImageRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -111,9 +111,9 @@ public class VectorizeImageRequestJsonConverter : global::System.Text.Json.Seria } var __value = new global::Recraft.VectorizeImageRequest( - value1, + process, - value2 + vectorizeImageRequestVariant2 ); return __value; @@ -128,17 +128,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.IsProcess) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.ProcessImageRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.ProcessImageRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Process!, typeInfo); } - else if (value.IsValue2) + else if (value.IsVectorizeImageRequestVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Recraft.VectorizeImageRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Recraft.VectorizeImageRequestVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VectorizeImageRequestVariant2!, typeInfo); } } } diff --git a/src/libs/Recraft/Generated/Recraft.Models.CreateStyleResponse.g.cs b/src/libs/Recraft/Generated/Recraft.Models.CreateStyleResponse.g.cs index c3e921a..3380f32 100644 --- a/src/libs/Recraft/Generated/Recraft.Models.CreateStyleResponse.g.cs +++ b/src/libs/Recraft/Generated/Recraft.Models.CreateStyleResponse.g.cs @@ -13,35 +13,35 @@ namespace Recraft /// /// #if NET6_0_OR_GREATER - public global::Recraft.Style? Value1 { get; init; } + public global::Recraft.Style? Style { get; init; } #else - public global::Recraft.Style? Value1 { get; } + public global::Recraft.Style? Style { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Style))] #endif - public bool IsValue1 => Value1 != null; + public bool IsStyle => Style != null; /// /// /// #if NET6_0_OR_GREATER - public global::Recraft.CreateStyleResponseVariant2? Value2 { get; init; } + public global::Recraft.CreateStyleResponseVariant2? CreateStyleResponseVariant2 { get; init; } #else - public global::Recraft.CreateStyleResponseVariant2? Value2 { get; } + public global::Recraft.CreateStyleResponseVariant2? CreateStyleResponseVariant2 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateStyleResponseVariant2))] #endif - public bool IsValue2 => Value2 != null; + public bool IsCreateStyleResponseVariant2 => CreateStyleResponseVariant2 != null; /// /// /// @@ -50,14 +50,14 @@ namespace Recraft /// /// /// - public static implicit operator global::Recraft.Style?(CreateStyleResponse @this) => @this.Value1; + public static implicit operator global::Recraft.Style?(CreateStyleResponse @this) => @this.Style; /// /// /// public CreateStyleResponse(global::Recraft.Style? value) { - Value1 = value; + Style = value; } /// @@ -68,42 +68,42 @@ public CreateStyleResponse(global::Recraft.Style? value) /// /// /// - public static implicit operator global::Recraft.CreateStyleResponseVariant2?(CreateStyleResponse @this) => @this.Value2; + public static implicit operator global::Recraft.CreateStyleResponseVariant2?(CreateStyleResponse @this) => @this.CreateStyleResponseVariant2; /// /// /// public CreateStyleResponse(global::Recraft.CreateStyleResponseVariant2? value) { - Value2 = value; + CreateStyleResponseVariant2 = value; } /// /// /// public CreateStyleResponse( - global::Recraft.Style? value1, - global::Recraft.CreateStyleResponseVariant2? value2 + global::Recraft.Style? style, + global::Recraft.CreateStyleResponseVariant2? createStyleResponseVariant2 ) { - Value1 = value1; - Value2 = value2; + Style = style; + CreateStyleResponseVariant2 = createStyleResponseVariant2; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + CreateStyleResponseVariant2 as object ?? + Style as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + Style?.ToString() ?? + CreateStyleResponseVariant2?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsStyle && IsCreateStyleResponseVariant2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? style = null, + global::System.Func? createStyleResponseVariant2 = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsStyle && style != null) { - return value1(Value1!); + return style(Style!); } - else if (IsValue2 && value2 != null) + else if (IsCreateStyleResponseVariant2 && createStyleResponseVariant2 != null) { - return value2(Value2!); + return createStyleResponseVariant2(CreateStyleResponseVariant2!); } 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? style = null, + global::System.Action? createStyleResponseVariant2 = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsStyle) { - value1?.Invoke(Value1!); + style?.Invoke(Style!); } - else if (IsValue2) + else if (IsCreateStyleResponseVariant2) { - value2?.Invoke(Value2!); + createStyleResponseVariant2?.Invoke(CreateStyleResponseVariant2!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Style, typeof(global::Recraft.Style), - Value2, + CreateStyleResponseVariant2, typeof(global::Recraft.CreateStyleResponseVariant2), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateStyleResponse 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(Style, other.Style) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CreateStyleResponseVariant2, other.CreateStyleResponseVariant2) ; } diff --git a/src/libs/Recraft/Generated/Recraft.Models.TransformImageWithMaskRequest.g.cs b/src/libs/Recraft/Generated/Recraft.Models.TransformImageWithMaskRequest.g.cs index 1f81f7d..72d4d2c 100644 --- a/src/libs/Recraft/Generated/Recraft.Models.TransformImageWithMaskRequest.g.cs +++ b/src/libs/Recraft/Generated/Recraft.Models.TransformImageWithMaskRequest.g.cs @@ -13,35 +13,35 @@ namespace Recraft /// /// #if NET6_0_OR_GREATER - public global::Recraft.TransformImageRequest? Value1 { get; init; } + public global::Recraft.TransformImageRequest? TransformImageRequest { get; init; } #else - public global::Recraft.TransformImageRequest? Value1 { get; } + public global::Recraft.TransformImageRequest? TransformImageRequest { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TransformImageRequest))] #endif - public bool IsValue1 => Value1 != null; + public bool IsTransformImageRequest => TransformImageRequest != null; /// /// /// #if NET6_0_OR_GREATER - public global::Recraft.TransformImageWithMaskRequestVariant2? Value2 { get; init; } + public global::Recraft.TransformImageWithMaskRequestVariant2? TransformImageWithMaskRequestVariant2 { get; init; } #else - public global::Recraft.TransformImageWithMaskRequestVariant2? Value2 { get; } + public global::Recraft.TransformImageWithMaskRequestVariant2? TransformImageWithMaskRequestVariant2 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TransformImageWithMaskRequestVariant2))] #endif - public bool IsValue2 => Value2 != null; + public bool IsTransformImageWithMaskRequestVariant2 => TransformImageWithMaskRequestVariant2 != null; /// /// /// @@ -50,14 +50,14 @@ namespace Recraft /// /// /// - public static implicit operator global::Recraft.TransformImageRequest?(TransformImageWithMaskRequest @this) => @this.Value1; + public static implicit operator global::Recraft.TransformImageRequest?(TransformImageWithMaskRequest @this) => @this.TransformImageRequest; /// /// /// public TransformImageWithMaskRequest(global::Recraft.TransformImageRequest? value) { - Value1 = value; + TransformImageRequest = value; } /// @@ -68,42 +68,42 @@ public TransformImageWithMaskRequest(global::Recraft.TransformImageRequest? valu /// /// /// - public static implicit operator global::Recraft.TransformImageWithMaskRequestVariant2?(TransformImageWithMaskRequest @this) => @this.Value2; + public static implicit operator global::Recraft.TransformImageWithMaskRequestVariant2?(TransformImageWithMaskRequest @this) => @this.TransformImageWithMaskRequestVariant2; /// /// /// public TransformImageWithMaskRequest(global::Recraft.TransformImageWithMaskRequestVariant2? value) { - Value2 = value; + TransformImageWithMaskRequestVariant2 = value; } /// /// /// public TransformImageWithMaskRequest( - global::Recraft.TransformImageRequest? value1, - global::Recraft.TransformImageWithMaskRequestVariant2? value2 + global::Recraft.TransformImageRequest? transformImageRequest, + global::Recraft.TransformImageWithMaskRequestVariant2? transformImageWithMaskRequestVariant2 ) { - Value1 = value1; - Value2 = value2; + TransformImageRequest = transformImageRequest; + TransformImageWithMaskRequestVariant2 = transformImageWithMaskRequestVariant2; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + TransformImageWithMaskRequestVariant2 as object ?? + TransformImageRequest as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + TransformImageRequest?.ToString() ?? + TransformImageWithMaskRequestVariant2?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsTransformImageRequest && IsTransformImageWithMaskRequestVariant2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? transformImageRequest = null, + global::System.Func? transformImageWithMaskRequestVariant2 = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsTransformImageRequest && transformImageRequest != null) { - return value1(Value1!); + return transformImageRequest(TransformImageRequest!); } - else if (IsValue2 && value2 != null) + else if (IsTransformImageWithMaskRequestVariant2 && transformImageWithMaskRequestVariant2 != null) { - return value2(Value2!); + return transformImageWithMaskRequestVariant2(TransformImageWithMaskRequestVariant2!); } 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? transformImageRequest = null, + global::System.Action? transformImageWithMaskRequestVariant2 = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsTransformImageRequest) { - value1?.Invoke(Value1!); + transformImageRequest?.Invoke(TransformImageRequest!); } - else if (IsValue2) + else if (IsTransformImageWithMaskRequestVariant2) { - value2?.Invoke(Value2!); + transformImageWithMaskRequestVariant2?.Invoke(TransformImageWithMaskRequestVariant2!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + TransformImageRequest, typeof(global::Recraft.TransformImageRequest), - Value2, + TransformImageWithMaskRequestVariant2, typeof(global::Recraft.TransformImageWithMaskRequestVariant2), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(TransformImageWithMaskRequest 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(TransformImageRequest, other.TransformImageRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(TransformImageWithMaskRequestVariant2, other.TransformImageWithMaskRequestVariant2) ; } diff --git a/src/libs/Recraft/Generated/Recraft.Models.VectorizeImageRequest.g.cs b/src/libs/Recraft/Generated/Recraft.Models.VectorizeImageRequest.g.cs index f5a0ac8..7298962 100644 --- a/src/libs/Recraft/Generated/Recraft.Models.VectorizeImageRequest.g.cs +++ b/src/libs/Recraft/Generated/Recraft.Models.VectorizeImageRequest.g.cs @@ -13,35 +13,35 @@ namespace Recraft /// /// #if NET6_0_OR_GREATER - public global::Recraft.ProcessImageRequest? Value1 { get; init; } + public global::Recraft.ProcessImageRequest? Process { get; init; } #else - public global::Recraft.ProcessImageRequest? Value1 { get; } + public global::Recraft.ProcessImageRequest? Process { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Process))] #endif - public bool IsValue1 => Value1 != null; + public bool IsProcess => Process != null; /// /// /// #if NET6_0_OR_GREATER - public global::Recraft.VectorizeImageRequestVariant2? Value2 { get; init; } + public global::Recraft.VectorizeImageRequestVariant2? VectorizeImageRequestVariant2 { get; init; } #else - public global::Recraft.VectorizeImageRequestVariant2? Value2 { get; } + public global::Recraft.VectorizeImageRequestVariant2? VectorizeImageRequestVariant2 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VectorizeImageRequestVariant2))] #endif - public bool IsValue2 => Value2 != null; + public bool IsVectorizeImageRequestVariant2 => VectorizeImageRequestVariant2 != null; /// /// /// @@ -50,14 +50,14 @@ namespace Recraft /// /// /// - public static implicit operator global::Recraft.ProcessImageRequest?(VectorizeImageRequest @this) => @this.Value1; + public static implicit operator global::Recraft.ProcessImageRequest?(VectorizeImageRequest @this) => @this.Process; /// /// /// public VectorizeImageRequest(global::Recraft.ProcessImageRequest? value) { - Value1 = value; + Process = value; } /// @@ -68,42 +68,42 @@ public VectorizeImageRequest(global::Recraft.ProcessImageRequest? value) /// /// /// - public static implicit operator global::Recraft.VectorizeImageRequestVariant2?(VectorizeImageRequest @this) => @this.Value2; + public static implicit operator global::Recraft.VectorizeImageRequestVariant2?(VectorizeImageRequest @this) => @this.VectorizeImageRequestVariant2; /// /// /// public VectorizeImageRequest(global::Recraft.VectorizeImageRequestVariant2? value) { - Value2 = value; + VectorizeImageRequestVariant2 = value; } /// /// /// public VectorizeImageRequest( - global::Recraft.ProcessImageRequest? value1, - global::Recraft.VectorizeImageRequestVariant2? value2 + global::Recraft.ProcessImageRequest? process, + global::Recraft.VectorizeImageRequestVariant2? vectorizeImageRequestVariant2 ) { - Value1 = value1; - Value2 = value2; + Process = process; + VectorizeImageRequestVariant2 = vectorizeImageRequestVariant2; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + VectorizeImageRequestVariant2 as object ?? + Process as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + Process?.ToString() ?? + VectorizeImageRequestVariant2?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsProcess && IsVectorizeImageRequestVariant2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? process = null, + global::System.Func? vectorizeImageRequestVariant2 = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsProcess && process != null) { - return value1(Value1!); + return process(Process!); } - else if (IsValue2 && value2 != null) + else if (IsVectorizeImageRequestVariant2 && vectorizeImageRequestVariant2 != null) { - return value2(Value2!); + return vectorizeImageRequestVariant2(VectorizeImageRequestVariant2!); } 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? process = null, + global::System.Action? vectorizeImageRequestVariant2 = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsProcess) { - value1?.Invoke(Value1!); + process?.Invoke(Process!); } - else if (IsValue2) + else if (IsVectorizeImageRequestVariant2) { - value2?.Invoke(Value2!); + vectorizeImageRequestVariant2?.Invoke(VectorizeImageRequestVariant2!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Process, typeof(global::Recraft.ProcessImageRequest), - Value2, + VectorizeImageRequestVariant2, typeof(global::Recraft.VectorizeImageRequestVariant2), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(VectorizeImageRequest 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(Process, other.Process) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(VectorizeImageRequestVariant2, other.VectorizeImageRequestVariant2) ; }