# coding: utf-8

"""
    CityPay POS API

    CityPay Point of Sale API for payment with card present devices including EMV readers and contactless POS readers.  The API is available from https://github.com/citypay/citypay-pos-api  The API makes it simple to add EMV and contactless card acceptance to iOS, Android, Tablet and desktop applicaitons using a HTTPS protocol. It segregates the complexity of payment processing from the sales environment and eliminates any necessity for the target system to handle card data.   # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: dev@citypay.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class DeviceInfo(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 = {
        'name': 'str',
        'serialno': 'str',
        'portable': 'bool',
        'busy': 'bool',
        'battery_charging': 'bool',
        'battery_percentage': 'int',
        'printer': 'bool'
    }

    attribute_map = {
        'name': 'name',
        'serialno': 'serialno',
        'portable': 'portable',
        'busy': 'busy',
        'battery_charging': 'battery_charging',
        'battery_percentage': 'battery_percentage',
        'printer': 'printer'
    }

    def __init__(self, name=None, serialno=None, portable=None, busy=None, battery_charging=None, battery_percentage=None, printer=None):  # noqa: E501
        """DeviceInfo - a model defined in Swagger"""  # noqa: E501

        self._name = None
        self._serialno = None
        self._portable = None
        self._busy = None
        self._battery_charging = None
        self._battery_percentage = None
        self._printer = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if serialno is not None:
            self.serialno = serialno
        if portable is not None:
            self.portable = portable
        if busy is not None:
            self.busy = busy
        if battery_charging is not None:
            self.battery_charging = battery_charging
        if battery_percentage is not None:
            self.battery_percentage = battery_percentage
        if printer is not None:
            self.printer = printer

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

        The name of the device  # noqa: E501

        :return: The name of this DeviceInfo.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this DeviceInfo.

        The name of the device  # noqa: E501

        :param name: The name of this DeviceInfo.  # noqa: E501
        :type: str
        """

        self._name = name

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

        The serial number of the device  # noqa: E501

        :return: The serialno of this DeviceInfo.  # noqa: E501
        :rtype: str
        """
        return self._serialno

    @serialno.setter
    def serialno(self, serialno):
        """Sets the serialno of this DeviceInfo.

        The serial number of the device  # noqa: E501

        :param serialno: The serialno of this DeviceInfo.  # noqa: E501
        :type: str
        """

        self._serialno = serialno

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

        Whether the device is portable  # noqa: E501

        :return: The portable of this DeviceInfo.  # noqa: E501
        :rtype: bool
        """
        return self._portable

    @portable.setter
    def portable(self, portable):
        """Sets the portable of this DeviceInfo.

        Whether the device is portable  # noqa: E501

        :param portable: The portable of this DeviceInfo.  # noqa: E501
        :type: bool
        """

        self._portable = portable

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

        Whether the device is busy or available for a transaction  # noqa: E501

        :return: The busy of this DeviceInfo.  # noqa: E501
        :rtype: bool
        """
        return self._busy

    @busy.setter
    def busy(self, busy):
        """Sets the busy of this DeviceInfo.

        Whether the device is busy or available for a transaction  # noqa: E501

        :param busy: The busy of this DeviceInfo.  # noqa: E501
        :type: bool
        """

        self._busy = busy

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

        Whether the device is currently charging  # noqa: E501

        :return: The battery_charging of this DeviceInfo.  # noqa: E501
        :rtype: bool
        """
        return self._battery_charging

    @battery_charging.setter
    def battery_charging(self, battery_charging):
        """Sets the battery_charging of this DeviceInfo.

        Whether the device is currently charging  # noqa: E501

        :param battery_charging: The battery_charging of this DeviceInfo.  # noqa: E501
        :type: bool
        """

        self._battery_charging = battery_charging

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

        A percentage value of the battery  # noqa: E501

        :return: The battery_percentage of this DeviceInfo.  # noqa: E501
        :rtype: int
        """
        return self._battery_percentage

    @battery_percentage.setter
    def battery_percentage(self, battery_percentage):
        """Sets the battery_percentage of this DeviceInfo.

        A percentage value of the battery  # noqa: E501

        :param battery_percentage: The battery_percentage of this DeviceInfo.  # noqa: E501
        :type: int
        """

        self._battery_percentage = battery_percentage

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

        Whether the device has a printer  # noqa: E501

        :return: The printer of this DeviceInfo.  # noqa: E501
        :rtype: bool
        """
        return self._printer

    @printer.setter
    def printer(self, printer):
        """Sets the printer of this DeviceInfo.

        Whether the device has a printer  # noqa: E501

        :param printer: The printer of this DeviceInfo.  # noqa: E501
        :type: bool
        """

        self._printer = printer

    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

        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, DeviceInfo):
            return False

        return self.__dict__ == other.__dict__

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