@@ -36,6 +36,7 @@ public partial class FormatTest : IValidatableObject
3636 /// <param name="date">date</param>
3737 /// <param name="number">number</param>
3838 /// <param name="password">password</param>
39+ /// <param name="stringFormattedAsDecimalRequired">stringFormattedAsDecimalRequired</param>
3940 /// <param name="binary">binary</param>
4041 /// <param name="dateTime">dateTime</param>
4142 /// <param name="decimal">decimal</param>
@@ -53,16 +54,18 @@ public partial class FormatTest : IValidatableObject
5354 /// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros.</param>
5455 /// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</param>
5556 /// <param name="string">string</param>
57+ /// <param name="stringFormattedAsDecimal">stringFormattedAsDecimal</param>
5658 /// <param name="unsignedInteger">unsignedInteger</param>
5759 /// <param name="unsignedLong">unsignedLong</param>
5860 /// <param name="uuid">uuid</param>
5961 [ JsonConstructor ]
60- public FormatTest ( byte [ ] @byte , DateTime date , decimal number , string password , 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 < uint ? > unsignedInteger = default , Option < ulong ? > unsignedLong = default , Option < Guid ? > uuid = default )
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 )
6163 {
6264 Byte = @byte ;
6365 Date = date ;
6466 Number = number ;
6567 Password = password ;
68+ StringFormattedAsDecimalRequired = stringFormattedAsDecimalRequired ;
6669 BinaryOption = binary ;
6770 DateTimeOption = dateTime ;
6871 DecimalOption = @decimal ;
@@ -80,6 +83,7 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password,
8083 PatternWithDigitsOption = patternWithDigits ;
8184 PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter ;
8285 StringOption = @string ;
86+ StringFormattedAsDecimalOption = stringFormattedAsDecimal ;
8387 UnsignedIntegerOption = unsignedInteger ;
8488 UnsignedLongOption = unsignedLong ;
8589 UuidOption = uuid ;
@@ -113,6 +117,12 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password,
113117 [ JsonPropertyName ( "password" ) ]
114118 public string Password { get ; set ; }
115119
120+ /// <summary>
121+ /// Gets or Sets StringFormattedAsDecimalRequired
122+ /// </summary>
123+ [ JsonPropertyName ( "string_formatted_as_decimal_required" ) ]
124+ public decimal StringFormattedAsDecimalRequired { get ; set ; }
125+
116126 /// <summary>
117127 /// Used to track the state of Binary
118128 /// </summary>
@@ -338,6 +348,19 @@ public FormatTest(byte[] @byte, DateTime date, decimal number, string password,
338348 [ JsonPropertyName ( "string" ) ]
339349 public string String { get { return this . StringOption ; } set { this . StringOption = new Option < string > ( value ) ; } }
340350
351+ /// <summary>
352+ /// Used to track the state of StringFormattedAsDecimal
353+ /// </summary>
354+ [ JsonIgnore ]
355+ [ global ::System . ComponentModel . EditorBrowsable ( global ::System . ComponentModel . EditorBrowsableState . Never ) ]
356+ public Option < decimal ? > StringFormattedAsDecimalOption { get ; private set ; }
357+
358+ /// <summary>
359+ /// Gets or Sets StringFormattedAsDecimal
360+ /// </summary>
361+ [ JsonPropertyName ( "string_formatted_as_decimal" ) ]
362+ public decimal ? StringFormattedAsDecimal { get { return this . StringFormattedAsDecimalOption ; } set { this . StringFormattedAsDecimalOption = new Option < decimal ? > ( value ) ; } }
363+
341364 /// <summary>
342365 /// Used to track the state of UnsignedInteger
343366 /// </summary>
@@ -396,6 +419,7 @@ public override string ToString()
396419 sb . Append ( " Date: " ) . Append ( Date ) . Append ( "\n " ) ;
397420 sb . Append ( " Number: " ) . Append ( Number ) . Append ( "\n " ) ;
398421 sb . Append ( " Password: " ) . Append ( Password ) . Append ( "\n " ) ;
422+ sb . Append ( " StringFormattedAsDecimalRequired: " ) . Append ( StringFormattedAsDecimalRequired ) . Append ( "\n " ) ;
399423 sb . Append ( " Binary: " ) . Append ( Binary ) . Append ( "\n " ) ;
400424 sb . Append ( " DateTime: " ) . Append ( DateTime ) . Append ( "\n " ) ;
401425 sb . Append ( " Decimal: " ) . Append ( Decimal ) . Append ( "\n " ) ;
@@ -413,6 +437,7 @@ public override string ToString()
413437 sb . Append ( " PatternWithDigits: " ) . Append ( PatternWithDigits ) . Append ( "\n " ) ;
414438 sb . Append ( " PatternWithDigitsAndDelimiter: " ) . Append ( PatternWithDigitsAndDelimiter ) . Append ( "\n " ) ;
415439 sb . Append ( " String: " ) . Append ( String ) . Append ( "\n " ) ;
440+ sb . Append ( " StringFormattedAsDecimal: " ) . Append ( StringFormattedAsDecimal ) . Append ( "\n " ) ;
416441 sb . Append ( " UnsignedInteger: " ) . Append ( UnsignedInteger ) . Append ( "\n " ) ;
417442 sb . Append ( " UnsignedLong: " ) . Append ( UnsignedLong ) . Append ( "\n " ) ;
418443 sb . Append ( " Uuid: " ) . Append ( Uuid ) . Append ( "\n " ) ;
@@ -628,6 +653,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
628653 Option < DateTime ? > date = default ;
629654 Option < decimal ? > number = default ;
630655 Option < string > password = default ;
656+ Option < decimal ? > stringFormattedAsDecimalRequired = default ;
631657 Option < System . IO . Stream > binary = default ;
632658 Option < DateTime ? > dateTime = default ;
633659 Option < decimal ? > varDecimal = default ;
@@ -645,6 +671,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
645671 Option < string > patternWithDigits = default ;
646672 Option < string > patternWithDigitsAndDelimiter = default ;
647673 Option < string > varString = default ;
674+ Option < decimal ? > stringFormattedAsDecimal = default ;
648675 Option < uint ? > unsignedInteger = default ;
649676 Option < ulong ? > unsignedLong = default ;
650677 Option < Guid ? > uuid = default ;
@@ -679,6 +706,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
679706 case "password" :
680707 password = new Option < string > ( utf8JsonReader . GetString ( ) ) ;
681708 break ;
709+ case "string_formatted_as_decimal_required" :
710+ stringFormattedAsDecimalRequired = new Option < decimal ? > ( utf8JsonReader . GetDecimal ( ) ) ;
711+ break ;
682712 case "binary" :
683713 if ( utf8JsonReader . TokenType != JsonTokenType . Null )
684714 binary = new Option < System . IO . Stream > ( JsonSerializer . Deserialize < System . IO . Stream > ( ref utf8JsonReader , jsonSerializerOptions ) ) ;
@@ -743,6 +773,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
743773 case "string" :
744774 varString = new Option < string > ( utf8JsonReader . GetString ( ) ) ;
745775 break ;
776+ case "string_formatted_as_decimal" :
777+ stringFormattedAsDecimal = new Option < decimal ? > ( utf8JsonReader . GetDecimal ( ) ) ;
778+ break ;
746779 case "unsigned_integer" :
747780 if ( utf8JsonReader . TokenType != JsonTokenType . Null )
748781 unsignedInteger = new Option < uint ? > ( utf8JsonReader . GetUInt32 ( ) ) ;
@@ -773,6 +806,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
773806 if ( ! password . IsSet )
774807 throw new ArgumentException ( "Property is required for class FormatTest." , nameof ( password ) ) ;
775808
809+ if ( ! stringFormattedAsDecimalRequired . IsSet )
810+ throw new ArgumentException ( "Property is required for class FormatTest." , nameof ( stringFormattedAsDecimalRequired ) ) ;
811+
776812 if ( varByte . IsSet && varByte . Value == null )
777813 throw new ArgumentNullException ( nameof ( varByte ) , "Property is not nullable for class FormatTest." ) ;
778814
@@ -785,6 +821,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
785821 if ( password . IsSet && password . Value == null )
786822 throw new ArgumentNullException ( nameof ( password ) , "Property is not nullable for class FormatTest." ) ;
787823
824+ if ( stringFormattedAsDecimalRequired . IsSet && stringFormattedAsDecimalRequired . Value == null )
825+ throw new ArgumentNullException ( nameof ( stringFormattedAsDecimalRequired ) , "Property is not nullable for class FormatTest." ) ;
826+
788827 if ( binary . IsSet && binary . Value == null )
789828 throw new ArgumentNullException ( nameof ( binary ) , "Property is not nullable for class FormatTest." ) ;
790829
@@ -836,6 +875,9 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
836875 if ( varString . IsSet && varString . Value == null )
837876 throw new ArgumentNullException ( nameof ( varString ) , "Property is not nullable for class FormatTest." ) ;
838877
878+ if ( stringFormattedAsDecimal . IsSet && stringFormattedAsDecimal . Value == null )
879+ throw new ArgumentNullException ( nameof ( stringFormattedAsDecimal ) , "Property is not nullable for class FormatTest." ) ;
880+
839881 if ( unsignedInteger . IsSet && unsignedInteger . Value == null )
840882 throw new ArgumentNullException ( nameof ( unsignedInteger ) , "Property is not nullable for class FormatTest." ) ;
841883
@@ -845,7 +887,7 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo
845887 if ( uuid . IsSet && uuid . Value == null )
846888 throw new ArgumentNullException ( nameof ( uuid ) , "Property is not nullable for class FormatTest." ) ;
847889
848- return new FormatTest ( varByte . Value , date . Value . Value , number . Value . Value , password . Value , binary , dateTime , varDecimal , varDouble , varFloat , int32 , int32Range , int64 , int64Negative , int64NegativeExclusive , int64Positive , int64PositiveExclusive , integer , patternWithBackslash , patternWithDigits , patternWithDigitsAndDelimiter , varString , unsignedInteger , unsignedLong , uuid ) ;
890+ 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 ) ;
849891 }
850892
851893 /// <summary>
@@ -901,6 +943,8 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe
901943
902944 writer . WriteString ( "password" , formatTest . Password ) ;
903945
946+ writer . WriteString ( "string_formatted_as_decimal_required" , formatTest . StringFormattedAsDecimalRequired . ToString ( ) ) ;
947+
904948 if ( formatTest . BinaryOption . IsSet )
905949 {
906950 writer . WritePropertyName ( "binary" ) ;
@@ -956,6 +1000,9 @@ public void WriteProperties(Utf8JsonWriter writer, FormatTest formatTest, JsonSe
9561000 if ( formatTest . StringOption . IsSet )
9571001 writer . WriteString ( "string" , formatTest . String ) ;
9581002
1003+ if ( formatTest . StringFormattedAsDecimalOption . IsSet )
1004+ writer . WriteString ( "string_formatted_as_decimal" , formatTest . StringFormattedAsDecimal . ToString ( ) ) ;
1005+
9591006 if ( formatTest . UnsignedIntegerOption . IsSet )
9601007 writer . WriteNumber ( "unsigned_integer" , formatTest . UnsignedIntegerOption . Value . Value ) ;
9611008
0 commit comments