# coding: utf-8

"""
    Azure Blockchain Workbench REST API

    The Azure Blockchain Workbench REST API is a Workbench extensibility point, which allows developers to create and manage blockchain applications, manage users and organizations within a consortium, integrate blockchain applications into services and platforms, perform transactions on a blockchain, and retrieve transactional and contract data from a blockchain.  # 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 Transaction(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 = {
        'id': 'int',
        'connection_id': 'int',
        'transaction_hash': 'str',
        'block_id': 'int',
        '_from': 'str',
        'to': 'str',
        'value': 'float',
        'is_app_builder_tx': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'connection_id': 'connectionId',
        'transaction_hash': 'transactionHash',
        'block_id': 'blockID',
        '_from': 'from',
        'to': 'to',
        'value': 'value',
        'is_app_builder_tx': 'isAppBuilderTx'
    }

    def __init__(self, id=None, connection_id=None, transaction_hash=None, block_id=None, _from=None, to=None, value=None, is_app_builder_tx=None):  # noqa: E501
        """Transaction - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._connection_id = None
        self._transaction_hash = None
        self._block_id = None
        self.__from = None
        self._to = None
        self._value = None
        self._is_app_builder_tx = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if connection_id is not None:
            self.connection_id = connection_id
        if transaction_hash is not None:
            self.transaction_hash = transaction_hash
        if block_id is not None:
            self.block_id = block_id
        if _from is not None:
            self._from = _from
        if to is not None:
            self.to = to
        if value is not None:
            self.value = value
        if is_app_builder_tx is not None:
            self.is_app_builder_tx = is_app_builder_tx

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


        :return: The id of this Transaction.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Transaction.


        :param id: The id of this Transaction.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The connection_id of this Transaction.  # noqa: E501
        :rtype: int
        """
        return self._connection_id

    @connection_id.setter
    def connection_id(self, connection_id):
        """Sets the connection_id of this Transaction.


        :param connection_id: The connection_id of this Transaction.  # noqa: E501
        :type: int
        """

        self._connection_id = connection_id

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


        :return: The transaction_hash of this Transaction.  # noqa: E501
        :rtype: str
        """
        return self._transaction_hash

    @transaction_hash.setter
    def transaction_hash(self, transaction_hash):
        """Sets the transaction_hash of this Transaction.


        :param transaction_hash: The transaction_hash of this Transaction.  # noqa: E501
        :type: str
        """

        self._transaction_hash = transaction_hash

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


        :return: The block_id of this Transaction.  # noqa: E501
        :rtype: int
        """
        return self._block_id

    @block_id.setter
    def block_id(self, block_id):
        """Sets the block_id of this Transaction.


        :param block_id: The block_id of this Transaction.  # noqa: E501
        :type: int
        """

        self._block_id = block_id

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


        :return: The _from of this Transaction.  # noqa: E501
        :rtype: str
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this Transaction.


        :param _from: The _from of this Transaction.  # noqa: E501
        :type: str
        """

        self.__from = _from

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


        :return: The to of this Transaction.  # noqa: E501
        :rtype: str
        """
        return self._to

    @to.setter
    def to(self, to):
        """Sets the to of this Transaction.


        :param to: The to of this Transaction.  # noqa: E501
        :type: str
        """

        self._to = to

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


        :return: The value of this Transaction.  # noqa: E501
        :rtype: float
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this Transaction.


        :param value: The value of this Transaction.  # noqa: E501
        :type: float
        """

        self._value = value

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


        :return: The is_app_builder_tx of this Transaction.  # noqa: E501
        :rtype: bool
        """
        return self._is_app_builder_tx

    @is_app_builder_tx.setter
    def is_app_builder_tx(self, is_app_builder_tx):
        """Sets the is_app_builder_tx of this Transaction.


        :param is_app_builder_tx: The is_app_builder_tx of this Transaction.  # noqa: E501
        :type: bool
        """

        self._is_app_builder_tx = is_app_builder_tx

    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

        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, Transaction):
            return False

        return self.__dict__ == other.__dict__

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