# coding: utf-8

"""
    CyberSource Merged Spec

    All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html

    OpenAPI spec version: 0.0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Ptsv2paymentsTravelInformationAutoRentalReturnAddress(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',
        'location_id': 'str',
        'location': 'str'
    }

    attribute_map = {
        'city': 'city',
        'state': 'state',
        'country': 'country',
        'location_id': 'locationId',
        'location': 'location'
    }

    def __init__(self, city=None, state=None, country=None, location_id=None, location=None):
        """
        Ptsv2paymentsTravelInformationAutoRentalReturnAddress - a model defined in Swagger
        """

        self._city = None
        self._state = None
        self._country = None
        self._location_id = None
        self._location = None

        if city is not None:
          self.city = city
        if state is not None:
          self.state = state
        if country is not None:
          self.country = country
        if location_id is not None:
          self.location_id = location_id
        if location is not None:
          self.location = location

    @property
    def city(self):
        """
        Gets the city of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        City where the auto was returned to the rental agency. 

        :return: The city of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :rtype: str
        """
        return self._city

    @city.setter
    def city(self, city):
        """
        Sets the city of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        City where the auto was returned to the rental agency. 

        :param city: The city of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :type: str
        """
        if city is not None and len(city) > 25:
            raise ValueError("Invalid value for `city`, length must be less than or equal to `25`")

        self._city = city

    @property
    def state(self):
        """
        Gets the state of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        State in which the auto was returned to the rental agency. Use the [State, Province, and Territory Codes for the United States and Canada](https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf).  For authorizations, this field is supported for Visa, MasterCard, and American Express.  For captures, this field is supported only for MasterCard and American Express. 

        :return: The state of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """
        Sets the state of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        State in which the auto was returned to the rental agency. Use the [State, Province, and Territory Codes for the United States and Canada](https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf).  For authorizations, this field is supported for Visa, MasterCard, and American Express.  For captures, this field is supported only for MasterCard and American Express. 

        :param state: The state of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :type: str
        """
        if state is not None and len(state) > 3:
            raise ValueError("Invalid value for `state`, length must be less than or equal to `3`")

        self._state = state

    @property
    def country(self):
        """
        Gets the country of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        Country where the auto was returned to the rental agency. Use the [ISO Standard Country Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf). 

        :return: The country of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :rtype: str
        """
        return self._country

    @country.setter
    def country(self, country):
        """
        Sets the country of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        Country where the auto was returned to the rental agency. Use the [ISO Standard Country Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf). 

        :param country: The country of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :type: str
        """
        if country is not None and len(country) > 3:
            raise ValueError("Invalid value for `country`, length must be less than or equal to `3`")

        self._country = country

    @property
    def location_id(self):
        """
        Gets the location_id of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        Code, address, phone number, etc. used to identify the location of the auto rental return. This field is supported only for MasterCard and American Express. 

        :return: The location_id of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :rtype: str
        """
        return self._location_id

    @location_id.setter
    def location_id(self, location_id):
        """
        Sets the location_id of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        Code, address, phone number, etc. used to identify the location of the auto rental return. This field is supported only for MasterCard and American Express. 

        :param location_id: The location_id of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :type: str
        """
        if location_id is not None and len(location_id) > 10:
            raise ValueError("Invalid value for `location_id`, length must be less than or equal to `10`")

        self._location_id = location_id

    @property
    def location(self):
        """
        Gets the location of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        This field contains the location where the taxi passenger was dropped off or where the auto rental vehicle was returned. 

        :return: The location of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """
        Sets the location of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        This field contains the location where the taxi passenger was dropped off or where the auto rental vehicle was returned. 

        :param location: The location of this Ptsv2paymentsTravelInformationAutoRentalReturnAddress.
        :type: str
        """
        if location is not None and len(location) > 38:
            raise ValueError("Invalid value for `location`, length must be less than or equal to `38`")

        self._location = location

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, Ptsv2paymentsTravelInformationAutoRentalReturnAddress):
            return False

        return self.__dict__ == other.__dict__

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