# 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 1.1.0  # noqa: E501
    The version of the OpenAPI document: 0.9.2
    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 MetadataEntryDTO(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 = {
        'composite_hash': 'str',
        'source_address': 'str',
        'target_address': 'str',
        'scoped_metadata_key': 'str',
        'target_id': 'AnyOfstringstring',
        'metadata_type': 'MetadataTypeEnum',
        'value': 'str'
    }

    attribute_map = {
        'composite_hash': 'compositeHash',
        'source_address': 'sourceAddress',
        'target_address': 'targetAddress',
        'scoped_metadata_key': 'scopedMetadataKey',
        'target_id': 'targetId',
        'metadata_type': 'metadataType',
        'value': 'value'
    }

    def __init__(self, composite_hash=None, source_address=None, target_address=None, scoped_metadata_key=None, target_id=None, metadata_type=None, value=None, local_vars_configuration=None):  # noqa: E501
        """MetadataEntryDTO - 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._composite_hash = None
        self._source_address = None
        self._target_address = None
        self._scoped_metadata_key = None
        self._target_id = None
        self._metadata_type = None
        self._value = None
        self.discriminator = None

        self.composite_hash = composite_hash
        self.source_address = source_address
        self.target_address = target_address
        self.scoped_metadata_key = scoped_metadata_key
        if target_id is not None:
            self.target_id = target_id
        self.metadata_type = metadata_type
        self.value = value

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


        :return: The composite_hash of this MetadataEntryDTO.  # noqa: E501
        :rtype: str
        """
        return self._composite_hash

    @composite_hash.setter
    def composite_hash(self, composite_hash):
        """Sets the composite_hash of this MetadataEntryDTO.


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

        self._composite_hash = composite_hash

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

        Address expressed in hexadecimal base.  # noqa: E501

        :return: The source_address of this MetadataEntryDTO.  # noqa: E501
        :rtype: str
        """
        return self._source_address

    @source_address.setter
    def source_address(self, source_address):
        """Sets the source_address of this MetadataEntryDTO.

        Address expressed in hexadecimal base.  # noqa: E501

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

        self._source_address = source_address

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

        Address expressed in hexadecimal base.  # noqa: E501

        :return: The target_address of this MetadataEntryDTO.  # noqa: E501
        :rtype: str
        """
        return self._target_address

    @target_address.setter
    def target_address(self, target_address):
        """Sets the target_address of this MetadataEntryDTO.

        Address expressed in hexadecimal base.  # noqa: E501

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

        self._target_address = target_address

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

        Metadata key scoped to source, target and type expressed.  # noqa: E501

        :return: The scoped_metadata_key of this MetadataEntryDTO.  # noqa: E501
        :rtype: str
        """
        return self._scoped_metadata_key

    @scoped_metadata_key.setter
    def scoped_metadata_key(self, scoped_metadata_key):
        """Sets the scoped_metadata_key of this MetadataEntryDTO.

        Metadata key scoped to source, target and type expressed.  # noqa: E501

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

        self._scoped_metadata_key = scoped_metadata_key

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


        :return: The target_id of this MetadataEntryDTO.  # noqa: E501
        :rtype: AnyOfstringstring
        """
        return self._target_id

    @target_id.setter
    def target_id(self, target_id):
        """Sets the target_id of this MetadataEntryDTO.


        :param target_id: The target_id of this MetadataEntryDTO.  # noqa: E501
        :type: AnyOfstringstring
        """

        self._target_id = target_id

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


        :return: The metadata_type of this MetadataEntryDTO.  # noqa: E501
        :rtype: MetadataTypeEnum
        """
        return self._metadata_type

    @metadata_type.setter
    def metadata_type(self, metadata_type):
        """Sets the metadata_type of this MetadataEntryDTO.


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

        self._metadata_type = metadata_type

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

        Metadata value.  # noqa: E501

        :return: The value of this MetadataEntryDTO.  # noqa: E501
        :rtype: str
        """
        return self._value

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

        Metadata value.  # noqa: E501

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

        self._value = value

    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, MetadataEntryDTO):
            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, MetadataEntryDTO):
            return True

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