# coding: utf-8

"""
    printnanny-api-client

    Official API client library for print-nanny.com  # noqa: E501

    The version of the OpenAPI document: 0.0.0
    Contact: leigh@print-nanny.com
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from printnanny_api_client.configuration import Configuration


class OctoprintProgress(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'completion': 'float',
        'filepos': 'int',
        'print_time': 'int',
        'print_time_left': 'int',
        'print_time_origin': 'str'
    }

    attribute_map = {
        'completion': 'completion',
        'filepos': 'filepos',
        'print_time': 'printTime',
        'print_time_left': 'printTimeLeft',
        'print_time_origin': 'printTimeOrigin'
    }

    def __init__(self, completion=None, filepos=None, print_time=None, print_time_left=None, print_time_origin=None, local_vars_configuration=None):  # noqa: E501
        """OctoprintProgress - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._completion = None
        self._filepos = None
        self._print_time = None
        self._print_time_left = None
        self._print_time_origin = None
        self.discriminator = None

        self.completion = completion
        self.filepos = filepos
        self.print_time = print_time
        self.print_time_left = print_time_left
        self.print_time_origin = print_time_origin

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


        :return: The completion of this OctoprintProgress.  # noqa: E501
        :rtype: float
        """
        return self._completion

    @completion.setter
    def completion(self, completion):
        """Sets the completion of this OctoprintProgress.


        :param completion: The completion of this OctoprintProgress.  # noqa: E501
        :type completion: float
        """

        self._completion = completion

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


        :return: The filepos of this OctoprintProgress.  # noqa: E501
        :rtype: int
        """
        return self._filepos

    @filepos.setter
    def filepos(self, filepos):
        """Sets the filepos of this OctoprintProgress.


        :param filepos: The filepos of this OctoprintProgress.  # noqa: E501
        :type filepos: int
        """

        self._filepos = filepos

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


        :return: The print_time of this OctoprintProgress.  # noqa: E501
        :rtype: int
        """
        return self._print_time

    @print_time.setter
    def print_time(self, print_time):
        """Sets the print_time of this OctoprintProgress.


        :param print_time: The print_time of this OctoprintProgress.  # noqa: E501
        :type print_time: int
        """

        self._print_time = print_time

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


        :return: The print_time_left of this OctoprintProgress.  # noqa: E501
        :rtype: int
        """
        return self._print_time_left

    @print_time_left.setter
    def print_time_left(self, print_time_left):
        """Sets the print_time_left of this OctoprintProgress.


        :param print_time_left: The print_time_left of this OctoprintProgress.  # noqa: E501
        :type print_time_left: int
        """

        self._print_time_left = print_time_left

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


        :return: The print_time_origin of this OctoprintProgress.  # noqa: E501
        :rtype: str
        """
        return self._print_time_origin

    @print_time_origin.setter
    def print_time_origin(self, print_time_origin):
        """Sets the print_time_origin of this OctoprintProgress.


        :param print_time_origin: The print_time_origin of this OctoprintProgress.  # noqa: E501
        :type print_time_origin: str
        """

        self._print_time_origin = print_time_origin

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, OctoprintProgress):
            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, OctoprintProgress):
            return True

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