@@ -22,11 +22,11 @@ class AnyType {
2222 /**
2323 * Constructs a new <code>AnyType</code>.
2424 * @alias module:model/AnyType
25- * @param target_value {Number}
26- * @param type {module:model/AnyType.TypeEnum}
25+ * @param target_value {Number}
26+ * @param type {module:model/AnyType.TypeEnum}
2727 */
28- constructor ( target_value , type ) {
29-
28+ constructor ( target_value , type ) {
29+
3030 AnyType . initialize ( this , target_value , type ) ;
3131 }
3232
@@ -35,7 +35,7 @@ class AnyType {
3535 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
3636 * Only for internal use.
3737 */
38- static initialize ( obj , target_value , type ) {
38+ static initialize ( obj , target_value , type ) {
3939 obj [ 'target_value' ] = target_value || null ;
4040 obj [ 'type' ] = type || 'AnyType' ;
4141 }
@@ -48,7 +48,7 @@ class AnyType {
4848 * @return {module:model/AnyType } The populated <code>AnyType</code> instance.
4949 */
5050 static constructFromObject ( data , obj ) {
51- if ( data ) {
51+ if ( data && typeof data === 'object' ) {
5252 obj = obj || new AnyType ( ) ;
5353
5454 if ( data . hasOwnProperty ( 'target_value' ) ) {
@@ -57,11 +57,14 @@ class AnyType {
5757 if ( data . hasOwnProperty ( 'type' ) ) {
5858 obj [ 'type' ] = ApiClient . convertToType ( data [ 'type' ] , 'String' ) ;
5959 }
60+
61+ return obj ;
62+ }
63+ else {
64+ return data ;
6065 }
61- return obj ;
6266 }
6367
64-
6568}
6669
6770/**
0 commit comments