github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/openapi-generator/templates/python/python-experimental/model_templates/method_init_shared.mustache (about)

     1      def __init__(self{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{#defaultValue}}, {{name}}={{{defaultValue}}}{{/defaultValue}}{{/requiredVars}}, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs):  # noqa: E501
     2          """{{classname}} - a model defined in OpenAPI
     3  
     4  {{#requiredVars}}
     5  {{#-first}}
     6          Args:
     7  {{/-first}}
     8  {{^defaultValue}}
     9              {{name}} ({{{dataType}}}):{{#description}} {{description}}{{/description}}
    10  {{/defaultValue}}
    11  {{#-last}}
    12  
    13  {{/-last}}
    14  {{/requiredVars}}
    15          Keyword Args:
    16  {{#requiredVars}}
    17  {{#defaultValue}}
    18              {{name}} ({{{dataType}}}):{{#description}} {{description}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}}  # noqa: E501
    19  {{/defaultValue}}
    20  {{/requiredVars}}
    21              _check_type (bool): if True, values for parameters in openapi_types
    22                                  will be type checked and a TypeError will be
    23                                  raised if the wrong type is input.
    24                                  Defaults to True
    25              _path_to_item (tuple/list): This is a list of keys or values to
    26                                  drill down to the model in received_data
    27                                  when deserializing a response
    28              _from_server (bool): True if the data is from the server
    29                                  False if the data is from the client (default)
    30              _configuration (Configuration): the instance to use when
    31                                  deserializing a file_type parameter.
    32                                  If passed, type conversion is attempted
    33                                  If omitted no type conversion is done.
    34  {{#optionalVars}}
    35              {{name}} ({{{dataType}}}):{{#description}} {{description}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}}  # noqa: E501
    36  {{/optionalVars}}
    37          """
    38  
    39          self._data_store = {}
    40          self._check_type = _check_type
    41          self._from_server = _from_server
    42          self._path_to_item = _path_to_item
    43          self._configuration = _configuration