# 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 BlockResult(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',
        'previous_hash': 'str',
        'timestamp': 'int',
        'height': 'int',
        'chain_address': 'str',
        'protocol': 'int',
        'txs': 'list[TransactionResult]',
        'validator_address': 'str',
        'reward': 'str',
        'events': 'list[EventResult]',
        'oracles': 'list[OracleResult]'
    }

    attribute_map = {
        'hash': 'hash',
        'previous_hash': 'previousHash',
        'timestamp': 'timestamp',
        'height': 'height',
        'chain_address': 'chainAddress',
        'protocol': 'protocol',
        'txs': 'txs',
        'validator_address': 'validatorAddress',
        'reward': 'reward',
        'events': 'events',
        'oracles': 'oracles'
    }

    def __init__(self, hash=None, previous_hash=None, timestamp=None, height=None, chain_address=None, protocol=None, txs=None, validator_address=None, reward=None, events=None, oracles=None):  # noqa: E501
        """BlockResult - a model defined in Swagger"""  # noqa: E501
        self._hash = None
        self._previous_hash = None
        self._timestamp = None
        self._height = None
        self._chain_address = None
        self._protocol = None
        self._txs = None
        self._validator_address = None
        self._reward = None
        self._events = None
        self._oracles = None
        self.discriminator = None
        if hash is not None:
            self.hash = hash
        if previous_hash is not None:
            self.previous_hash = previous_hash
        if timestamp is not None:
            self.timestamp = timestamp
        if height is not None:
            self.height = height
        if chain_address is not None:
            self.chain_address = chain_address
        if protocol is not None:
            self.protocol = protocol
        if txs is not None:
            self.txs = txs
        if validator_address is not None:
            self.validator_address = validator_address
        if reward is not None:
            self.reward = reward
        if events is not None:
            self.events = events
        if oracles is not None:
            self.oracles = oracles

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


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

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


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

        self._hash = hash

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


        :return: The previous_hash of this BlockResult.  # noqa: E501
        :rtype: str
        """
        return self._previous_hash

    @previous_hash.setter
    def previous_hash(self, previous_hash):
        """Sets the previous_hash of this BlockResult.


        :param previous_hash: The previous_hash of this BlockResult.  # noqa: E501
        :type: str
        """

        self._previous_hash = previous_hash

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


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

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


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

        self._timestamp = timestamp

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


        :return: The height of this BlockResult.  # noqa: E501
        :rtype: int
        """
        return self._height

    @height.setter
    def height(self, height):
        """Sets the height of this BlockResult.


        :param height: The height of this BlockResult.  # noqa: E501
        :type: int
        """

        self._height = height

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


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

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


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

        self._chain_address = chain_address

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


        :return: The protocol of this BlockResult.  # noqa: E501
        :rtype: int
        """
        return self._protocol

    @protocol.setter
    def protocol(self, protocol):
        """Sets the protocol of this BlockResult.


        :param protocol: The protocol of this BlockResult.  # noqa: E501
        :type: int
        """

        self._protocol = protocol

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


        :return: The txs of this BlockResult.  # noqa: E501
        :rtype: list[TransactionResult]
        """
        return self._txs

    @txs.setter
    def txs(self, txs):
        """Sets the txs of this BlockResult.


        :param txs: The txs of this BlockResult.  # noqa: E501
        :type: list[TransactionResult]
        """

        self._txs = txs

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


        :return: The validator_address of this BlockResult.  # noqa: E501
        :rtype: str
        """
        return self._validator_address

    @validator_address.setter
    def validator_address(self, validator_address):
        """Sets the validator_address of this BlockResult.


        :param validator_address: The validator_address of this BlockResult.  # noqa: E501
        :type: str
        """

        self._validator_address = validator_address

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


        :return: The reward of this BlockResult.  # noqa: E501
        :rtype: str
        """
        return self._reward

    @reward.setter
    def reward(self, reward):
        """Sets the reward of this BlockResult.


        :param reward: The reward of this BlockResult.  # noqa: E501
        :type: str
        """

        self._reward = reward

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


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

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


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

        self._events = events

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


        :return: The oracles of this BlockResult.  # noqa: E501
        :rtype: list[OracleResult]
        """
        return self._oracles

    @oracles.setter
    def oracles(self, oracles):
        """Sets the oracles of this BlockResult.


        :param oracles: The oracles of this BlockResult.  # noqa: E501
        :type: list[OracleResult]
        """

        self._oracles = oracles

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

        return self.__dict__ == other.__dict__

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