# coding: utf-8

"""
    ****************************************************************************
    Copyright (c) 2016-present,
    Jaguar0625, gimre, BloodyRookie, Tech Bureau, Corp. All rights reserved.

    This file is part of Catapult.

    Catapult is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Catapult is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Catapult. If not, see <http://www.gnu.org/licenses/>.
    ****************************************************************************
    
    Catapult REST Endpoints
    OpenAPI Specification of catapult-rest 2.2.0  # noqa: E501
    The version of the OpenAPI document: 0.10.4
    Contact: contact@nem.foundation

    NOTE: This file is auto generated by Symbol OpenAPI Generator:
    https://github.com/nemtech/symbol-openapi-generator
    Do not edit this file manually.
"""


import pprint
import re  # noqa: F401

import six

from symbol_openapi_client.configuration import Configuration


class MerkleTreeBranchDTO(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'type': 'MerkleTreeNodeTypeEnum',
        'path': 'str',
        'encoded_path': 'str',
        'nibble_count': 'int',
        'link_mask': 'str',
        'links': 'list[MerkleTreeBranchLinkDTO]',
        'branch_hash': 'str'
    }

    attribute_map = {
        'type': 'type',
        'path': 'path',
        'encoded_path': 'encodedPath',
        'nibble_count': 'nibbleCount',
        'link_mask': 'linkMask',
        'links': 'links',
        'branch_hash': 'branchHash'
    }

    def __init__(self, type=None, path=None, encoded_path=None, nibble_count=None, link_mask=None, links=None, branch_hash=None, local_vars_configuration=None):  # noqa: E501
        """MerkleTreeBranchDTO - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._type = None
        self._path = None
        self._encoded_path = None
        self._nibble_count = None
        self._link_mask = None
        self._links = None
        self._branch_hash = None
        self.discriminator = None

        self.type = type
        self.path = path
        self.encoded_path = encoded_path
        self.nibble_count = nibble_count
        self.link_mask = link_mask
        self.links = links
        self.branch_hash = branch_hash

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


        :return: The type of this MerkleTreeBranchDTO.  # noqa: E501
        :rtype: MerkleTreeNodeTypeEnum
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this MerkleTreeBranchDTO.


        :param type: The type of this MerkleTreeBranchDTO.  # noqa: E501
        :type: MerkleTreeNodeTypeEnum
        """
        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

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

        Branch link path.  # noqa: E501

        :return: The path of this MerkleTreeBranchDTO.  # noqa: E501
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """Sets the path of this MerkleTreeBranchDTO.

        Branch link path.  # noqa: E501

        :param path: The path of this MerkleTreeBranchDTO.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and path is None:  # noqa: E501
            raise ValueError("Invalid value for `path`, must not be `None`")  # noqa: E501

        self._path = path

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

        Encoded branch link path.  # noqa: E501

        :return: The encoded_path of this MerkleTreeBranchDTO.  # noqa: E501
        :rtype: str
        """
        return self._encoded_path

    @encoded_path.setter
    def encoded_path(self, encoded_path):
        """Sets the encoded_path of this MerkleTreeBranchDTO.

        Encoded branch link path.  # noqa: E501

        :param encoded_path: The encoded_path of this MerkleTreeBranchDTO.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and encoded_path is None:  # noqa: E501
            raise ValueError("Invalid value for `encoded_path`, must not be `None`")  # noqa: E501

        self._encoded_path = encoded_path

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

        Nibble count.  # noqa: E501

        :return: The nibble_count of this MerkleTreeBranchDTO.  # noqa: E501
        :rtype: int
        """
        return self._nibble_count

    @nibble_count.setter
    def nibble_count(self, nibble_count):
        """Sets the nibble_count of this MerkleTreeBranchDTO.

        Nibble count.  # noqa: E501

        :param nibble_count: The nibble_count of this MerkleTreeBranchDTO.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and nibble_count is None:  # noqa: E501
            raise ValueError("Invalid value for `nibble_count`, must not be `None`")  # noqa: E501

        self._nibble_count = nibble_count

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

        Branch link bitmask.  # noqa: E501

        :return: The link_mask of this MerkleTreeBranchDTO.  # noqa: E501
        :rtype: str
        """
        return self._link_mask

    @link_mask.setter
    def link_mask(self, link_mask):
        """Sets the link_mask of this MerkleTreeBranchDTO.

        Branch link bitmask.  # noqa: E501

        :param link_mask: The link_mask of this MerkleTreeBranchDTO.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and link_mask is None:  # noqa: E501
            raise ValueError("Invalid value for `link_mask`, must not be `None`")  # noqa: E501

        self._link_mask = link_mask

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

        Branch links (max 16).  # noqa: E501

        :return: The links of this MerkleTreeBranchDTO.  # noqa: E501
        :rtype: list[MerkleTreeBranchLinkDTO]
        """
        return self._links

    @links.setter
    def links(self, links):
        """Sets the links of this MerkleTreeBranchDTO.

        Branch links (max 16).  # noqa: E501

        :param links: The links of this MerkleTreeBranchDTO.  # noqa: E501
        :type: list[MerkleTreeBranchLinkDTO]
        """
        if self.local_vars_configuration.client_side_validation and links is None:  # noqa: E501
            raise ValueError("Invalid value for `links`, must not be `None`")  # noqa: E501

        self._links = links

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


        :return: The branch_hash of this MerkleTreeBranchDTO.  # noqa: E501
        :rtype: str
        """
        return self._branch_hash

    @branch_hash.setter
    def branch_hash(self, branch_hash):
        """Sets the branch_hash of this MerkleTreeBranchDTO.


        :param branch_hash: The branch_hash of this MerkleTreeBranchDTO.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and branch_hash is None:  # noqa: E501
            raise ValueError("Invalid value for `branch_hash`, must not be `None`")  # noqa: E501

        self._branch_hash = branch_hash

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

        for attr, _ in six.iteritems(self.openapi_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, MerkleTreeBranchDTO):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
