# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from kps_api.models.software_update_batch_type import SoftwareUpdateBatchType  # noqa: F401,E501
from kps_api.models.software_update_state_type import SoftwareUpdateStateType  # noqa: F401,E501


class SoftwareUpdateBatch(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 = {
        'created_at': 'datetime',
        'eta': 'int',
        'id': 'str',
        'progress': 'int',
        'release': 'str',
        'state': 'SoftwareUpdateStateType',
        'stats': 'dict(str, int)',
        'type': 'SoftwareUpdateBatchType',
        'updated_at': 'datetime'
    }

    attribute_map = {
        'created_at': 'createdAt',
        'eta': 'eta',
        'id': 'id',
        'progress': 'progress',
        'release': 'release',
        'state': 'state',
        'stats': 'stats',
        'type': 'type',
        'updated_at': 'updatedAt'
    }

    def __init__(self, created_at=None, eta=None, id=None, progress=None, release=None, state=None, stats=None, type=None, updated_at=None):  # noqa: E501
        """SoftwareUpdateBatch - a model defined in Swagger"""  # noqa: E501
        self._created_at = None
        self._eta = None
        self._id = None
        self._progress = None
        self._release = None
        self._state = None
        self._stats = None
        self._type = None
        self._updated_at = None
        self.discriminator = None
        if created_at is not None:
            self.created_at = created_at
        if eta is not None:
            self.eta = eta
        self.id = id
        if progress is not None:
            self.progress = progress
        self.release = release
        if state is not None:
            self.state = state
        if stats is not None:
            self.stats = stats
        self.type = type
        if updated_at is not None:
            self.updated_at = updated_at

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

        Created timestamp  # noqa: E501

        :return: The created_at of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this SoftwareUpdateBatch.

        Created timestamp  # noqa: E501

        :param created_at: The created_at of this SoftwareUpdateBatch.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        ETA in mins  # noqa: E501

        :return: The eta of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: int
        """
        return self._eta

    @eta.setter
    def eta(self, eta):
        """Sets the eta of this SoftwareUpdateBatch.

        ETA in mins  # noqa: E501

        :param eta: The eta of this SoftwareUpdateBatch.  # noqa: E501
        :type: int
        """

        self._eta = eta

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


        :return: The id of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this SoftwareUpdateBatch.


        :param id: The id of this SoftwareUpdateBatch.  # noqa: E501
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        Progress in percentage  # noqa: E501

        :return: The progress of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: int
        """
        return self._progress

    @progress.setter
    def progress(self, progress):
        """Sets the progress of this SoftwareUpdateBatch.

        Progress in percentage  # noqa: E501

        :param progress: The progress of this SoftwareUpdateBatch.  # noqa: E501
        :type: int
        """

        self._progress = progress

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


        :return: The release of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: str
        """
        return self._release

    @release.setter
    def release(self, release):
        """Sets the release of this SoftwareUpdateBatch.


        :param release: The release of this SoftwareUpdateBatch.  # noqa: E501
        :type: str
        """
        if release is None:
            raise ValueError("Invalid value for `release`, must not be `None`")  # noqa: E501

        self._release = release

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


        :return: The state of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: SoftwareUpdateStateType
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this SoftwareUpdateBatch.


        :param state: The state of this SoftwareUpdateBatch.  # noqa: E501
        :type: SoftwareUpdateStateType
        """

        self._state = state

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

        Count for each stat type  # noqa: E501

        :return: The stats of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: dict(str, int)
        """
        return self._stats

    @stats.setter
    def stats(self, stats):
        """Sets the stats of this SoftwareUpdateBatch.

        Count for each stat type  # noqa: E501

        :param stats: The stats of this SoftwareUpdateBatch.  # noqa: E501
        :type: dict(str, int)
        """

        self._stats = stats

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


        :return: The type of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: SoftwareUpdateBatchType
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this SoftwareUpdateBatch.


        :param type: The type of this SoftwareUpdateBatch.  # noqa: E501
        :type: SoftwareUpdateBatchType
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

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

        Record updated timestamp  # noqa: E501

        :return: The updated_at of this SoftwareUpdateBatch.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this SoftwareUpdateBatch.

        Record updated timestamp  # noqa: E501

        :param updated_at: The updated_at of this SoftwareUpdateBatch.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

    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
        if issubclass(SoftwareUpdateBatch, dict):
            for key, value in self.items():
                result[key] = 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, SoftwareUpdateBatch):
            return False

        return self.__dict__ == other.__dict__

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