File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
.generator/src/generator/templates Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -554,6 +554,10 @@ class ModelComposed(OpenApiModel):
554
554
"""Returns the string representation of the model"""
555
555
return pprint.pformat(self.to_dict())
556
556
557
+ def get_oneof_instance(self):
558
+ """Returns the oneOf instance"""
559
+ return self._composed_instances[0]
560
+
557
561
def __eq__(self, other):
558
562
"""Returns true if both objects are equal"""
559
563
if not isinstance(other, self.__class__):
Original file line number Diff line number Diff line change @@ -557,6 +557,10 @@ def to_str(self):
557
557
"""Returns the string representation of the model"""
558
558
return pprint .pformat (self .to_dict ())
559
559
560
+ def get_oneof_instance (self ):
561
+ """Returns the oneOf instance"""
562
+ return self ._composed_instances [0 ]
563
+
560
564
def __eq__ (self , other ):
561
565
"""Returns true if both objects are equal"""
562
566
if not isinstance (other , self .__class__ ):
You can’t perform that action at this time.
0 commit comments