diff --git a/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs index fb06265..2b7a463 100644 --- a/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs +++ b/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs @@ -61,8 +61,8 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::LabelStudio.Comment? value1 = default; - global::LabelStudio.CommentSerializerWithExpandedUser? value2 = default; + global::LabelStudio.Comment? comment = default; + global::LabelStudio.CommentSerializerWithExpandedUser? serializerWithUser = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -71,7 +71,7 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::LabelStudio.Comment), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::LabelStudio.Comment).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + comment = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -86,7 +86,7 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::LabelStudio.CommentSerializerWithExpandedUser), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::LabelStudio.CommentSerializerWithExpandedUser).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + serializerWithUser = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -97,13 +97,13 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial } } - if (value1 == null && value2 == null) + if (comment == null && serializerWithUser == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::LabelStudio.Comment), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::LabelStudio.Comment).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + comment = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -116,7 +116,7 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::LabelStudio.CommentSerializerWithExpandedUser), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::LabelStudio.CommentSerializerWithExpandedUser).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + serializerWithUser = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -127,9 +127,9 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial } var __value = new global::LabelStudio.MaybeExpandedComment( - value1, + comment, - value2 + serializerWithUser ); return __value; @@ -144,17 +144,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.IsComment) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::LabelStudio.Comment), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::LabelStudio.Comment).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Comment!, typeInfo); } - else if (value.IsValue2) + else if (value.IsSerializerWithUser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::LabelStudio.CommentSerializerWithExpandedUser), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::LabelStudio.CommentSerializerWithExpandedUser).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SerializerWithUser!, typeInfo); } } } diff --git a/src/libs/LabelStudio/Generated/LabelStudio.Models.MaybeExpandedComment.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.Models.MaybeExpandedComment.g.cs index cb15fc2..45bfaec 100644 --- a/src/libs/LabelStudio/Generated/LabelStudio.Models.MaybeExpandedComment.g.cs +++ b/src/libs/LabelStudio/Generated/LabelStudio.Models.MaybeExpandedComment.g.cs @@ -18,18 +18,18 @@ namespace LabelStudio /// - fflag_feat_fit_710_fsm_state_fields (state field display in APIs) /// #if NET6_0_OR_GREATER - public global::LabelStudio.Comment? Value1 { get; init; } + public global::LabelStudio.Comment? Comment { get; init; } #else - public global::LabelStudio.Comment? Value1 { get; } + public global::LabelStudio.Comment? Comment { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Comment))] #endif - public bool IsValue1 => Value1 != null; + public bool IsComment => Comment != null; /// /// Comment Serializer with FSM state support.
@@ -40,18 +40,18 @@ namespace LabelStudio /// - fflag_feat_fit_710_fsm_state_fields (state field display in APIs) ///
#if NET6_0_OR_GREATER - public global::LabelStudio.CommentSerializerWithExpandedUser? Value2 { get; init; } + public global::LabelStudio.CommentSerializerWithExpandedUser? SerializerWithUser { get; init; } #else - public global::LabelStudio.CommentSerializerWithExpandedUser? Value2 { get; } + public global::LabelStudio.CommentSerializerWithExpandedUser? SerializerWithUser { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SerializerWithUser))] #endif - public bool IsValue2 => Value2 != null; + public bool IsSerializerWithUser => SerializerWithUser != null; /// /// /// @@ -60,14 +60,14 @@ namespace LabelStudio /// /// /// - public static implicit operator global::LabelStudio.Comment?(MaybeExpandedComment @this) => @this.Value1; + public static implicit operator global::LabelStudio.Comment?(MaybeExpandedComment @this) => @this.Comment; /// /// /// public MaybeExpandedComment(global::LabelStudio.Comment? value) { - Value1 = value; + Comment = value; } /// @@ -78,42 +78,42 @@ public MaybeExpandedComment(global::LabelStudio.Comment? value) /// /// /// - public static implicit operator global::LabelStudio.CommentSerializerWithExpandedUser?(MaybeExpandedComment @this) => @this.Value2; + public static implicit operator global::LabelStudio.CommentSerializerWithExpandedUser?(MaybeExpandedComment @this) => @this.SerializerWithUser; /// /// /// public MaybeExpandedComment(global::LabelStudio.CommentSerializerWithExpandedUser? value) { - Value2 = value; + SerializerWithUser = value; } /// /// /// public MaybeExpandedComment( - global::LabelStudio.Comment? value1, - global::LabelStudio.CommentSerializerWithExpandedUser? value2 + global::LabelStudio.Comment? comment, + global::LabelStudio.CommentSerializerWithExpandedUser? serializerWithUser ) { - Value1 = value1; - Value2 = value2; + Comment = comment; + SerializerWithUser = serializerWithUser; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + SerializerWithUser as object ?? + Comment as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + Comment?.ToString() ?? + SerializerWithUser?.ToString() ; /// @@ -121,15 +121,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + return IsComment && !IsSerializerWithUser || !IsComment && IsSerializerWithUser; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? comment = null, + global::System.Func? serializerWithUser = null, bool validate = true) { if (validate) @@ -137,13 +137,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsComment && comment != null) { - return value1(Value1!); + return comment(Comment!); } - else if (IsValue2 && value2 != null) + else if (IsSerializerWithUser && serializerWithUser != null) { - return value2(Value2!); + return serializerWithUser(SerializerWithUser!); } return default(TResult); @@ -153,8 +153,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? comment = null, + global::System.Action? serializerWithUser = null, bool validate = true) { if (validate) @@ -162,13 +162,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsComment) { - value1?.Invoke(Value1!); + comment?.Invoke(Comment!); } - else if (IsValue2) + else if (IsSerializerWithUser) { - value2?.Invoke(Value2!); + serializerWithUser?.Invoke(SerializerWithUser!); } } @@ -179,9 +179,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Comment, typeof(global::LabelStudio.Comment), - Value2, + SerializerWithUser, typeof(global::LabelStudio.CommentSerializerWithExpandedUser), }; const int offset = unchecked((int)2166136261); @@ -199,8 +199,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MaybeExpandedComment 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(Comment, other.Comment) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SerializerWithUser, other.SerializerWithUser) ; }