# 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.data_source_ifc_ports import DataSourceIfcPorts  # noqa: F401,E501


class DataSourceIfcInfo(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 = {
        'ifc_class': 'str',
        'ifc_driver_id': 'str',
        'ifc_img': 'str',
        'ifc_kind': 'str',
        'ifc_ports': 'list[DataSourceIfcPorts]',
        'ifc_project_id': 'str',
        'ifc_protocol': 'str'
    }

    attribute_map = {
        'ifc_class': 'ifcClass',
        'ifc_driver_id': 'ifcDriverId',
        'ifc_img': 'ifcImg',
        'ifc_kind': 'ifcKind',
        'ifc_ports': 'ifcPorts',
        'ifc_project_id': 'ifcProjectId',
        'ifc_protocol': 'ifcProtocol'
    }

    def __init__(self, ifc_class=None, ifc_driver_id=None, ifc_img=None, ifc_kind=None, ifc_ports=None, ifc_project_id=None, ifc_protocol=None):  # noqa: E501
        """DataSourceIfcInfo - a model defined in Swagger"""  # noqa: E501
        self._ifc_class = None
        self._ifc_driver_id = None
        self._ifc_img = None
        self._ifc_kind = None
        self._ifc_ports = None
        self._ifc_project_id = None
        self._ifc_protocol = None
        self.discriminator = None
        self.ifc_class = ifc_class
        self.ifc_driver_id = ifc_driver_id
        self.ifc_img = ifc_img
        self.ifc_kind = ifc_kind
        if ifc_ports is not None:
            self.ifc_ports = ifc_ports
        if ifc_project_id is not None:
            self.ifc_project_id = ifc_project_id
        self.ifc_protocol = ifc_protocol

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

        Class of the data source DataInterface or Legacy  # noqa: E501

        :return: The ifc_class of this DataSourceIfcInfo.  # noqa: E501
        :rtype: str
        """
        return self._ifc_class

    @ifc_class.setter
    def ifc_class(self, ifc_class):
        """Sets the ifc_class of this DataSourceIfcInfo.

        Class of the data source DataInterface or Legacy  # noqa: E501

        :param ifc_class: The ifc_class of this DataSourceIfcInfo.  # noqa: E501
        :type: str
        """
        if ifc_class is None:
            raise ValueError("Invalid value for `ifc_class`, must not be `None`")  # noqa: E501
        allowed_values = ["DATAINTERFACE", "LEGACY"]  # noqa: E501
        if ifc_class not in allowed_values:
            raise ValueError(
                "Invalid value for `ifc_class` ({0}), must be one of {1}"  # noqa: E501
                .format(ifc_class, allowed_values)
            )

        self._ifc_class = ifc_class

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

        Driver from which this data source is derived.  # noqa: E501

        :return: The ifc_driver_id of this DataSourceIfcInfo.  # noqa: E501
        :rtype: str
        """
        return self._ifc_driver_id

    @ifc_driver_id.setter
    def ifc_driver_id(self, ifc_driver_id):
        """Sets the ifc_driver_id of this DataSourceIfcInfo.

        Driver from which this data source is derived.  # noqa: E501

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

        self._ifc_driver_id = ifc_driver_id

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

        The docker img that includes the data source  # noqa: E501

        :return: The ifc_img of this DataSourceIfcInfo.  # noqa: E501
        :rtype: str
        """
        return self._ifc_img

    @ifc_img.setter
    def ifc_img(self, ifc_img):
        """Sets the ifc_img of this DataSourceIfcInfo.

        The docker img that includes the data source  # noqa: E501

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

        self._ifc_img = ifc_img

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

        Kind of data source IN, OUT, PIPE (bidirectional)  # noqa: E501

        :return: The ifc_kind of this DataSourceIfcInfo.  # noqa: E501
        :rtype: str
        """
        return self._ifc_kind

    @ifc_kind.setter
    def ifc_kind(self, ifc_kind):
        """Sets the ifc_kind of this DataSourceIfcInfo.

        Kind of data source IN, OUT, PIPE (bidirectional)  # noqa: E501

        :param ifc_kind: The ifc_kind of this DataSourceIfcInfo.  # noqa: E501
        :type: str
        """
        if ifc_kind is None:
            raise ValueError("Invalid value for `ifc_kind`, must not be `None`")  # noqa: E501
        allowed_values = ["IN", "OUT", "PIPE"]  # noqa: E501
        if ifc_kind not in allowed_values:
            raise ValueError(
                "Invalid value for `ifc_kind` ({0}), must be one of {1}"  # noqa: E501
                .format(ifc_kind, allowed_values)
            )

        self._ifc_kind = ifc_kind

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

        Any ports that will be opened and used by this datasource  # noqa: E501

        :return: The ifc_ports of this DataSourceIfcInfo.  # noqa: E501
        :rtype: list[DataSourceIfcPorts]
        """
        return self._ifc_ports

    @ifc_ports.setter
    def ifc_ports(self, ifc_ports):
        """Sets the ifc_ports of this DataSourceIfcInfo.

        Any ports that will be opened and used by this datasource  # noqa: E501

        :param ifc_ports: The ifc_ports of this DataSourceIfcInfo.  # noqa: E501
        :type: list[DataSourceIfcPorts]
        """

        self._ifc_ports = ifc_ports

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

        The project that contains this data source  # noqa: E501

        :return: The ifc_project_id of this DataSourceIfcInfo.  # noqa: E501
        :rtype: str
        """
        return self._ifc_project_id

    @ifc_project_id.setter
    def ifc_project_id(self, ifc_project_id):
        """Sets the ifc_project_id of this DataSourceIfcInfo.

        The project that contains this data source  # noqa: E501

        :param ifc_project_id: The ifc_project_id of this DataSourceIfcInfo.  # noqa: E501
        :type: str
        """

        self._ifc_project_id = ifc_project_id

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

        Primary protocol that this data source implements  # noqa: E501

        :return: The ifc_protocol of this DataSourceIfcInfo.  # noqa: E501
        :rtype: str
        """
        return self._ifc_protocol

    @ifc_protocol.setter
    def ifc_protocol(self, ifc_protocol):
        """Sets the ifc_protocol of this DataSourceIfcInfo.

        Primary protocol that this data source implements  # noqa: E501

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

        self._ifc_protocol = ifc_protocol

    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(DataSourceIfcInfo, 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, DataSourceIfcInfo):
            return False

        return self.__dict__ == other.__dict__

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