# coding: utf-8

"""
    Selling Partner APIs for Fulfillment Outbound

    The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.

    The version of the OpenAPI document: 2020-07-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class TrackingAddress(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 = {
        'city': 'str',
        'state': 'str',
        'country': 'str',
    }

    attribute_map = {
        'city': 'city',
        'state': 'state',
        'country': 'country',
    }

    def __init__(self, city=None, state=None, country=None, _configuration=None):  # noqa: E501
        """TrackingAddress - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._city = None
        self._state = None
        self._country = None
        self.discriminator = None

        self.city = city
        self.state = state
        self.country = country

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

        The city.  # noqa: E501

        :return: The city of this TrackingAddress.  # noqa: E501
        :rtype: str
        """
        return self._city

    @city.setter
    def city(self, city):
        """Sets the city of this TrackingAddress.

        The city.  # noqa: E501

        :param city: The city of this TrackingAddress.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and city is None:
            raise ValueError("Invalid value for `city`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                city is not None and len(city) > 150):
            raise ValueError("Invalid value for `city`, length must be less than or equal to `150`")  # noqa: E501

        self._city = city

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

        The state.  # noqa: E501

        :return: The state of this TrackingAddress.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this TrackingAddress.

        The state.  # noqa: E501

        :param state: The state of this TrackingAddress.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and state is None:
            raise ValueError("Invalid value for `state`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                state is not None and len(state) > 150):
            raise ValueError("Invalid value for `state`, length must be less than or equal to `150`")  # noqa: E501

        self._state = state

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

        The country.  # noqa: E501

        :return: The country of this TrackingAddress.  # noqa: E501
        :rtype: str
        """
        return self._country

    @country.setter
    def country(self, country):
        """Sets the country of this TrackingAddress.

        The country.  # noqa: E501

        :param country: The country of this TrackingAddress.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and country is None:
            raise ValueError("Invalid value for `country`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                country is not None and len(country) > 6):
            raise ValueError("Invalid value for `country`, length must be less than or equal to `6`")  # noqa: E501

        self._country = country

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

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