# coding: utf-8

"""
    Phantasma API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class TransactionResult(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'hash': 'str',
        'chain_address': 'str',
        'timestamp': 'int',
        'block_height': 'int',
        'block_hash': 'str',
        'script': 'str',
        'payload': 'str',
        'events': 'list[EventResult]',
        'result': 'str',
        'fee': 'str',
        'state': 'str',
        'signatures': 'list[SignatureResult]',
        'sender': 'str',
        'gas_payer': 'str',
        'gas_target': 'str',
        'gas_price': 'str',
        'gas_limit': 'str',
        'expiration': 'int'
    }

    attribute_map = {
        'hash': 'hash',
        'chain_address': 'chainAddress',
        'timestamp': 'timestamp',
        'block_height': 'blockHeight',
        'block_hash': 'blockHash',
        'script': 'script',
        'payload': 'payload',
        'events': 'events',
        'result': 'result',
        'fee': 'fee',
        'state': 'state',
        'signatures': 'signatures',
        'sender': 'sender',
        'gas_payer': 'gasPayer',
        'gas_target': 'gasTarget',
        'gas_price': 'gasPrice',
        'gas_limit': 'gasLimit',
        'expiration': 'expiration'
    }

    def __init__(self, hash=None, chain_address=None, timestamp=None, block_height=None, block_hash=None, script=None, payload=None, events=None, result=None, fee=None, state=None, signatures=None, sender=None, gas_payer=None, gas_target=None, gas_price=None, gas_limit=None, expiration=None):  # noqa: E501
        """TransactionResult - a model defined in Swagger"""  # noqa: E501
        self._hash = None
        self._chain_address = None
        self._timestamp = None
        self._block_height = None
        self._block_hash = None
        self._script = None
        self._payload = None
        self._events = None
        self._result = None
        self._fee = None
        self._state = None
        self._signatures = None
        self._sender = None
        self._gas_payer = None
        self._gas_target = None
        self._gas_price = None
        self._gas_limit = None
        self._expiration = None
        self.discriminator = None
        if hash is not None:
            self.hash = hash
        if chain_address is not None:
            self.chain_address = chain_address
        if timestamp is not None:
            self.timestamp = timestamp
        if block_height is not None:
            self.block_height = block_height
        if block_hash is not None:
            self.block_hash = block_hash
        if script is not None:
            self.script = script
        if payload is not None:
            self.payload = payload
        if events is not None:
            self.events = events
        if result is not None:
            self.result = result
        if fee is not None:
            self.fee = fee
        if state is not None:
            self.state = state
        if signatures is not None:
            self.signatures = signatures
        if sender is not None:
            self.sender = sender
        if gas_payer is not None:
            self.gas_payer = gas_payer
        if gas_target is not None:
            self.gas_target = gas_target
        if gas_price is not None:
            self.gas_price = gas_price
        if gas_limit is not None:
            self.gas_limit = gas_limit
        if expiration is not None:
            self.expiration = expiration

    @property
    def hash(self):
        """Gets the hash of this TransactionResult.  # noqa: E501


        :return: The hash of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._hash

    @hash.setter
    def hash(self, hash):
        """Sets the hash of this TransactionResult.


        :param hash: The hash of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._hash = hash

    @property
    def chain_address(self):
        """Gets the chain_address of this TransactionResult.  # noqa: E501


        :return: The chain_address of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._chain_address

    @chain_address.setter
    def chain_address(self, chain_address):
        """Sets the chain_address of this TransactionResult.


        :param chain_address: The chain_address of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._chain_address = chain_address

    @property
    def timestamp(self):
        """Gets the timestamp of this TransactionResult.  # noqa: E501


        :return: The timestamp of this TransactionResult.  # noqa: E501
        :rtype: int
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this TransactionResult.


        :param timestamp: The timestamp of this TransactionResult.  # noqa: E501
        :type: int
        """

        self._timestamp = timestamp

    @property
    def block_height(self):
        """Gets the block_height of this TransactionResult.  # noqa: E501


        :return: The block_height of this TransactionResult.  # noqa: E501
        :rtype: int
        """
        return self._block_height

    @block_height.setter
    def block_height(self, block_height):
        """Sets the block_height of this TransactionResult.


        :param block_height: The block_height of this TransactionResult.  # noqa: E501
        :type: int
        """

        self._block_height = block_height

    @property
    def block_hash(self):
        """Gets the block_hash of this TransactionResult.  # noqa: E501


        :return: The block_hash of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._block_hash

    @block_hash.setter
    def block_hash(self, block_hash):
        """Sets the block_hash of this TransactionResult.


        :param block_hash: The block_hash of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._block_hash = block_hash

    @property
    def script(self):
        """Gets the script of this TransactionResult.  # noqa: E501


        :return: The script of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._script

    @script.setter
    def script(self, script):
        """Sets the script of this TransactionResult.


        :param script: The script of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._script = script

    @property
    def payload(self):
        """Gets the payload of this TransactionResult.  # noqa: E501


        :return: The payload of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._payload

    @payload.setter
    def payload(self, payload):
        """Sets the payload of this TransactionResult.


        :param payload: The payload of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._payload = payload

    @property
    def events(self):
        """Gets the events of this TransactionResult.  # noqa: E501


        :return: The events of this TransactionResult.  # noqa: E501
        :rtype: list[EventResult]
        """
        return self._events

    @events.setter
    def events(self, events):
        """Sets the events of this TransactionResult.


        :param events: The events of this TransactionResult.  # noqa: E501
        :type: list[EventResult]
        """

        self._events = events

    @property
    def result(self):
        """Gets the result of this TransactionResult.  # noqa: E501


        :return: The result of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this TransactionResult.


        :param result: The result of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._result = result

    @property
    def fee(self):
        """Gets the fee of this TransactionResult.  # noqa: E501


        :return: The fee of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._fee

    @fee.setter
    def fee(self, fee):
        """Sets the fee of this TransactionResult.


        :param fee: The fee of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._fee = fee

    @property
    def state(self):
        """Gets the state of this TransactionResult.  # noqa: E501


        :return: The state of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this TransactionResult.


        :param state: The state of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._state = state

    @property
    def signatures(self):
        """Gets the signatures of this TransactionResult.  # noqa: E501


        :return: The signatures of this TransactionResult.  # noqa: E501
        :rtype: list[SignatureResult]
        """
        return self._signatures

    @signatures.setter
    def signatures(self, signatures):
        """Sets the signatures of this TransactionResult.


        :param signatures: The signatures of this TransactionResult.  # noqa: E501
        :type: list[SignatureResult]
        """

        self._signatures = signatures

    @property
    def sender(self):
        """Gets the sender of this TransactionResult.  # noqa: E501


        :return: The sender of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._sender

    @sender.setter
    def sender(self, sender):
        """Sets the sender of this TransactionResult.


        :param sender: The sender of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._sender = sender

    @property
    def gas_payer(self):
        """Gets the gas_payer of this TransactionResult.  # noqa: E501


        :return: The gas_payer of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._gas_payer

    @gas_payer.setter
    def gas_payer(self, gas_payer):
        """Sets the gas_payer of this TransactionResult.


        :param gas_payer: The gas_payer of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._gas_payer = gas_payer

    @property
    def gas_target(self):
        """Gets the gas_target of this TransactionResult.  # noqa: E501


        :return: The gas_target of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._gas_target

    @gas_target.setter
    def gas_target(self, gas_target):
        """Sets the gas_target of this TransactionResult.


        :param gas_target: The gas_target of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._gas_target = gas_target

    @property
    def gas_price(self):
        """Gets the gas_price of this TransactionResult.  # noqa: E501


        :return: The gas_price of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._gas_price

    @gas_price.setter
    def gas_price(self, gas_price):
        """Sets the gas_price of this TransactionResult.


        :param gas_price: The gas_price of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._gas_price = gas_price

    @property
    def gas_limit(self):
        """Gets the gas_limit of this TransactionResult.  # noqa: E501


        :return: The gas_limit of this TransactionResult.  # noqa: E501
        :rtype: str
        """
        return self._gas_limit

    @gas_limit.setter
    def gas_limit(self, gas_limit):
        """Sets the gas_limit of this TransactionResult.


        :param gas_limit: The gas_limit of this TransactionResult.  # noqa: E501
        :type: str
        """

        self._gas_limit = gas_limit

    @property
    def expiration(self):
        """Gets the expiration of this TransactionResult.  # noqa: E501


        :return: The expiration of this TransactionResult.  # noqa: E501
        :rtype: int
        """
        return self._expiration

    @expiration.setter
    def expiration(self, expiration):
        """Sets the expiration of this TransactionResult.


        :param expiration: The expiration of this TransactionResult.  # noqa: E501
        :type: int
        """

        self._expiration = expiration

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(TransactionResult, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, TransactionResult):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
