# coding: utf-8

"""
    mParticle

    mParticle Event API

    OpenAPI spec version: 1.0.1
    Contact: support@mparticle.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    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 DeviceCurrentState(object):

    def __init__(self, time_since_start_ms=None, battery_level=None, data_connection_type=None, data_connection_type_detail=None, gps_state=None, total_system_memory_usage_bytes=None, disk_space_free_bytes=None, cpu=None, system_memory_available_bytes=None, system_memory_low=None, system_memory_threshold_bytes=None, application_memory_available_bytes=None, application_memory_max_bytes=None, application_memory_total_bytes=None, device_orientation=None, status_bar_orientation=None):
        """
        DeviceCurrentState - 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 = {
            'time_since_start_ms': 'int',
            'battery_level': 'float',
            'data_connection_type': 'str',
            'data_connection_type_detail': 'str',
            'gps_state': 'bool',
            'total_system_memory_usage_bytes': 'int',
            'disk_space_free_bytes': 'int',
            'cpu': 'str',
            'system_memory_available_bytes': 'float',
            'system_memory_low': 'bool',
            'system_memory_threshold_bytes': 'float',
            'application_memory_available_bytes': 'float',
            'application_memory_max_bytes': 'float',
            'application_memory_total_bytes': 'float',
            'device_orientation': 'str',
            'status_bar_orientation': 'str'
        }

        self.attribute_map = {
            'time_since_start_ms': 'time_since_start_ms',
            'battery_level': 'battery_level',
            'data_connection_type': 'data_connection_type',
            'data_connection_type_detail': 'data_connection_type_detail',
            'gps_state': 'gps_state',
            'total_system_memory_usage_bytes': 'total_system_memory_usage_bytes',
            'disk_space_free_bytes': 'disk_space_free_bytes',
            'cpu': 'cpu',
            'system_memory_available_bytes': 'system_memory_available_bytes',
            'system_memory_low': 'system_memory_low',
            'system_memory_threshold_bytes': 'system_memory_threshold_bytes',
            'application_memory_available_bytes': 'application_memory_available_bytes',
            'application_memory_max_bytes': 'application_memory_max_bytes',
            'application_memory_total_bytes': 'application_memory_total_bytes',
            'device_orientation': 'device_orientation',
            'status_bar_orientation': 'status_bar_orientation'
        }

        self._time_since_start_ms = time_since_start_ms
        self._battery_level = battery_level
        self._data_connection_type = data_connection_type
        self._data_connection_type_detail = data_connection_type_detail
        self._gps_state = gps_state
        self._total_system_memory_usage_bytes = total_system_memory_usage_bytes
        self._disk_space_free_bytes = disk_space_free_bytes
        self._cpu = cpu
        self._system_memory_available_bytes = system_memory_available_bytes
        self._system_memory_low = system_memory_low
        self._system_memory_threshold_bytes = system_memory_threshold_bytes
        self._application_memory_available_bytes = application_memory_available_bytes
        self._application_memory_max_bytes = application_memory_max_bytes
        self._application_memory_total_bytes = application_memory_total_bytes
        self._device_orientation = device_orientation
        self._status_bar_orientation = status_bar_orientation

    @property
    def time_since_start_ms(self):
        """
        Gets the time_since_start_ms of this DeviceCurrentState.


        :return: The time_since_start_ms of this DeviceCurrentState.
        :rtype: int
        """
        return self._time_since_start_ms

    @time_since_start_ms.setter
    def time_since_start_ms(self, time_since_start_ms):
        """
        Sets the time_since_start_ms of this DeviceCurrentState.


        :param time_since_start_ms: The time_since_start_ms of this DeviceCurrentState.
        :type: int
        """

        self._time_since_start_ms = time_since_start_ms

    @property
    def battery_level(self):
        """
        Gets the battery_level of this DeviceCurrentState.


        :return: The battery_level of this DeviceCurrentState.
        :rtype: float
        """
        return self._battery_level

    @battery_level.setter
    def battery_level(self, battery_level):
        """
        Sets the battery_level of this DeviceCurrentState.


        :param battery_level: The battery_level of this DeviceCurrentState.
        :type: float
        """

        self._battery_level = battery_level

    @property
    def data_connection_type(self):
        """
        Gets the data_connection_type of this DeviceCurrentState.


        :return: The data_connection_type of this DeviceCurrentState.
        :rtype: str
        """
        return self._data_connection_type

    @data_connection_type.setter
    def data_connection_type(self, data_connection_type):
        """
        Sets the data_connection_type of this DeviceCurrentState.


        :param data_connection_type: The data_connection_type of this DeviceCurrentState.
        :type: str
        """

        self._data_connection_type = data_connection_type

    @property
    def data_connection_type_detail(self):
        """
        Gets the data_connection_type_detail of this DeviceCurrentState.


        :return: The data_connection_type_detail of this DeviceCurrentState.
        :rtype: str
        """
        return self._data_connection_type_detail

    @data_connection_type_detail.setter
    def data_connection_type_detail(self, data_connection_type_detail):
        """
        Sets the data_connection_type_detail of this DeviceCurrentState.


        :param data_connection_type_detail: The data_connection_type_detail of this DeviceCurrentState.
        :type: str
        """

        self._data_connection_type_detail = data_connection_type_detail

    @property
    def gps_state(self):
        """
        Gets the gps_state of this DeviceCurrentState.


        :return: The gps_state of this DeviceCurrentState.
        :rtype: bool
        """
        return self._gps_state

    @gps_state.setter
    def gps_state(self, gps_state):
        """
        Sets the gps_state of this DeviceCurrentState.


        :param gps_state: The gps_state of this DeviceCurrentState.
        :type: bool
        """

        self._gps_state = gps_state

    @property
    def total_system_memory_usage_bytes(self):
        """
        Gets the total_system_memory_usage_bytes of this DeviceCurrentState.


        :return: The total_system_memory_usage_bytes of this DeviceCurrentState.
        :rtype: int
        """
        return self._total_system_memory_usage_bytes

    @total_system_memory_usage_bytes.setter
    def total_system_memory_usage_bytes(self, total_system_memory_usage_bytes):
        """
        Sets the total_system_memory_usage_bytes of this DeviceCurrentState.


        :param total_system_memory_usage_bytes: The total_system_memory_usage_bytes of this DeviceCurrentState.
        :type: int
        """

        self._total_system_memory_usage_bytes = total_system_memory_usage_bytes

    @property
    def disk_space_free_bytes(self):
        """
        Gets the disk_space_free_bytes of this DeviceCurrentState.


        :return: The disk_space_free_bytes of this DeviceCurrentState.
        :rtype: int
        """
        return self._disk_space_free_bytes

    @disk_space_free_bytes.setter
    def disk_space_free_bytes(self, disk_space_free_bytes):
        """
        Sets the disk_space_free_bytes of this DeviceCurrentState.


        :param disk_space_free_bytes: The disk_space_free_bytes of this DeviceCurrentState.
        :type: int
        """

        self._disk_space_free_bytes = disk_space_free_bytes

    @property
    def cpu(self):
        """
        Gets the cpu of this DeviceCurrentState.


        :return: The cpu of this DeviceCurrentState.
        :rtype: str
        """
        return self._cpu

    @cpu.setter
    def cpu(self, cpu):
        """
        Sets the cpu of this DeviceCurrentState.


        :param cpu: The cpu of this DeviceCurrentState.
        :type: str
        """

        self._cpu = cpu

    @property
    def system_memory_available_bytes(self):
        """
        Gets the system_memory_available_bytes of this DeviceCurrentState.


        :return: The system_memory_available_bytes of this DeviceCurrentState.
        :rtype: float
        """
        return self._system_memory_available_bytes

    @system_memory_available_bytes.setter
    def system_memory_available_bytes(self, system_memory_available_bytes):
        """
        Sets the system_memory_available_bytes of this DeviceCurrentState.


        :param system_memory_available_bytes: The system_memory_available_bytes of this DeviceCurrentState.
        :type: float
        """

        self._system_memory_available_bytes = system_memory_available_bytes

    @property
    def system_memory_low(self):
        """
        Gets the system_memory_low of this DeviceCurrentState.


        :return: The system_memory_low of this DeviceCurrentState.
        :rtype: bool
        """
        return self._system_memory_low

    @system_memory_low.setter
    def system_memory_low(self, system_memory_low):
        """
        Sets the system_memory_low of this DeviceCurrentState.


        :param system_memory_low: The system_memory_low of this DeviceCurrentState.
        :type: bool
        """

        self._system_memory_low = system_memory_low

    @property
    def system_memory_threshold_bytes(self):
        """
        Gets the system_memory_threshold_bytes of this DeviceCurrentState.


        :return: The system_memory_threshold_bytes of this DeviceCurrentState.
        :rtype: float
        """
        return self._system_memory_threshold_bytes

    @system_memory_threshold_bytes.setter
    def system_memory_threshold_bytes(self, system_memory_threshold_bytes):
        """
        Sets the system_memory_threshold_bytes of this DeviceCurrentState.


        :param system_memory_threshold_bytes: The system_memory_threshold_bytes of this DeviceCurrentState.
        :type: float
        """

        self._system_memory_threshold_bytes = system_memory_threshold_bytes

    @property
    def application_memory_available_bytes(self):
        """
        Gets the application_memory_available_bytes of this DeviceCurrentState.


        :return: The application_memory_available_bytes of this DeviceCurrentState.
        :rtype: float
        """
        return self._application_memory_available_bytes

    @application_memory_available_bytes.setter
    def application_memory_available_bytes(self, application_memory_available_bytes):
        """
        Sets the application_memory_available_bytes of this DeviceCurrentState.


        :param application_memory_available_bytes: The application_memory_available_bytes of this DeviceCurrentState.
        :type: float
        """

        self._application_memory_available_bytes = application_memory_available_bytes

    @property
    def application_memory_max_bytes(self):
        """
        Gets the application_memory_max_bytes of this DeviceCurrentState.


        :return: The application_memory_max_bytes of this DeviceCurrentState.
        :rtype: float
        """
        return self._application_memory_max_bytes

    @application_memory_max_bytes.setter
    def application_memory_max_bytes(self, application_memory_max_bytes):
        """
        Sets the application_memory_max_bytes of this DeviceCurrentState.


        :param application_memory_max_bytes: The application_memory_max_bytes of this DeviceCurrentState.
        :type: float
        """

        self._application_memory_max_bytes = application_memory_max_bytes

    @property
    def application_memory_total_bytes(self):
        """
        Gets the application_memory_total_bytes of this DeviceCurrentState.


        :return: The application_memory_total_bytes of this DeviceCurrentState.
        :rtype: float
        """
        return self._application_memory_total_bytes

    @application_memory_total_bytes.setter
    def application_memory_total_bytes(self, application_memory_total_bytes):
        """
        Sets the application_memory_total_bytes of this DeviceCurrentState.


        :param application_memory_total_bytes: The application_memory_total_bytes of this DeviceCurrentState.
        :type: float
        """

        self._application_memory_total_bytes = application_memory_total_bytes

    @property
    def device_orientation(self):
        """
        Gets the device_orientation of this DeviceCurrentState.


        :return: The device_orientation of this DeviceCurrentState.
        :rtype: str
        """
        return self._device_orientation

    @device_orientation.setter
    def device_orientation(self, device_orientation):
        """
        Sets the device_orientation of this DeviceCurrentState.


        :param device_orientation: The device_orientation of this DeviceCurrentState.
        :type: str
        """
        allowed_values = ["unknown", "portrait", "portrait_upside_down", "landscape", "LandscapeLeft", "LandscapeRight", "FaceUp", "FaceDown", "Square"]
        if device_orientation not in allowed_values:
            raise ValueError(
                "Invalid value for `device_orientation` ({0}), must be one of {1}"
                .format(device_orientation, allowed_values)
            )

        self._device_orientation = device_orientation

    @property
    def status_bar_orientation(self):
        """
        Gets the status_bar_orientation of this DeviceCurrentState.


        :return: The status_bar_orientation of this DeviceCurrentState.
        :rtype: str
        """
        return self._status_bar_orientation

    @status_bar_orientation.setter
    def status_bar_orientation(self, status_bar_orientation):
        """
        Sets the status_bar_orientation of this DeviceCurrentState.


        :param status_bar_orientation: The status_bar_orientation of this DeviceCurrentState.
        :type: str
        """
        allowed_values = ["unknown", "portrait", "portrait_upside_down", "landscape", "LandscapeLeft", "LandscapeRight", "FaceUp", "FaceDown", "Square"]
        if status_bar_orientation not in allowed_values:
            raise ValueError(
                "Invalid value for `status_bar_orientation` ({0}), must be one of {1}"
                .format(status_bar_orientation, allowed_values)
            )

        self._status_bar_orientation = status_bar_orientation

    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
