# coding: utf-8

"""
    KubeVirt API

    This is KubeVirt API an add-on for Kubernetes.  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: kubevirt-dev@googlegroups.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from kubevirt.configuration import Configuration


class V1LunTarget(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 = {
        'bus': 'str',
        'readonly': 'bool',
        'reservation': 'bool'
    }

    attribute_map = {
        'bus': 'bus',
        'readonly': 'readonly',
        'reservation': 'reservation'
    }

    def __init__(self, bus=None, readonly=None, reservation=None, _configuration=None):  # noqa: E501
        """V1LunTarget - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._bus = None
        self._readonly = None
        self._reservation = None
        self.discriminator = None

        if bus is not None:
            self.bus = bus
        if readonly is not None:
            self.readonly = readonly
        if reservation is not None:
            self.reservation = reservation

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

        Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.  # noqa: E501

        :return: The bus of this V1LunTarget.  # noqa: E501
        :rtype: str
        """
        return self._bus

    @bus.setter
    def bus(self, bus):
        """Sets the bus of this V1LunTarget.

        Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.  # noqa: E501

        :param bus: The bus of this V1LunTarget.  # noqa: E501
        :type: str
        """

        self._bus = bus

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

        ReadOnly. Defaults to false.  # noqa: E501

        :return: The readonly of this V1LunTarget.  # noqa: E501
        :rtype: bool
        """
        return self._readonly

    @readonly.setter
    def readonly(self, readonly):
        """Sets the readonly of this V1LunTarget.

        ReadOnly. Defaults to false.  # noqa: E501

        :param readonly: The readonly of this V1LunTarget.  # noqa: E501
        :type: bool
        """

        self._readonly = readonly

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

        Reservation indicates if the disk needs to support the persistent reservation for the SCSI disk  # noqa: E501

        :return: The reservation of this V1LunTarget.  # noqa: E501
        :rtype: bool
        """
        return self._reservation

    @reservation.setter
    def reservation(self, reservation):
        """Sets the reservation of this V1LunTarget.

        Reservation indicates if the disk needs to support the persistent reservation for the SCSI disk  # noqa: E501

        :param reservation: The reservation of this V1LunTarget.  # noqa: E501
        :type: bool
        """

        self._reservation = reservation

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

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