# coding: utf-8

"""
    FastAPI

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 0.1.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import pprint
import re  # noqa: F401
import json


from typing import List, Optional
from pydantic.v1 import BaseModel, StrictBool, StrictInt, conlist

class ChatCompletionRequestExtVLLM(BaseModel):
    """
    ChatCompletionRequestExtVLLM
    """
    best_of: Optional[StrictInt] = None
    top_k: Optional[StrictInt] = -1
    ignore_eos: Optional[StrictBool] = False
    use_beam_search: Optional[StrictBool] = False
    stop_token_ids: Optional[conlist(StrictInt)] = None
    skip_special_tokens: Optional[StrictBool] = True
    __properties = ["best_of", "top_k", "ignore_eos", "use_beam_search", "stop_token_ids", "skip_special_tokens"]

    class Config:
        """Pydantic configuration"""
        allow_population_by_field_name = True
        validate_assignment = True

    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.dict(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> ChatCompletionRequestExtVLLM:
        """Create an instance of ChatCompletionRequestExtVLLM from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        _dict = self.dict(by_alias=True,
                          exclude={
                          },
                          exclude_none=True)
        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> ChatCompletionRequestExtVLLM:
        """Create an instance of ChatCompletionRequestExtVLLM from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return ChatCompletionRequestExtVLLM.parse_obj(obj)

        _obj = ChatCompletionRequestExtVLLM.parse_obj({
            "best_of": obj.get("best_of"),
            "top_k": obj.get("top_k") if obj.get("top_k") is not None else -1,
            "ignore_eos": obj.get("ignore_eos") if obj.get("ignore_eos") is not None else False,
            "use_beam_search": obj.get("use_beam_search") if obj.get("use_beam_search") is not None else False,
            "stop_token_ids": obj.get("stop_token_ids"),
            "skip_special_tokens": obj.get("skip_special_tokens") if obj.get("skip_special_tokens") is not None else True
        })
        return _obj


