# coding: utf-8

"""
    Lethean Blockchain API

    OpenAPI for Lethean Blockchain

    The version of the OpenAPI document: 6.0.1
    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 pydantic import BaseModel, ConfigDict, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class TxProcessingPerformanceModel(BaseModel):
    """
    TxProcessingPerformanceModel
    """ # noqa: E501
    tx_check_inputs: Optional[StrictInt] = None
    tx_add_one_tx: Optional[StrictInt] = None
    tx_process_extra: Optional[StrictInt] = None
    tx_process_attachment: Optional[StrictInt] = None
    tx_process_inputs: Optional[StrictInt] = None
    tx_push_global_index: Optional[StrictInt] = None
    tx_check_exist: Optional[StrictInt] = None
    tx_print_log: Optional[StrictInt] = None
    tx_prapare_append: Optional[StrictInt] = None
    tx_append: Optional[StrictInt] = None
    tx_append_rl_wait: Optional[StrictInt] = None
    tx_append_is_expired: Optional[StrictInt] = None
    tx_store_db: Optional[StrictInt] = None
    tx_check_inputs_prefix_hash: Optional[StrictInt] = None
    tx_check_inputs_attachment_check: Optional[StrictInt] = None
    tx_check_inputs_loop: Optional[StrictInt] = None
    tx_check_inputs_loop_kimage_check: Optional[StrictInt] = None
    tx_check_inputs_loop_ch_in_val_sig: Optional[StrictInt] = None
    tx_check_inputs_loop_scan_outputkeys_get_item_size: Optional[StrictInt] = None
    tx_check_inputs_loop_scan_outputkeys_relative_to_absolute: Optional[StrictInt] = None
    tx_check_inputs_loop_scan_outputkeys_loop: Optional[StrictInt] = None
    tx_check_inputs_loop_scan_outputkeys_loop_get_subitem: Optional[StrictInt] = None
    tx_check_inputs_loop_scan_outputkeys_loop_find_tx: Optional[StrictInt] = None
    tx_check_inputs_loop_scan_outputkeys_loop_handle_output: Optional[StrictInt] = None
    tx_mixin_count: Optional[StrictInt] = None
    __properties: ClassVar[List[str]] = ["tx_check_inputs", "tx_add_one_tx", "tx_process_extra", "tx_process_attachment", "tx_process_inputs", "tx_push_global_index", "tx_check_exist", "tx_print_log", "tx_prapare_append", "tx_append", "tx_append_rl_wait", "tx_append_is_expired", "tx_store_db", "tx_check_inputs_prefix_hash", "tx_check_inputs_attachment_check", "tx_check_inputs_loop", "tx_check_inputs_loop_kimage_check", "tx_check_inputs_loop_ch_in_val_sig", "tx_check_inputs_loop_scan_outputkeys_get_item_size", "tx_check_inputs_loop_scan_outputkeys_relative_to_absolute", "tx_check_inputs_loop_scan_outputkeys_loop", "tx_check_inputs_loop_scan_outputkeys_loop_get_subitem", "tx_check_inputs_loop_scan_outputkeys_loop_find_tx", "tx_check_inputs_loop_scan_outputkeys_loop_handle_output", "tx_mixin_count"]

    model_config = ConfigDict(
        populate_by_name=True,
        validate_assignment=True,
        protected_namespaces=(),
    )


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

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
        return json.dumps(self.to_dict())

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

    def to_dict(self) -> Dict[str, Any]:
        """Return the dictionary representation of the model using alias.

        This has the following differences from calling pydantic's
        `self.model_dump(by_alias=True)`:

        * `None` is only added to the output dict for nullable fields that
          were set at model initialization. Other fields with value `None`
          are ignored.
        """
        excluded_fields: Set[str] = set([
        ])

        _dict = self.model_dump(
            by_alias=True,
            exclude=excluded_fields,
            exclude_none=True,
        )
        return _dict

    @classmethod
    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
        """Create an instance of TxProcessingPerformanceModel from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return cls.model_validate(obj)

        _obj = cls.model_validate({
            "tx_check_inputs": obj.get("tx_check_inputs"),
            "tx_add_one_tx": obj.get("tx_add_one_tx"),
            "tx_process_extra": obj.get("tx_process_extra"),
            "tx_process_attachment": obj.get("tx_process_attachment"),
            "tx_process_inputs": obj.get("tx_process_inputs"),
            "tx_push_global_index": obj.get("tx_push_global_index"),
            "tx_check_exist": obj.get("tx_check_exist"),
            "tx_print_log": obj.get("tx_print_log"),
            "tx_prapare_append": obj.get("tx_prapare_append"),
            "tx_append": obj.get("tx_append"),
            "tx_append_rl_wait": obj.get("tx_append_rl_wait"),
            "tx_append_is_expired": obj.get("tx_append_is_expired"),
            "tx_store_db": obj.get("tx_store_db"),
            "tx_check_inputs_prefix_hash": obj.get("tx_check_inputs_prefix_hash"),
            "tx_check_inputs_attachment_check": obj.get("tx_check_inputs_attachment_check"),
            "tx_check_inputs_loop": obj.get("tx_check_inputs_loop"),
            "tx_check_inputs_loop_kimage_check": obj.get("tx_check_inputs_loop_kimage_check"),
            "tx_check_inputs_loop_ch_in_val_sig": obj.get("tx_check_inputs_loop_ch_in_val_sig"),
            "tx_check_inputs_loop_scan_outputkeys_get_item_size": obj.get("tx_check_inputs_loop_scan_outputkeys_get_item_size"),
            "tx_check_inputs_loop_scan_outputkeys_relative_to_absolute": obj.get("tx_check_inputs_loop_scan_outputkeys_relative_to_absolute"),
            "tx_check_inputs_loop_scan_outputkeys_loop": obj.get("tx_check_inputs_loop_scan_outputkeys_loop"),
            "tx_check_inputs_loop_scan_outputkeys_loop_get_subitem": obj.get("tx_check_inputs_loop_scan_outputkeys_loop_get_subitem"),
            "tx_check_inputs_loop_scan_outputkeys_loop_find_tx": obj.get("tx_check_inputs_loop_scan_outputkeys_loop_find_tx"),
            "tx_check_inputs_loop_scan_outputkeys_loop_handle_output": obj.get("tx_check_inputs_loop_scan_outputkeys_loop_handle_output"),
            "tx_mixin_count": obj.get("tx_mixin_count")
        })
        return _obj


