# 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 ChainResult(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 = {
        'name': 'str',
        'address': 'str',
        'parent': 'str',
        'height': 'int',
        'organization': 'str',
        'contracts': 'list[str]',
        'dapps': 'list[str]'
    }

    attribute_map = {
        'name': 'name',
        'address': 'address',
        'parent': 'parent',
        'height': 'height',
        'organization': 'organization',
        'contracts': 'contracts',
        'dapps': 'dapps'
    }

    def __init__(self, name=None, address=None, parent=None, height=None, organization=None, contracts=None, dapps=None):  # noqa: E501
        """ChainResult - a model defined in Swagger"""  # noqa: E501
        self._name = None
        self._address = None
        self._parent = None
        self._height = None
        self._organization = None
        self._contracts = None
        self._dapps = None
        self.discriminator = None
        if name is not None:
            self.name = name
        if address is not None:
            self.address = address
        if parent is not None:
            self.parent = parent
        if height is not None:
            self.height = height
        if organization is not None:
            self.organization = organization
        if contracts is not None:
            self.contracts = contracts
        if dapps is not None:
            self.dapps = dapps

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


        :return: The name of this ChainResult.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ChainResult.


        :param name: The name of this ChainResult.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The address of this ChainResult.  # noqa: E501
        :rtype: str
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this ChainResult.


        :param address: The address of this ChainResult.  # noqa: E501
        :type: str
        """

        self._address = address

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


        :return: The parent of this ChainResult.  # noqa: E501
        :rtype: str
        """
        return self._parent

    @parent.setter
    def parent(self, parent):
        """Sets the parent of this ChainResult.


        :param parent: The parent of this ChainResult.  # noqa: E501
        :type: str
        """

        self._parent = parent

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


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

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


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

        self._height = height

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


        :return: The organization of this ChainResult.  # noqa: E501
        :rtype: str
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """Sets the organization of this ChainResult.


        :param organization: The organization of this ChainResult.  # noqa: E501
        :type: str
        """

        self._organization = organization

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


        :return: The contracts of this ChainResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._contracts

    @contracts.setter
    def contracts(self, contracts):
        """Sets the contracts of this ChainResult.


        :param contracts: The contracts of this ChainResult.  # noqa: E501
        :type: list[str]
        """

        self._contracts = contracts

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


        :return: The dapps of this ChainResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._dapps

    @dapps.setter
    def dapps(self, dapps):
        """Sets the dapps of this ChainResult.


        :param dapps: The dapps of this ChainResult.  # noqa: E501
        :type: list[str]
        """

        self._dapps = dapps

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

        return self.__dict__ == other.__dict__

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