@@ -41,6 +41,8 @@ public partial class FormatTest : IValidatableObject
41
41
/// <param name="dateTime">dateTime</param>
42
42
/// <param name="decimal">decimal</param>
43
43
/// <param name="double">double</param>
44
+ /// <param name="duplicatePropertyName2">duplicatePropertyName2</param>
45
+ /// <param name="duplicatePropertyName">duplicatePropertyName</param>
44
46
/// <param name="float">float</param>
45
47
/// <param name="int32">int32</param>
46
48
/// <param name="int32Range">int32Range</param>
@@ -59,7 +61,7 @@ public partial class FormatTest : IValidatableObject
59
61
/// <param name="unsignedLong">unsignedLong</param>
60
62
/// <param name="uuid">uuid</param>
61
63
[ JsonConstructor ]
62
- public FormatTest ( byte [ ] @byte , DateTime date , decimal number , string password , decimal stringFormattedAsDecimalRequired , Option < System . IO . Stream > binary = default , Option < DateTime ? > dateTime = default , Option < decimal ? > @decimal = default , Option < double ? > @double = default , Option < float ? > @float = default , Option < int ? > int32 = default , Option < int ? > int32Range = default , Option < long ? > int64 = default , Option < long ? > int64Negative = default , Option < long ? > int64NegativeExclusive = default , Option < long ? > int64Positive = default , Option < long ? > int64PositiveExclusive = default , Option < int ? > integer = default , Option < string > patternWithBackslash = default , Option < string > patternWithDigits = default , Option < string > patternWithDigitsAndDelimiter = default , Option < string > @string = default , Option < decimal ? > stringFormattedAsDecimal = default , Option < uint ? > unsignedInteger = default , Option < ulong ? > unsignedLong = default , Option < Guid ? > uuid = default )
64
+ public FormatTest ( byte [ ] @byte , DateTime date , decimal number , string password , decimal stringFormattedAsDecimalRequired , Option < System . IO . Stream > binary = default , Option < DateTime ? > dateTime = default , Option < decimal ? > @decimal = default , Option < double ? > @double = default , Option < string > duplicatePropertyName2 = default , Option < string > duplicatePropertyName = default , Option < float ? > @float = default , Option < int ? > int32 = default , Option < int ? > int32Range = default , Option < long ? > int64 = default , Option < long ? > int64Negative = default , Option < long ? > int64NegativeExclusive = default , Option < long ? > int64Positive = default , Option < long ? > int64PositiveExclusive = default , Option < int ? > integer = default , Option < string > patternWithBackslash = default , Option < string > patternWithDigits = default , Option < string > patternWithDigitsAndDelimiter = default , Option < string > @string = default , Option < decimal ? > stringFormattedAsDecimal = default , Option < uint ? > unsignedInteger = default , Option < ulong ? > unsignedLong = default , Option < Guid ? > uuid = default )
63
65
{
64
66
Byte = @byte ;
65
67
Date = date ;
@@ -70,6 +72,8 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password,
70
72
DateTimeOption = dateTime ;
71
73
DecimalOption = @decimal ;
72
74
DoubleOption = @double ;
75
+ DuplicatePropertyName2Option = duplicatePropertyName2 ;
76
+ DuplicatePropertyNameOption = duplicatePropertyName ;
73
77
FloatOption = @float ;
74
78
Int32Option = int32 ;
75
79
Int32RangeOption = int32Range ;
@@ -176,6 +180,32 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password,
176
180
[ JsonPropertyName ( "double" ) ]
177
181
public double ? Double { get { return this . DoubleOption ; } set { this . DoubleOption = new Option < double ? > ( value ) ; } }
178
182
183
+ /// <summary>
184
+ /// Used to track the state of DuplicatePropertyName2
185
+ /// </summary>
186
+ [ JsonIgnore ]
187
+ [ global ::System . ComponentModel . EditorBrowsable ( global ::System . ComponentModel . EditorBrowsableState . Never ) ]
188
+ public Option < string > DuplicatePropertyName2Option { get ; private set ; }
189
+
190
+ /// <summary>
191
+ /// Gets or Sets DuplicatePropertyName2
192
+ /// </summary>
193
+ [ JsonPropertyName ( "duplicate_property_name" ) ]
194
+ public string DuplicatePropertyName2 { get { return this . DuplicatePropertyName2Option ; } set { this . DuplicatePropertyName2Option = new Option < string > ( value ) ; } }
195
+
196
+ /// <summary>
197
+ /// Used to track the state of DuplicatePropertyName
198
+ /// </summary>
199
+ [ JsonIgnore ]
200
+ [ global ::System . ComponentModel . EditorBrowsable ( global ::System . ComponentModel . EditorBrowsableState . Never ) ]
201
+ public Option < string > DuplicatePropertyNameOption { get ; private set ; }
202
+
203
+ /// <summary>
204
+ /// Gets or Sets DuplicatePropertyName
205
+ /// </summary>
206
+ [ JsonPropertyName ( "@duplicate_property_name" ) ]
207
+ public string DuplicatePropertyName { get { return this . DuplicatePropertyNameOption ; } set { this . DuplicatePropertyNameOption = new Option < string > ( value ) ; } }
208
+
179
209
/// <summary>
180
210
/// Used to track the state of Float
181
211
/// </summary>
@@ -424,6 +454,8 @@ public override string ToString()
424
454
sb . Append ( " DateTime: " ) . Append ( DateTime ) . Append ( "\n " ) ;
425
455
sb . Append ( " Decimal: " ) . Append ( Decimal ) . Append ( "\n " ) ;
426
456
sb . Append ( " Double: " ) . Append ( Double ) . Append ( "\n " ) ;
457
+ sb . Append ( " DuplicatePropertyName2: " ) . Append ( DuplicatePropertyName2 ) . Append ( "\n " ) ;
458
+ sb . Append ( " DuplicatePropertyName: " ) . Append ( DuplicatePropertyName ) . Append ( "\n " ) ;
427
459
sb . Append ( " Float: " ) . Append ( Float ) . Append ( "\n " ) ;
428
460
sb . Append ( " Int32: " ) . Append ( Int32 ) . Append ( "\n " ) ;
429
461
sb . Append ( " Int32Range: " ) . Append ( Int32Range ) . Append ( "\n " ) ;
@@ -658,6 +690,8 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
658
690
Option < DateTime ? > dateTime = default ;
659
691
Option < decimal ? > varDecimal = default ;
660
692
Option < double ? > varDouble = default ;
693
+ Option < string > duplicatePropertyName2 = default ;
694
+ Option < string > duplicatePropertyName = default ;
661
695
Option < float ? > varFloat = default ;
662
696
Option < int ? > int32 = default ;
663
697
Option < int ? > int32Range = default ;
@@ -718,6 +752,12 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
718
752
case "double" :
719
753
varDouble = new Option < double ? > ( utf8JsonReader . TokenType == JsonTokenType . Null ? ( double ? ) null : utf8JsonReader . GetDouble ( ) ) ;
720
754
break ;
755
+ case "duplicate_property_name" :
756
+ duplicatePropertyName2 = new Option < string > ( utf8JsonReader . GetString ( ) ) ;
757
+ break ;
758
+ case "@duplicate_property_name" :
759
+ duplicatePropertyName = new Option < string > ( utf8JsonReader . GetString ( ) ) ;
760
+ break ;
721
761
case "float" :
722
762
varFloat = new Option < float ? > ( utf8JsonReader . TokenType == JsonTokenType . Null ? ( float ? ) null : ( float ) utf8JsonReader . GetDouble ( ) ) ;
723
763
break ;
@@ -817,6 +857,12 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
817
857
if ( varDouble . IsSet && varDouble . Value == null )
818
858
throw new ArgumentNullException ( nameof ( varDouble ) , "Property is not nullable for class FormatTest." ) ;
819
859
860
+ if ( duplicatePropertyName2 . IsSet && duplicatePropertyName2 . Value == null )
861
+ throw new ArgumentNullException ( nameof ( duplicatePropertyName2 ) , "Property is not nullable for class FormatTest." ) ;
862
+
863
+ if ( duplicatePropertyName . IsSet && duplicatePropertyName . Value == null )
864
+ throw new ArgumentNullException ( nameof ( duplicatePropertyName ) , "Property is not nullable for class FormatTest." ) ;
865
+
820
866
if ( varFloat . IsSet && varFloat . Value == null )
821
867
throw new ArgumentNullException ( nameof ( varFloat ) , "Property is not nullable for class FormatTest." ) ;
822
868
@@ -868,7 +914,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
868
914
if ( uuid . IsSet && uuid . Value == null )
869
915
throw new ArgumentNullException ( nameof ( uuid ) , "Property is not nullable for class FormatTest." ) ;
870
916
871
- return new FormatTest ( varByte . Value , date . Value . Value , number . Value . Value , password . Value , stringFormattedAsDecimalRequired . Value . Value , binary , dateTime , varDecimal , varDouble , varFloat , int32 , int32Range , int64 , int64Negative , int64NegativeExclusive , int64Positive , int64PositiveExclusive , integer , patternWithBackslash , patternWithDigits , patternWithDigitsAndDelimiter , varString , stringFormattedAsDecimal , unsignedInteger , unsignedLong , uuid ) ;
917
+ return new FormatTest ( varByte . Value , date . Value . Value , number . Value . Value , password . Value , stringFormattedAsDecimalRequired . Value . Value , binary , dateTime , varDecimal , varDouble , duplicatePropertyName2 , duplicatePropertyName , varFloat , int32 , int32Range , int64 , int64Negative , int64NegativeExclusive , int64Positive , int64PositiveExclusive , integer , patternWithBackslash , patternWithDigits , patternWithDigitsAndDelimiter , varString , stringFormattedAsDecimal , unsignedInteger , unsignedLong , uuid ) ;
872
918
}
873
919
874
920
/// <summary>
@@ -904,6 +950,12 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe
904
950
if ( formatTest . BinaryOption . IsSet && formatTest . Binary == null )
905
951
throw new ArgumentNullException ( nameof ( formatTest . Binary ) , "Property is required for class FormatTest." ) ;
906
952
953
+ if ( formatTest . DuplicatePropertyName2Option . IsSet && formatTest . DuplicatePropertyName2 == null )
954
+ throw new ArgumentNullException ( nameof ( formatTest . DuplicatePropertyName2 ) , "Property is required for class FormatTest." ) ;
955
+
956
+ if ( formatTest . DuplicatePropertyNameOption . IsSet && formatTest . DuplicatePropertyName == null )
957
+ throw new ArgumentNullException ( nameof ( formatTest . DuplicatePropertyName ) , "Property is required for class FormatTest." ) ;
958
+
907
959
if ( formatTest . PatternWithBackslashOption . IsSet && formatTest . PatternWithBackslash == null )
908
960
throw new ArgumentNullException ( nameof ( formatTest . PatternWithBackslash ) , "Property is required for class FormatTest." ) ;
909
961
@@ -942,6 +994,12 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe
942
994
if ( formatTest . DoubleOption . IsSet )
943
995
writer . WriteNumber ( "double" , formatTest . DoubleOption . Value . Value ) ;
944
996
997
+ if ( formatTest . DuplicatePropertyName2Option . IsSet )
998
+ writer . WriteString ( "duplicate_property_name" , formatTest . DuplicatePropertyName2 ) ;
999
+
1000
+ if ( formatTest . DuplicatePropertyNameOption . IsSet )
1001
+ writer . WriteString ( "@duplicate_property_name" , formatTest . DuplicatePropertyName ) ;
1002
+
945
1003
if ( formatTest . FloatOption . IsSet )
946
1004
writer . WriteNumber ( "float" , formatTest . FloatOption . Value . Value ) ;
947
1005
0 commit comments