# 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, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class TxGenerationContextModel(BaseModel):
    """
    TxGenerationContextModel
    """ # noqa: E501
    asset_ids: Optional[List[StrictStr]] = None
    blinded_asset_ids: Optional[List[StrictStr]] = None
    amount_commitments: Optional[List[StrictStr]] = None
    asset_id_blinding_masks: Optional[List[StrictStr]] = None
    amounts: Optional[List[StrictStr]] = None
    amount_blinding_masks: Optional[List[StrictStr]] = None
    pseudo_outs_blinded_asset_ids: Optional[List[StrictStr]] = None
    pseudo_outs_plus_real_out_blinding_masks: Optional[List[StrictStr]] = None
    real_zc_ins_asset_ids: Optional[List[StrictStr]] = None
    zc_input_amounts: Optional[List[StrictInt]] = None
    pseudo_out_amount_commitments_sum: Optional[StrictStr] = None
    pseudo_out_amount_blinding_masks_sum: Optional[StrictStr] = None
    real_in_asset_id_blinding_mask_x_amount_sum: Optional[StrictStr] = None
    amount_commitments_sum: Optional[StrictStr] = None
    amount_blinding_masks_sum: Optional[StrictStr] = None
    asset_id_blinding_mask_x_amount_sum: Optional[StrictStr] = None
    ao_asset_id: Optional[StrictStr] = None
    ao_asset_id_pt: Optional[StrictStr] = None
    ao_amount_commitment: Optional[StrictStr] = None
    ao_amount_blinding_mask: Optional[StrictStr] = None
    ao_commitment_in_outputs: Optional[StrictBool] = None
    tx_key_pub: Optional[StrictStr] = None
    tx_key_sec: Optional[StrictStr] = None
    tx_pub_key_p: Optional[StrictStr] = None
    __properties: ClassVar[List[str]] = ["asset_ids", "blinded_asset_ids", "amount_commitments", "asset_id_blinding_masks", "amounts", "amount_blinding_masks", "pseudo_outs_blinded_asset_ids", "pseudo_outs_plus_real_out_blinding_masks", "real_zc_ins_asset_ids", "zc_input_amounts", "pseudo_out_amount_commitments_sum", "pseudo_out_amount_blinding_masks_sum", "real_in_asset_id_blinding_mask_x_amount_sum", "amount_commitments_sum", "amount_blinding_masks_sum", "asset_id_blinding_mask_x_amount_sum", "ao_asset_id", "ao_asset_id_pt", "ao_amount_commitment", "ao_amount_blinding_mask", "ao_commitment_in_outputs", "tx_key_pub", "tx_key_sec", "tx_pub_key_p"]

    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 TxGenerationContextModel 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 TxGenerationContextModel from a dict"""
        if obj is None:
            return None

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

        _obj = cls.model_validate({
            "asset_ids": obj.get("asset_ids"),
            "blinded_asset_ids": obj.get("blinded_asset_ids"),
            "amount_commitments": obj.get("amount_commitments"),
            "asset_id_blinding_masks": obj.get("asset_id_blinding_masks"),
            "amounts": obj.get("amounts"),
            "amount_blinding_masks": obj.get("amount_blinding_masks"),
            "pseudo_outs_blinded_asset_ids": obj.get("pseudo_outs_blinded_asset_ids"),
            "pseudo_outs_plus_real_out_blinding_masks": obj.get("pseudo_outs_plus_real_out_blinding_masks"),
            "real_zc_ins_asset_ids": obj.get("real_zc_ins_asset_ids"),
            "zc_input_amounts": obj.get("zc_input_amounts"),
            "pseudo_out_amount_commitments_sum": obj.get("pseudo_out_amount_commitments_sum"),
            "pseudo_out_amount_blinding_masks_sum": obj.get("pseudo_out_amount_blinding_masks_sum"),
            "real_in_asset_id_blinding_mask_x_amount_sum": obj.get("real_in_asset_id_blinding_mask_x_amount_sum"),
            "amount_commitments_sum": obj.get("amount_commitments_sum"),
            "amount_blinding_masks_sum": obj.get("amount_blinding_masks_sum"),
            "asset_id_blinding_mask_x_amount_sum": obj.get("asset_id_blinding_mask_x_amount_sum"),
            "ao_asset_id": obj.get("ao_asset_id"),
            "ao_asset_id_pt": obj.get("ao_asset_id_pt"),
            "ao_amount_commitment": obj.get("ao_amount_commitment"),
            "ao_amount_blinding_mask": obj.get("ao_amount_blinding_mask"),
            "ao_commitment_in_outputs": obj.get("ao_commitment_in_outputs"),
            "tx_key_pub": obj.get("tx_key_pub"),
            "tx_key_sec": obj.get("tx_key_sec"),
            "tx_pub_key_p": obj.get("tx_pub_key_p")
        })
        return _obj


