# 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 VdiskLockInfo(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 = {
        'lock_state': 'int',
        'user_text': 'VdiskDeviceMgmtLockText',
        'timeout': 'int',
        'lock_handle': 'int'
    }

    attribute_map = {
        'lock_state': 'lock_state',
        'user_text': 'user_text',
        'timeout': 'timeout',
        'lock_handle': 'lock_handle'
    }

    def __init__(self, lock_state=None, user_text=None, timeout=None, lock_handle=None, _configuration=None):  # noqa: E501
        """VdiskLockInfo - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._lock_state = None
        self._user_text = None
        self._timeout = None
        self._lock_handle = None
        self.discriminator = None

        self.lock_state = lock_state
        if user_text is not None:
            self.user_text = user_text
        if timeout is not None:
            self.timeout = timeout
        if lock_handle is not None:
            self.lock_handle = lock_handle

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


        :return: The lock_state of this VdiskLockInfo.  # noqa: E501
        :rtype: int
        """
        return self._lock_state

    @lock_state.setter
    def lock_state(self, lock_state):
        """Sets the lock_state of this VdiskLockInfo.


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

        self._lock_state = lock_state

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


        :return: The user_text of this VdiskLockInfo.  # noqa: E501
        :rtype: VdiskDeviceMgmtLockText
        """
        return self._user_text

    @user_text.setter
    def user_text(self, user_text):
        """Sets the user_text of this VdiskLockInfo.


        :param user_text: The user_text of this VdiskLockInfo.  # noqa: E501
        :type: VdiskDeviceMgmtLockText
        """

        self._user_text = user_text

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


        :return: The timeout of this VdiskLockInfo.  # noqa: E501
        :rtype: int
        """
        return self._timeout

    @timeout.setter
    def timeout(self, timeout):
        """Sets the timeout of this VdiskLockInfo.


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

        self._timeout = timeout

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


        :return: The lock_handle of this VdiskLockInfo.  # noqa: E501
        :rtype: int
        """
        return self._lock_handle

    @lock_handle.setter
    def lock_handle(self, lock_handle):
        """Sets the lock_handle of this VdiskLockInfo.


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

        self._lock_handle = lock_handle

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

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