{{> model_templates/method_from_openapi_data_shared }}

{{#isEnum}}
        self.value = value
{{/isEnum}}
{{#requiredVars}}
        self.{{name}} = {{name}}
{{/requiredVars}}
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
        return self