2
2
* Authentication webhooks
3
3
*
4
4
* The version of the OpenAPI document: 1
5
- *
5
+ *
6
6
*
7
7
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
8
* https://openapi-generator.tech
9
9
* Do not edit the class manually.
10
10
*/
11
11
12
-
13
12
package com .adyen .model .acswebhooks ;
14
13
15
- import java .util .Objects ;
16
- import java .util .Map ;
17
- import jakarta .ws .rs .core .GenericType ;
18
-
19
14
import com .fasterxml .jackson .annotation .JsonValue ;
15
+ import jakarta .ws .rs .core .GenericType ;
16
+ import java .util .Map ;
17
+ import java .util .Objects ;
20
18
21
- /**
22
- * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
23
- */
19
+ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */
24
20
public abstract class AbstractOpenApiSchema {
25
21
26
- // store the actual instance of the schema/object
27
- private Object instance ;
28
-
29
- // is nullable
30
- private Boolean isNullable ;
31
-
32
- // schema type (e.g. oneOf, anyOf)
33
- private final String schemaType ;
34
-
35
- /**
36
- *
37
- * @param schemaType the schema type
38
- * @param isNullable whether the instance is nullable
39
- */
40
- public AbstractOpenApiSchema (String schemaType , Boolean isNullable ) {
41
- this .schemaType = schemaType ;
42
- this .isNullable = isNullable ;
22
+ // store the actual instance of the schema/object
23
+ private Object instance ;
24
+
25
+ // is nullable
26
+ private Boolean isNullable ;
27
+
28
+ // schema type (e.g. oneOf, anyOf)
29
+ private final String schemaType ;
30
+
31
+ /**
32
+ * @param schemaType the schema type
33
+ * @param isNullable whether the instance is nullable
34
+ */
35
+ public AbstractOpenApiSchema (String schemaType , Boolean isNullable ) {
36
+ this .schemaType = schemaType ;
37
+ this .isNullable = isNullable ;
38
+ }
39
+
40
+ /**
41
+ * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
42
+ *
43
+ * @return an instance of the actual schema/object
44
+ */
45
+ public abstract Map <String , GenericType <?>> getSchemas ();
46
+
47
+ /**
48
+ * Get the actual instance
49
+ *
50
+ * @return an instance of the actual schema/object
51
+ */
52
+ @ JsonValue
53
+ public Object getActualInstance () {
54
+ return instance ;
55
+ }
56
+
57
+ /**
58
+ * Set the actual instance
59
+ *
60
+ * @param instance the actual instance of the schema/object
61
+ */
62
+ public void setActualInstance (Object instance ) {
63
+ this .instance = instance ;
64
+ }
65
+
66
+ /**
67
+ * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf
68
+ * schema as well
69
+ *
70
+ * @return an instance of the actual schema/object
71
+ */
72
+ public Object getActualInstanceRecursively () {
73
+ return getActualInstanceRecursively (this );
74
+ }
75
+
76
+ private Object getActualInstanceRecursively (AbstractOpenApiSchema object ) {
77
+ if (object .getActualInstance () == null ) {
78
+ return null ;
79
+ } else if (object .getActualInstance () instanceof AbstractOpenApiSchema ) {
80
+ return getActualInstanceRecursively ((AbstractOpenApiSchema ) object .getActualInstance ());
81
+ } else {
82
+ return object .getActualInstance ();
43
83
}
44
-
45
- /**
46
- * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
47
- *
48
- * @return an instance of the actual schema/object
49
- */
50
- public abstract Map <String , GenericType <?>> getSchemas ();
51
-
52
- /**
53
- * Get the actual instance
54
- *
55
- * @return an instance of the actual schema/object
56
- */
57
- @ JsonValue
58
- public Object getActualInstance () {return instance ;}
59
-
60
- /**
61
- * Set the actual instance
62
- *
63
- * @param instance the actual instance of the schema/object
64
- */
65
- public void setActualInstance (Object instance ) {this .instance = instance ;}
66
-
67
- /**
68
- * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well
69
- *
70
- * @return an instance of the actual schema/object
71
- */
72
- public Object getActualInstanceRecursively () {
73
- return getActualInstanceRecursively (this );
84
+ }
85
+
86
+ /**
87
+ * Get the schema type (e.g. anyOf, oneOf)
88
+ *
89
+ * @return the schema type
90
+ */
91
+ public String getSchemaType () {
92
+ return schemaType ;
93
+ }
94
+
95
+ @ Override
96
+ public String toString () {
97
+ StringBuilder sb = new StringBuilder ();
98
+ sb .append ("class " ).append (getClass ()).append (" {\n " );
99
+ sb .append (" instance: " ).append (toIndentedString (instance )).append ("\n " );
100
+ sb .append (" isNullable: " ).append (toIndentedString (isNullable )).append ("\n " );
101
+ sb .append (" schemaType: " ).append (toIndentedString (schemaType )).append ("\n " );
102
+ sb .append ("}" );
103
+ return sb .toString ();
104
+ }
105
+
106
+ /**
107
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
108
+ */
109
+ private String toIndentedString (Object o ) {
110
+ if (o == null ) {
111
+ return "null" ;
74
112
}
113
+ return o .toString ().replace ("\n " , "\n " );
114
+ }
75
115
76
- private Object getActualInstanceRecursively (AbstractOpenApiSchema object ) {
77
- if (object .getActualInstance () == null ) {
78
- return null ;
79
- } else if (object .getActualInstance () instanceof AbstractOpenApiSchema ) {
80
- return getActualInstanceRecursively ((AbstractOpenApiSchema )object .getActualInstance ());
81
- } else {
82
- return object .getActualInstance ();
83
- }
116
+ public boolean equals (Object o ) {
117
+ if (this == o ) {
118
+ return true ;
84
119
}
85
-
86
- /**
87
- * Get the schema type (e.g. anyOf, oneOf)
88
- *
89
- * @return the schema type
90
- */
91
- public String getSchemaType () {
92
- return schemaType ;
93
- }
94
-
95
- @ Override
96
- public String toString () {
97
- StringBuilder sb = new StringBuilder ();
98
- sb .append ("class " ).append (getClass ()).append (" {\n " );
99
- sb .append (" instance: " ).append (toIndentedString (instance )).append ("\n " );
100
- sb .append (" isNullable: " ).append (toIndentedString (isNullable )).append ("\n " );
101
- sb .append (" schemaType: " ).append (toIndentedString (schemaType )).append ("\n " );
102
- sb .append ("}" );
103
- return sb .toString ();
120
+ if (o == null || getClass () != o .getClass ()) {
121
+ return false ;
104
122
}
105
-
106
- /**
107
- * Convert the given object to string with each line indented by 4 spaces
108
- * (except the first line).
109
- */
110
- private String toIndentedString (Object o ) {
111
- if (o == null ) {
112
- return "null" ;
113
- }
114
- return o .toString ().replace ("\n " , "\n " );
123
+ AbstractOpenApiSchema a = (AbstractOpenApiSchema ) o ;
124
+ return Objects .equals (this .instance , a .instance )
125
+ && Objects .equals (this .isNullable , a .isNullable )
126
+ && Objects .equals (this .schemaType , a .schemaType );
127
+ }
128
+
129
+ @ Override
130
+ public int hashCode () {
131
+ return Objects .hash (instance , isNullable , schemaType );
132
+ }
133
+
134
+ /**
135
+ * Is nullable
136
+ *
137
+ * @return true if it's nullable
138
+ */
139
+ public Boolean isNullable () {
140
+ if (Boolean .TRUE .equals (isNullable )) {
141
+ return Boolean .TRUE ;
142
+ } else {
143
+ return Boolean .FALSE ;
115
144
}
116
-
117
- public boolean equals (Object o ) {
118
- if (this == o ) {
119
- return true ;
120
- }
121
- if (o == null || getClass () != o .getClass ()) {
122
- return false ;
123
- }
124
- AbstractOpenApiSchema a = (AbstractOpenApiSchema ) o ;
125
- return Objects .equals (this .instance , a .instance ) &&
126
- Objects .equals (this .isNullable , a .isNullable ) &&
127
- Objects .equals (this .schemaType , a .schemaType );
128
- }
129
-
130
- @ Override
131
- public int hashCode () {
132
- return Objects .hash (instance , isNullable , schemaType );
133
- }
134
-
135
- /**
136
- * Is nullable
137
- *
138
- * @return true if it's nullable
139
- */
140
- public Boolean isNullable () {
141
- if (Boolean .TRUE .equals (isNullable )) {
142
- return Boolean .TRUE ;
143
- } else {
144
- return Boolean .FALSE ;
145
- }
146
- }
147
-
148
-
149
-
150
- }
145
+ }
146
+ }
0 commit comments