|
| 1 | +#nullable enable |
| 2 | + |
| 3 | +using System.Reflection; |
| 4 | +using JsonSubTypes; |
| 5 | +using Newtonsoft.Json; |
| 6 | +using System.Runtime.Serialization; |
| 7 | + |
| 8 | +/** Generated type representing the anonymous struct variant `List` of the `AnonymousStructWithRename` Rust enum */ |
| 9 | +public class AnonymousStructWithRenameListInner { |
| 10 | + public IEnumerable<string> list { get; set; } |
| 11 | +} |
| 12 | + |
| 13 | +/** Generated type representing the anonymous struct variant `LongFieldNames` of the `AnonymousStructWithRename` Rust enum */ |
| 14 | +public class AnonymousStructWithRenameLongFieldNamesInner { |
| 15 | + public string some_long_field_name { get; set; } |
| 16 | + public bool and { get; set; } |
| 17 | + public IEnumerable<string> but_one_more { get; set; } |
| 18 | +} |
| 19 | + |
| 20 | +/** Generated type representing the anonymous struct variant `KebabCase` of the `AnonymousStructWithRename` Rust enum */ |
| 21 | +public class AnonymousStructWithRenameKebabCaseInner { |
| 22 | + public IEnumerable<string> another-list { get; set; } |
| 23 | + public string camelCaseStringField { get; set; } |
| 24 | + public bool something-else { get; set; } |
| 25 | +} |
| 26 | + |
| 27 | +[JsonConverter(typeof(JsonSubtypes), "type")] |
| 28 | +[JsonSubtypes.KnownSubType(typeof(List), "List")] |
| 29 | +[JsonSubtypes.KnownSubType(typeof(LongFieldNames), "LongFieldNames")] |
| 30 | +[JsonSubtypes.KnownSubType(typeof(KebabCase), "KebabCase")] |
| 31 | +public abstract record AnonymousStructWithRename |
| 32 | +{ |
| 33 | + public record list(AnonymousStructWithRenameListInner Content): AnonymousStructWithRename(); |
| 34 | + public record longFieldNames(AnonymousStructWithRenameLongFieldNamesInner Content): AnonymousStructWithRename(); |
| 35 | + public record kebabCase(AnonymousStructWithRenameKebabCaseInner Content): AnonymousStructWithRename(); |
| 36 | +} |
| 37 | + |
| 38 | + |
0 commit comments