# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re


class Location(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, name=None, address=None, timezone=None, capabilities=None, status=None, created_at=None, merchant_id=None, country=None, language_code=None, currency=None, phone_number=None, business_name=None, type=None, website_url=None, business_hours=None, business_email=None, description=None, twitter_username=None, instagram_username=None, facebook_url=None, coordinates=None):
        """
        Location - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'str',
            'name': 'str',
            'address': 'Address',
            'timezone': 'str',
            'capabilities': 'list[str]',
            'status': 'str',
            'created_at': 'str',
            'merchant_id': 'str',
            'country': 'str',
            'language_code': 'str',
            'currency': 'str',
            'phone_number': 'str',
            'business_name': 'str',
            'type': 'str',
            'website_url': 'str',
            'business_hours': 'BusinessHours',
            'business_email': 'str',
            'description': 'str',
            'twitter_username': 'str',
            'instagram_username': 'str',
            'facebook_url': 'str',
            'coordinates': 'Coordinates'
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'address': 'address',
            'timezone': 'timezone',
            'capabilities': 'capabilities',
            'status': 'status',
            'created_at': 'created_at',
            'merchant_id': 'merchant_id',
            'country': 'country',
            'language_code': 'language_code',
            'currency': 'currency',
            'phone_number': 'phone_number',
            'business_name': 'business_name',
            'type': 'type',
            'website_url': 'website_url',
            'business_hours': 'business_hours',
            'business_email': 'business_email',
            'description': 'description',
            'twitter_username': 'twitter_username',
            'instagram_username': 'instagram_username',
            'facebook_url': 'facebook_url',
            'coordinates': 'coordinates'
        }

        self._id = id
        self._name = name
        self._address = address
        self._timezone = timezone
        self._capabilities = capabilities
        self._status = status
        self._created_at = created_at
        self._merchant_id = merchant_id
        self._country = country
        self._language_code = language_code
        self._currency = currency
        self._phone_number = phone_number
        self._business_name = business_name
        self._type = type
        self._website_url = website_url
        self._business_hours = business_hours
        self._business_email = business_email
        self._description = description
        self._twitter_username = twitter_username
        self._instagram_username = instagram_username
        self._facebook_url = facebook_url
        self._coordinates = coordinates

    @property
    def id(self):
        """
        Gets the id of this Location.
        The location's unique ID.

        :return: The id of this Location.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this Location.
        The location's unique ID.

        :param id: The id of this Location.
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this Location.
        The location's name. Location names are set by the account owner and displayed in the dashboard as the location's nickname

        :return: The name of this Location.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this Location.
        The location's name. Location names are set by the account owner and displayed in the dashboard as the location's nickname

        :param name: The name of this Location.
        :type: str
        """

        self._name = name

    @property
    def address(self):
        """
        Gets the address of this Location.
        The location's physical address.

        :return: The address of this Location.
        :rtype: Address
        """
        return self._address

    @address.setter
    def address(self, address):
        """
        Sets the address of this Location.
        The location's physical address.

        :param address: The address of this Location.
        :type: Address
        """

        self._address = address

    @property
    def timezone(self):
        """
        Gets the timezone of this Location.
        The [IANA Timezone Database](https://www.iana.org/time-zones) identifier for the location's timezone.

        :return: The timezone of this Location.
        :rtype: str
        """
        return self._timezone

    @timezone.setter
    def timezone(self, timezone):
        """
        Sets the timezone of this Location.
        The [IANA Timezone Database](https://www.iana.org/time-zones) identifier for the location's timezone.

        :param timezone: The timezone of this Location.
        :type: str
        """

        self._timezone = timezone

    @property
    def capabilities(self):
        """
        Gets the capabilities of this Location.
        Indicates which Square features are enabled for the location. See [LocationCapability](#type-locationcapability) for possible values

        :return: The capabilities of this Location.
        :rtype: list[str]
        """
        return self._capabilities

    @capabilities.setter
    def capabilities(self, capabilities):
        """
        Sets the capabilities of this Location.
        Indicates which Square features are enabled for the location. See [LocationCapability](#type-locationcapability) for possible values

        :param capabilities: The capabilities of this Location.
        :type: list[str]
        """

        self._capabilities = capabilities

    @property
    def status(self):
        """
        Gets the status of this Location.
        The location's status See [LocationStatus](#type-locationstatus) for possible values

        :return: The status of this Location.
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """
        Sets the status of this Location.
        The location's status See [LocationStatus](#type-locationstatus) for possible values

        :param status: The status of this Location.
        :type: str
        """

        self._status = status

    @property
    def created_at(self):
        """
        Gets the created_at of this Location.
        The time when the location was created, in RFC 3339 format.

        :return: The created_at of this Location.
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this Location.
        The time when the location was created, in RFC 3339 format.

        :param created_at: The created_at of this Location.
        :type: str
        """

        self._created_at = created_at

    @property
    def merchant_id(self):
        """
        Gets the merchant_id of this Location.
        The identifier of the merchant that owns the location.

        :return: The merchant_id of this Location.
        :rtype: str
        """
        return self._merchant_id

    @merchant_id.setter
    def merchant_id(self, merchant_id):
        """
        Sets the merchant_id of this Location.
        The identifier of the merchant that owns the location.

        :param merchant_id: The merchant_id of this Location.
        :type: str
        """

        self._merchant_id = merchant_id

    @property
    def country(self):
        """
        Gets the country of this Location.
        The location's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values

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

    @country.setter
    def country(self, country):
        """
        Sets the country of this Location.
        The location's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values

        :param country: The country of this Location.
        :type: str
        """

        self._country = country

    @property
    def language_code(self):
        """
        Gets the language_code of this Location.
        The language associated with the location in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).

        :return: The language_code of this Location.
        :rtype: str
        """
        return self._language_code

    @language_code.setter
    def language_code(self, language_code):
        """
        Sets the language_code of this Location.
        The language associated with the location in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).

        :param language_code: The language_code of this Location.
        :type: str
        """

        self._language_code = language_code

    @property
    def currency(self):
        """
        Gets the currency of this Location.
        The currency used for all transactions at this location, specified in __ISO 4217 format__. For example, the currency for a location processing transactions in the United States is 'USD'. See [Currency](#type-currency) for possible values

        :return: The currency of this Location.
        :rtype: str
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """
        Sets the currency of this Location.
        The currency used for all transactions at this location, specified in __ISO 4217 format__. For example, the currency for a location processing transactions in the United States is 'USD'. See [Currency](#type-currency) for possible values

        :param currency: The currency of this Location.
        :type: str
        """

        self._currency = currency

    @property
    def phone_number(self):
        """
        Gets the phone_number of this Location.
        The location's phone_number.

        :return: The phone_number of this Location.
        :rtype: str
        """
        return self._phone_number

    @phone_number.setter
    def phone_number(self, phone_number):
        """
        Sets the phone_number of this Location.
        The location's phone_number.

        :param phone_number: The phone_number of this Location.
        :type: str
        """

        self._phone_number = phone_number

    @property
    def business_name(self):
        """
        Gets the business_name of this Location.
        The location's business_name which is shown to its customers. For example, this is the name printed on its customer's receipts.

        :return: The business_name of this Location.
        :rtype: str
        """
        return self._business_name

    @business_name.setter
    def business_name(self, business_name):
        """
        Sets the business_name of this Location.
        The location's business_name which is shown to its customers. For example, this is the name printed on its customer's receipts.

        :param business_name: The business_name of this Location.
        :type: str
        """

        self._business_name = business_name

    @property
    def type(self):
        """
        Gets the type of this Location.
        The location's type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values

        :return: The type of this Location.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this Location.
        The location's type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values

        :param type: The type of this Location.
        :type: str
        """

        self._type = type

    @property
    def website_url(self):
        """
        Gets the website_url of this Location.
        The location's website, as set by the account owner in the Square dashboard.  Default: none; only exists if explicitly set.

        :return: The website_url of this Location.
        :rtype: str
        """
        return self._website_url

    @website_url.setter
    def website_url(self, website_url):
        """
        Sets the website_url of this Location.
        The location's website, as set by the account owner in the Square dashboard.  Default: none; only exists if explicitly set.

        :param website_url: The website_url of this Location.
        :type: str
        """

        self._website_url = website_url

    @property
    def business_hours(self):
        """
        Gets the business_hours of this Location.
          The hours of operation for a business location.  Default: none; only exists if explicitly set.

        :return: The business_hours of this Location.
        :rtype: BusinessHours
        """
        return self._business_hours

    @business_hours.setter
    def business_hours(self, business_hours):
        """
        Sets the business_hours of this Location.
          The hours of operation for a business location.  Default: none; only exists if explicitly set.

        :param business_hours: The business_hours of this Location.
        :type: BusinessHours
        """

        self._business_hours = business_hours

    @property
    def business_email(self):
        """
        Gets the business_email of this Location.
        The email of the location.

        :return: The business_email of this Location.
        :rtype: str
        """
        return self._business_email

    @business_email.setter
    def business_email(self, business_email):
        """
        Sets the business_email of this Location.
        The email of the location.

        :param business_email: The business_email of this Location.
        :type: str
        """

        self._business_email = business_email

    @property
    def description(self):
        """
        Gets the description of this Location.
        The business description of the location.

        :return: The description of this Location.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this Location.
        The business description of the location.

        :param description: The description of this Location.
        :type: str
        """

        self._description = description

    @property
    def twitter_username(self):
        """
        Gets the twitter_username of this Location.
        The Twitter username of the location without the '

        :return: The twitter_username of this Location.
        :rtype: str
        """
        return self._twitter_username

    @twitter_username.setter
    def twitter_username(self, twitter_username):
        """
        Sets the twitter_username of this Location.
        The Twitter username of the location without the '

        :param twitter_username: The twitter_username of this Location.
        :type: str
        """

        self._twitter_username = twitter_username

    @property
    def instagram_username(self):
        """
        Gets the instagram_username of this Location.
        The Instagram username of the location without the '

        :return: The instagram_username of this Location.
        :rtype: str
        """
        return self._instagram_username

    @instagram_username.setter
    def instagram_username(self, instagram_username):
        """
        Sets the instagram_username of this Location.
        The Instagram username of the location without the '

        :param instagram_username: The instagram_username of this Location.
        :type: str
        """

        self._instagram_username = instagram_username

    @property
    def facebook_url(self):
        """
        Gets the facebook_url of this Location.
        The Facebook profile URL of the location. The URL should begin with 'facebook.com/'.

        :return: The facebook_url of this Location.
        :rtype: str
        """
        return self._facebook_url

    @facebook_url.setter
    def facebook_url(self, facebook_url):
        """
        Sets the facebook_url of this Location.
        The Facebook profile URL of the location. The URL should begin with 'facebook.com/'.

        :param facebook_url: The facebook_url of this Location.
        :type: str
        """

        self._facebook_url = facebook_url

    @property
    def coordinates(self):
        """
        Gets the coordinates of this Location.
        The physical coordinates (latitude and longitude) of the location.

        :return: The coordinates of this Location.
        :rtype: Coordinates
        """
        return self._coordinates

    @coordinates.setter
    def coordinates(self, coordinates):
        """
        Sets the coordinates of this Location.
        The physical coordinates (latitude and longitude) of the location.

        :param coordinates: The coordinates of this Location.
        :type: Coordinates
        """

        self._coordinates = coordinates

    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
        """
        return self.__dict__ == other.__dict__

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