# coding: utf-8

"""
    DataDomain Rest API Documentation

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from dd_sdk_1_0.configuration import Configuration


class VersionHistoryInfo(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 = {
        'version': 'str',
        'partition': 'str',
        'operation': 'str',
        'time': 'int',
        'package': 'str'
    }

    attribute_map = {
        'version': 'version',
        'partition': 'partition',
        'operation': 'operation',
        'time': 'time',
        'package': 'package'
    }

    def __init__(self, version=None, partition=None, operation=None, time=None, package=None, _configuration=None):  # noqa: E501
        """VersionHistoryInfo - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._version = None
        self._partition = None
        self._operation = None
        self._time = None
        self._package = None
        self.discriminator = None

        self.version = version
        self.partition = partition
        self.operation = operation
        self.time = time
        if package is not None:
            self.package = package

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


        :return: The version of this VersionHistoryInfo.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this VersionHistoryInfo.


        :param version: The version of this VersionHistoryInfo.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and version is None:
            raise ValueError("Invalid value for `version`, must not be `None`")  # noqa: E501

        self._version = version

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


        :return: The partition of this VersionHistoryInfo.  # noqa: E501
        :rtype: str
        """
        return self._partition

    @partition.setter
    def partition(self, partition):
        """Sets the partition of this VersionHistoryInfo.


        :param partition: The partition of this VersionHistoryInfo.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and partition is None:
            raise ValueError("Invalid value for `partition`, must not be `None`")  # noqa: E501

        self._partition = partition

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


        :return: The operation of this VersionHistoryInfo.  # noqa: E501
        :rtype: str
        """
        return self._operation

    @operation.setter
    def operation(self, operation):
        """Sets the operation of this VersionHistoryInfo.


        :param operation: The operation of this VersionHistoryInfo.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and operation is None:
            raise ValueError("Invalid value for `operation`, must not be `None`")  # noqa: E501

        self._operation = operation

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


        :return: The time of this VersionHistoryInfo.  # noqa: E501
        :rtype: int
        """
        return self._time

    @time.setter
    def time(self, time):
        """Sets the time of this VersionHistoryInfo.


        :param time: The time of this VersionHistoryInfo.  # noqa: E501
        :type: int
        """
        if self._configuration.client_side_validation and time is None:
            raise ValueError("Invalid value for `time`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                time is not None and time < 0):  # noqa: E501
            raise ValueError("Invalid value for `time`, must be a value greater than or equal to `0`")  # noqa: E501

        self._time = time

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


        :return: The package of this VersionHistoryInfo.  # noqa: E501
        :rtype: str
        """
        return self._package

    @package.setter
    def package(self, package):
        """Sets the package of this VersionHistoryInfo.


        :param package: The package of this VersionHistoryInfo.  # noqa: E501
        :type: str
        """

        self._package = package

    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(VersionHistoryInfo, 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, VersionHistoryInfo):
            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, VersionHistoryInfo):
            return True

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