1- // Copyright (c) The LEGO Group. All rights reserved.
2-
3- namespace LEGO . AsyncAPI . Models
4- {
5- using System . Collections . Generic ;
6- using LEGO . AsyncAPI . Models . Interfaces ;
7- using LEGO . AsyncAPI . Writers ;
8-
9- public class AsyncApiJsonSchemaPayload : IAsyncApiMessagePayload
10- {
11- private readonly AsyncApiJsonSchema schema ;
12-
13- public AsyncApiJsonSchemaPayload ( )
14- {
15- this . schema = new AsyncApiJsonSchema ( ) ;
16- }
17-
18- public AsyncApiJsonSchemaPayload ( AsyncApiJsonSchema schema )
19- {
20- this . schema = schema ;
21- }
22-
23- public string Title { get => this . schema . Title ; set => this . schema . Title = value ; }
24-
25- public SchemaType ? Type { get => this . schema . Type ; set => this . schema . Type = value ; }
26-
27- public string Format { get => this . schema . Format ; set => this . schema . Format = value ; }
28-
29- public string Description { get => this . schema . Description ; set => this . schema . Description = value ; }
30-
31- public double ? Maximum { get => this . schema . Maximum ; set => this . schema . Maximum = value ; }
32-
33- public double ? ExclusiveMaximum { get => this . schema . ExclusiveMaximum ; set => this . schema . ExclusiveMaximum = value ; }
34-
35- public double ? Minimum { get => this . schema . Minimum ; set => this . schema . Minimum = value ; }
36-
37- public double ? ExclusiveMinimum { get => this . schema . ExclusiveMinimum ; set => this . schema . ExclusiveMinimum = value ; }
38-
39- public int ? MaxLength { get => this . schema . MaxLength ; set => this . schema . MaxLength = value ; }
40-
41- public int ? MinLength { get => this . schema . MinLength ; set => this . schema . MinLength = value ; }
42-
43- public string Pattern { get => this . schema . Pattern ; set => this . schema . Pattern = value ; }
44-
45- public double ? MultipleOf { get => this . schema . MultipleOf ; set => this . schema . MultipleOf = value ; }
46-
47- public AsyncApiAny Default { get => this . schema . Default ; set => this . schema . Default = value ; }
48-
49- public bool ReadOnly { get => this . schema . ReadOnly ; set => this . schema . ReadOnly = value ; }
50-
51- public bool WriteOnly { get => this . schema . WriteOnly ; set => this . schema . WriteOnly = value ; }
52-
53- public IList < AsyncApiJsonSchema > AllOf { get => this . schema . AllOf ; set => this . schema . AllOf = value ; }
54-
55- public IList < AsyncApiJsonSchema > OneOf { get => this . schema . OneOf ; set => this . schema . OneOf = value ; }
56-
57- public IList < AsyncApiJsonSchema > AnyOf { get => this . schema . AnyOf ; set => this . schema . AnyOf = value ; }
58-
59- public AsyncApiJsonSchema Not { get => this . schema . Not ; set => this . schema . Not = value ; }
60-
61- public AsyncApiJsonSchema Contains { get => this . schema . Contains ; set => this . schema . Contains = value ; }
62-
63- public AsyncApiJsonSchema If { get => this . schema . If ; set => this . schema . If = value ; }
64-
65- public AsyncApiJsonSchema Then { get => this . schema . Then ; set => this . schema . Then = value ; }
66-
67- public AsyncApiJsonSchema Else { get => this . schema . Else ; set => this . schema . Else = value ; }
68-
69- public ISet < string > Required { get => this . schema . Required ; set => this . schema . Required = value ; }
70-
71- public AsyncApiJsonSchema Items { get => this . schema . Items ; set => this . schema . Items = value ; }
72-
73- public AsyncApiJsonSchema AdditionalItems { get => this . schema . AdditionalItems ; set => this . schema . AdditionalItems = value ; }
74-
75- public int ? MaxItems { get => this . schema . MaxItems ; set => this . schema . MaxItems = value ; }
76-
77- public int ? MinItems { get => this . schema . MinItems ; set => this . schema . MinItems = value ; }
78-
79- public bool ? UniqueItems { get => this . schema . UniqueItems ; set => this . schema . UniqueItems = value ; }
80-
81- public IDictionary < string , AsyncApiJsonSchema > Properties { get => this . schema . Properties ; set => this . schema . Properties = value ; }
82-
83- public int ? MaxProperties { get => this . schema . MaxProperties ; set => this . schema . MaxProperties = value ; }
84-
85- public int ? MinProperties { get => this . schema . MinProperties ; set => this . schema . MinProperties = value ; }
86-
87- public IDictionary < string , AsyncApiJsonSchema > PatternProperties { get => this . schema . PatternProperties ; set => this . schema . PatternProperties = value ; }
88-
89- public AsyncApiJsonSchema PropertyNames { get => this . schema . PropertyNames ; set => this . schema . PropertyNames = value ; }
90-
91- public string Discriminator { get => this . schema . Discriminator ; set => this . schema . Discriminator = value ; }
92-
93- public IList < AsyncApiAny > Enum { get => this . schema . Enum ; set => this . schema . Enum = value ; }
94-
95- public IList < AsyncApiAny > Examples { get => this . schema . Examples ; set => this . schema . Examples = value ; }
96-
97- public AsyncApiAny Const { get => this . schema . Const ; set => this . schema . Const = value ; }
98-
99- public bool Nullable { get => this . schema . Nullable ; set => this . schema . Nullable = value ; }
100-
101- public AsyncApiExternalDocumentation ExternalDocs { get => this . schema . ExternalDocs ; set => this . schema . ExternalDocs = value ; }
102-
103- public bool Deprecated { get => this . schema . Deprecated ; set => this . schema . Deprecated = value ; }
104-
105- public bool UnresolvedReference { get => this . schema . UnresolvedReference ; set => this . schema . UnresolvedReference = value ; }
106-
107- public AsyncApiReference Reference { get => this . schema . Reference ; set => this . schema . Reference = value ; }
108-
109- public IDictionary < string , IAsyncApiExtension > Extensions { get => this . schema . Extensions ; set => this . schema . Extensions = value ; }
110-
111- public AsyncApiJsonSchema AdditionalProperties { get => this . schema . AdditionalProperties ; set => this . schema . AdditionalProperties = value ; }
112-
113- public static implicit operator AsyncApiJsonSchema ( AsyncApiJsonSchemaPayload payload ) => payload . schema ;
114-
115- public static implicit operator AsyncApiJsonSchemaPayload ( AsyncApiJsonSchema schema ) => new AsyncApiJsonSchemaPayload ( schema ) ;
116-
117- public void SerializeV2 ( IAsyncApiWriter writer )
118- {
119- this . schema . SerializeV2 ( writer ) ;
120- }
121-
122- public void SerializeV2WithoutReference ( IAsyncApiWriter writer )
123- {
124- this . schema . SerializeV2WithoutReference ( writer ) ;
125- }
126- }
127- }
1+ // Copyright (c) The LEGO Group. All rights reserved.
2+
3+ namespace LEGO . AsyncAPI . Models { using System . Collections . Generic ; using LEGO . AsyncAPI . Models . Interfaces ; using LEGO . AsyncAPI . Writers ; public class AsyncApiJsonSchemaPayload : IAsyncApiMessagePayload { private readonly AsyncApiJsonSchema schema ;
4+
5+ public AsyncApiJsonSchemaPayload ( )
6+ {
7+ this . schema = new AsyncApiJsonSchema ( ) ;
8+ }
9+
10+ public AsyncApiJsonSchemaPayload ( AsyncApiJsonSchema schema )
11+ {
12+ this . schema = schema ;
13+ }
14+
15+ public virtual string Title { get => this . schema . Title ; set => this . schema . Title = value ; }
16+
17+ public virtual SchemaType ? Type { get => this . schema . Type ; set => this . schema . Type = value ; }
18+
19+ public virtual string Format { get => this . schema . Format ; set => this . schema . Format = value ; }
20+
21+ public virtual string Description { get => this . schema . Description ; set => this . schema . Description = value ; }
22+
23+ public virtual double ? Maximum { get => this . schema . Maximum ; set => this . schema . Maximum = value ; }
24+
25+ public virtual double ? ExclusiveMaximum { get => this . schema . ExclusiveMaximum ; set => this . schema . ExclusiveMaximum = value ; }
26+
27+ public virtual double ? Minimum { get => this . schema . Minimum ; set => this . schema . Minimum = value ; }
28+
29+ public virtual double ? ExclusiveMinimum { get => this . schema . ExclusiveMinimum ; set => this . schema . ExclusiveMinimum = value ; }
30+
31+ public virtual int ? MaxLength { get => this . schema . MaxLength ; set => this . schema . MaxLength = value ; }
32+
33+ public virtual int ? MinLength { get => this . schema . MinLength ; set => this . schema . MinLength = value ; }
34+
35+ public virtual string Pattern { get => this . schema . Pattern ; set => this . schema . Pattern = value ; }
36+
37+ public virtual double ? MultipleOf { get => this . schema . MultipleOf ; set => this . schema . MultipleOf = value ; }
38+
39+ public virtual AsyncApiAny Default { get => this . schema . Default ; set => this . schema . Default = value ; }
40+
41+ public virtual bool ReadOnly { get => this . schema . ReadOnly ; set => this . schema . ReadOnly = value ; }
42+
43+ public virtual bool WriteOnly { get => this . schema . WriteOnly ; set => this . schema . WriteOnly = value ; }
44+
45+ public virtual IList < AsyncApiJsonSchema > AllOf { get => this . schema . AllOf ; set => this . schema . AllOf = value ; }
46+
47+ public virtual IList < AsyncApiJsonSchema > OneOf { get => this . schema . OneOf ; set => this . schema . OneOf = value ; }
48+
49+ public virtual IList < AsyncApiJsonSchema > AnyOf { get => this . schema . AnyOf ; set => this . schema . AnyOf = value ; }
50+
51+ public virtual AsyncApiJsonSchema Not { get => this . schema . Not ; set => this . schema . Not = value ; }
52+
53+ public virtual AsyncApiJsonSchema Contains { get => this . schema . Contains ; set => this . schema . Contains = value ; }
54+
55+ public virtual AsyncApiJsonSchema If { get => this . schema . If ; set => this . schema . If = value ; }
56+
57+ public virtual AsyncApiJsonSchema Then { get => this . schema . Then ; set => this . schema . Then = value ; }
58+
59+ public virtual AsyncApiJsonSchema Else { get => this . schema . Else ; set => this . schema . Else = value ; }
60+
61+ public virtual ISet < string > Required { get => this . schema . Required ; set => this . schema . Required = value ; }
62+
63+ public virtual AsyncApiJsonSchema Items { get => this . schema . Items ; set => this . schema . Items = value ; }
64+
65+ public virtual AsyncApiJsonSchema AdditionalItems { get => this . schema . AdditionalItems ; set => this . schema . AdditionalItems = value ; }
66+
67+ public virtual int ? MaxItems { get => this . schema . MaxItems ; set => this . schema . MaxItems = value ; }
68+
69+ public virtual int ? MinItems { get => this . schema . MinItems ; set => this . schema . MinItems = value ; }
70+
71+ public virtual bool ? UniqueItems { get => this . schema . UniqueItems ; set => this . schema . UniqueItems = value ; }
72+
73+ public virtual IDictionary < string , AsyncApiJsonSchema > Properties { get => this . schema . Properties ; set => this . schema . Properties = value ; }
74+
75+ public virtual int ? MaxProperties { get => this . schema . MaxProperties ; set => this . schema . MaxProperties = value ; }
76+
77+ public virtual int ? MinProperties { get => this . schema . MinProperties ; set => this . schema . MinProperties = value ; }
78+
79+ public virtual IDictionary < string , AsyncApiJsonSchema > PatternProperties { get => this . schema . PatternProperties ; set => this . schema . PatternProperties = value ; }
80+
81+ public virtual AsyncApiJsonSchema PropertyNames { get => this . schema . PropertyNames ; set => this . schema . PropertyNames = value ; }
82+
83+ public virtual string Discriminator { get => this . schema . Discriminator ; set => this . schema . Discriminator = value ; }
84+
85+ public virtual IList < AsyncApiAny > Enum { get => this . schema . Enum ; set => this . schema . Enum = value ; }
86+
87+ public virtual IList < AsyncApiAny > Examples { get => this . schema . Examples ; set => this . schema . Examples = value ; }
88+
89+ public virtual AsyncApiAny Const { get => this . schema . Const ; set => this . schema . Const = value ; }
90+
91+ public virtual bool Nullable { get => this . schema . Nullable ; set => this . schema . Nullable = value ; }
92+
93+ public virtual AsyncApiExternalDocumentation ExternalDocs { get => this . schema . ExternalDocs ; set => this . schema . ExternalDocs = value ; }
94+
95+ public virtual bool Deprecated { get => this . schema . Deprecated ; set => this . schema . Deprecated = value ; }
96+
97+ public virtual IDictionary < string , IAsyncApiExtension > Extensions { get => this . schema . Extensions ; set => this . schema . Extensions = value ; }
98+
99+ public virtual AsyncApiJsonSchema AdditionalProperties { get => this . schema . AdditionalProperties ; set => this . schema . AdditionalProperties = value ; }
100+
101+ public static implicit operator AsyncApiJsonSchema ( AsyncApiJsonSchemaPayload payload ) => payload . schema ;
102+
103+ public static implicit operator AsyncApiJsonSchemaPayload ( AsyncApiJsonSchema schema ) => new AsyncApiJsonSchemaPayload ( schema ) ;
104+
105+ public virtual void SerializeV2 ( IAsyncApiWriter writer )
106+ {
107+ this . schema . SerializeV2 ( writer ) ;
108+ }
109+ } }
0 commit comments