14
14
import com .fasterxml .jackson .databind .ser .std .StdSerializer ;
15
15
import java .io .IOException ;
16
16
17
- /** PredictionsfunnelStage */
18
- @ JsonDeserialize (using = PredictionsfunnelStage . PredictionsfunnelStageDeserializer .class )
19
- @ JsonSerialize (using = PredictionsfunnelStage . PredictionsfunnelStageSerializer .class )
20
- public abstract class PredictionsfunnelStage implements CompoundType {
17
+ /** PredictionsFunnelStage */
18
+ @ JsonDeserialize (using = PredictionsFunnelStage . PredictionsFunnelStageDeserializer .class )
19
+ @ JsonSerialize (using = PredictionsFunnelStage . PredictionsFunnelStageSerializer .class )
20
+ public abstract class PredictionsFunnelStage implements CompoundType {
21
21
22
- public static PredictionsfunnelStage of (Error inside ) {
23
- return new PredictionsfunnelStageError (inside );
22
+ public static PredictionsFunnelStage of (Error inside ) {
23
+ return new PredictionsFunnelStageError (inside );
24
24
}
25
25
26
- public static PredictionsfunnelStage of (FunnelStageSuccess inside ) {
27
- return new PredictionsfunnelStageFunnelStageSuccess (inside );
26
+ public static PredictionsFunnelStage of (FunnelStageSuccess inside ) {
27
+ return new PredictionsFunnelStageFunnelStageSuccess (inside );
28
28
}
29
29
30
- public static class PredictionsfunnelStageSerializer extends StdSerializer <PredictionsfunnelStage > {
30
+ public static class PredictionsFunnelStageSerializer extends StdSerializer <PredictionsFunnelStage > {
31
31
32
- public PredictionsfunnelStageSerializer (Class <PredictionsfunnelStage > t ) {
32
+ public PredictionsFunnelStageSerializer (Class <PredictionsFunnelStage > t ) {
33
33
super (t );
34
34
}
35
35
36
- public PredictionsfunnelStageSerializer () {
36
+ public PredictionsFunnelStageSerializer () {
37
37
this (null );
38
38
}
39
39
40
40
@ Override
41
- public void serialize (PredictionsfunnelStage value , JsonGenerator jgen , SerializerProvider provider )
41
+ public void serialize (PredictionsFunnelStage value , JsonGenerator jgen , SerializerProvider provider )
42
42
throws IOException , JsonProcessingException {
43
43
jgen .writeObject (value .getInsideValue ());
44
44
}
45
45
}
46
46
47
- public static class PredictionsfunnelStageDeserializer extends StdDeserializer <PredictionsfunnelStage > {
47
+ public static class PredictionsFunnelStageDeserializer extends StdDeserializer <PredictionsFunnelStage > {
48
48
49
- public PredictionsfunnelStageDeserializer () {
50
- this (PredictionsfunnelStage .class );
49
+ public PredictionsFunnelStageDeserializer () {
50
+ this (PredictionsFunnelStage .class );
51
51
}
52
52
53
- public PredictionsfunnelStageDeserializer (Class <?> vc ) {
53
+ public PredictionsFunnelStageDeserializer (Class <?> vc ) {
54
54
super (vc );
55
55
}
56
56
57
57
@ Override
58
- public PredictionsfunnelStage deserialize (JsonParser jp , DeserializationContext ctxt ) throws IOException , JsonProcessingException {
58
+ public PredictionsFunnelStage deserialize (JsonParser jp , DeserializationContext ctxt ) throws IOException , JsonProcessingException {
59
59
JsonNode tree = jp .readValueAsTree ();
60
- PredictionsfunnelStage deserialized = null ;
60
+ PredictionsFunnelStage deserialized = null ;
61
61
62
62
int match = 0 ;
63
63
JsonToken token = tree .traverse (jp .getCodec ()).nextToken ();
@@ -73,11 +73,11 @@ public PredictionsfunnelStage deserialize(JsonParser jp, DeserializationContext
73
73
(currentType .equals ("String" ) && token == JsonToken .VALUE_STRING ) |
74
74
(currentType .startsWith ("List<" ) && token == JsonToken .START_ARRAY )
75
75
) {
76
- deserialized = PredictionsfunnelStage .of ((Error ) tree .traverse (jp .getCodec ()).readValueAs (new TypeReference <Error >() {}));
76
+ deserialized = PredictionsFunnelStage .of ((Error ) tree .traverse (jp .getCodec ()).readValueAs (new TypeReference <Error >() {}));
77
77
match ++;
78
78
} else if (token == JsonToken .START_OBJECT ) {
79
79
try {
80
- deserialized = PredictionsfunnelStage .of ((Error ) tree .traverse (jp .getCodec ()).readValueAs (new TypeReference <Error >() {}));
80
+ deserialized = PredictionsFunnelStage .of ((Error ) tree .traverse (jp .getCodec ()).readValueAs (new TypeReference <Error >() {}));
81
81
match ++;
82
82
} catch (IOException e ) {
83
83
// do nothing
@@ -100,14 +100,14 @@ public PredictionsfunnelStage deserialize(JsonParser jp, DeserializationContext
100
100
(currentType .startsWith ("List<" ) && token == JsonToken .START_ARRAY )
101
101
) {
102
102
deserialized =
103
- PredictionsfunnelStage .of (
103
+ PredictionsFunnelStage .of (
104
104
(FunnelStageSuccess ) tree .traverse (jp .getCodec ()).readValueAs (new TypeReference <FunnelStageSuccess >() {})
105
105
);
106
106
match ++;
107
107
} else if (token == JsonToken .START_OBJECT ) {
108
108
try {
109
109
deserialized =
110
- PredictionsfunnelStage .of (
110
+ PredictionsFunnelStage .of (
111
111
(FunnelStageSuccess ) tree .traverse (jp .getCodec ()).readValueAs (new TypeReference <FunnelStageSuccess >() {})
112
112
);
113
113
match ++;
@@ -124,23 +124,23 @@ public PredictionsfunnelStage deserialize(JsonParser jp, DeserializationContext
124
124
return deserialized ;
125
125
}
126
126
throw new IOException (
127
- String .format ("Failed deserialization for PredictionsfunnelStage : %d classes match result, expected" + " 1" , match )
127
+ String .format ("Failed deserialization for PredictionsFunnelStage : %d classes match result, expected" + " 1" , match )
128
128
);
129
129
}
130
130
131
131
/** Handle deserialization of the 'null' value. */
132
132
@ Override
133
- public PredictionsfunnelStage getNullValue (DeserializationContext ctxt ) throws JsonMappingException {
134
- throw new JsonMappingException (ctxt .getParser (), "PredictionsfunnelStage cannot be null" );
133
+ public PredictionsFunnelStage getNullValue (DeserializationContext ctxt ) throws JsonMappingException {
134
+ throw new JsonMappingException (ctxt .getParser (), "PredictionsFunnelStage cannot be null" );
135
135
}
136
136
}
137
137
}
138
138
139
- class PredictionsfunnelStageError extends PredictionsfunnelStage {
139
+ class PredictionsFunnelStageError extends PredictionsFunnelStage {
140
140
141
141
private final Error insideValue ;
142
142
143
- PredictionsfunnelStageError (Error insideValue ) {
143
+ PredictionsFunnelStageError (Error insideValue ) {
144
144
this .insideValue = insideValue ;
145
145
}
146
146
@@ -150,11 +150,11 @@ public Error getInsideValue() {
150
150
}
151
151
}
152
152
153
- class PredictionsfunnelStageFunnelStageSuccess extends PredictionsfunnelStage {
153
+ class PredictionsFunnelStageFunnelStageSuccess extends PredictionsFunnelStage {
154
154
155
155
private final FunnelStageSuccess insideValue ;
156
156
157
- PredictionsfunnelStageFunnelStageSuccess (FunnelStageSuccess insideValue ) {
157
+ PredictionsFunnelStageFunnelStageSuccess (FunnelStageSuccess insideValue ) {
158
158
this .insideValue = insideValue ;
159
159
}
160
160
0 commit comments