# 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 V1GPU(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 = {
        'claim_name': 'str',
        'device_name': 'str',
        'name': 'str',
        'request_name': 'str',
        'tag': 'str',
        'virtual_gpu_options': 'V1VGPUOptions'
    }

    attribute_map = {
        'claim_name': 'claimName',
        'device_name': 'deviceName',
        'name': 'name',
        'request_name': 'requestName',
        'tag': 'tag',
        'virtual_gpu_options': 'virtualGPUOptions'
    }

    def __init__(self, claim_name=None, device_name=None, name='', request_name=None, tag=None, virtual_gpu_options=None, _configuration=None):  # noqa: E501
        """V1GPU - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._claim_name = None
        self._device_name = None
        self._name = None
        self._request_name = None
        self._tag = None
        self._virtual_gpu_options = None
        self.discriminator = None

        if claim_name is not None:
            self.claim_name = claim_name
        if device_name is not None:
            self.device_name = device_name
        self.name = name
        if request_name is not None:
            self.request_name = request_name
        if tag is not None:
            self.tag = tag
        if virtual_gpu_options is not None:
            self.virtual_gpu_options = virtual_gpu_options

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

        ClaimName needs to be provided from the list vmi.spec.resourceClaims[].name where this device is allocated  # noqa: E501

        :return: The claim_name of this V1GPU.  # noqa: E501
        :rtype: str
        """
        return self._claim_name

    @claim_name.setter
    def claim_name(self, claim_name):
        """Sets the claim_name of this V1GPU.

        ClaimName needs to be provided from the list vmi.spec.resourceClaims[].name where this device is allocated  # noqa: E501

        :param claim_name: The claim_name of this V1GPU.  # noqa: E501
        :type: str
        """

        self._claim_name = claim_name

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

        DeviceName is the name of the device provisioned by device-plugins  # noqa: E501

        :return: The device_name of this V1GPU.  # noqa: E501
        :rtype: str
        """
        return self._device_name

    @device_name.setter
    def device_name(self, device_name):
        """Sets the device_name of this V1GPU.

        DeviceName is the name of the device provisioned by device-plugins  # noqa: E501

        :param device_name: The device_name of this V1GPU.  # noqa: E501
        :type: str
        """

        self._device_name = device_name

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

        Name of the GPU device as exposed by a device plugin  # noqa: E501

        :return: The name of this V1GPU.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this V1GPU.

        Name of the GPU device as exposed by a device plugin  # noqa: E501

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

        self._name = name

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

        RequestName needs to be provided from resourceClaim.spec.devices.requests[].name where this device is requested  # noqa: E501

        :return: The request_name of this V1GPU.  # noqa: E501
        :rtype: str
        """
        return self._request_name

    @request_name.setter
    def request_name(self, request_name):
        """Sets the request_name of this V1GPU.

        RequestName needs to be provided from resourceClaim.spec.devices.requests[].name where this device is requested  # noqa: E501

        :param request_name: The request_name of this V1GPU.  # noqa: E501
        :type: str
        """

        self._request_name = request_name

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

        If specified, the virtual network interface address and its tag will be provided to the guest via config drive  # noqa: E501

        :return: The tag of this V1GPU.  # noqa: E501
        :rtype: str
        """
        return self._tag

    @tag.setter
    def tag(self, tag):
        """Sets the tag of this V1GPU.

        If specified, the virtual network interface address and its tag will be provided to the guest via config drive  # noqa: E501

        :param tag: The tag of this V1GPU.  # noqa: E501
        :type: str
        """

        self._tag = tag

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


        :return: The virtual_gpu_options of this V1GPU.  # noqa: E501
        :rtype: V1VGPUOptions
        """
        return self._virtual_gpu_options

    @virtual_gpu_options.setter
    def virtual_gpu_options(self, virtual_gpu_options):
        """Sets the virtual_gpu_options of this V1GPU.


        :param virtual_gpu_options: The virtual_gpu_options of this V1GPU.  # noqa: E501
        :type: V1VGPUOptions
        """

        self._virtual_gpu_options = virtual_gpu_options

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

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