# coding: utf-8

"""
    Healthbot APIs

    API interface for Healthbot application  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: healthbot-hackers@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from jnpr.healthbot.swagger.models.device_schema_i_agent import DeviceSchemaIAgent  # noqa: F401,E501
from jnpr.healthbot.swagger.models.device_schema_openconfig import DeviceSchemaOpenconfig  # noqa: F401,E501
from jnpr.healthbot.swagger.models.device_schema_snmp import DeviceSchemaSnmp  # noqa: F401,E501
from jnpr.healthbot.swagger.models.device_schema_variable import DeviceSchemaVariable  # noqa: F401,E501
from jnpr.healthbot.swagger.models.device_schema_vendor import DeviceSchemaVendor  # noqa: F401,E501
from jnpr.healthbot.swagger.models.devicegroup_schema_authentication import DevicegroupSchemaAuthentication  # noqa: F401,E501


class DeviceSchema(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 = {
        'authentication': 'DevicegroupSchemaAuthentication',
        'description': 'str',
        'device_id': 'str',
        'host': 'str',
        'i_agent': 'DeviceSchemaIAgent',
        'open_config': 'DeviceSchemaOpenconfig',
        'snmp': 'DeviceSchemaSnmp',
        'system_id': 'str',
        'variable': 'list[DeviceSchemaVariable]',
        'vendor': 'DeviceSchemaVendor'
    }

    attribute_map = {
        'authentication': 'authentication',
        'description': 'description',
        'device_id': 'device-id',
        'host': 'host',
        'i_agent': 'iAgent',
        'open_config': 'open-config',
        'snmp': 'snmp',
        'system_id': 'system-id',
        'variable': 'variable',
        'vendor': 'vendor'
    }

    def __init__(self, authentication=None, description=None, device_id=None, host=None, i_agent=None, open_config=None, snmp=None, system_id=None, variable=None, vendor=None):  # noqa: E501
        """DeviceSchema - a model defined in Swagger"""  # noqa: E501

        self._authentication = None
        self._description = None
        self._device_id = None
        self._host = None
        self._i_agent = None
        self._open_config = None
        self._snmp = None
        self._system_id = None
        self._variable = None
        self._vendor = None
        self.discriminator = None

        if authentication is not None:
            self.authentication = authentication
        if description is not None:
            self.description = description
        self.device_id = device_id
        self.host = host
        if i_agent is not None:
            self.i_agent = i_agent
        if open_config is not None:
            self.open_config = open_config
        if snmp is not None:
            self.snmp = snmp
        if system_id is not None:
            self.system_id = system_id
        if variable is not None:
            self.variable = variable
        if vendor is not None:
            self.vendor = vendor

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


        :return: The authentication of this DeviceSchema.  # noqa: E501
        :rtype: DevicegroupSchemaAuthentication
        """
        return self._authentication

    @authentication.setter
    def authentication(self, authentication):
        """Sets the authentication of this DeviceSchema.


        :param authentication: The authentication of this DeviceSchema.  # noqa: E501
        :type: DevicegroupSchemaAuthentication
        """

        self._authentication = authentication

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

        Description about the device  # noqa: E501

        :return: The description of this DeviceSchema.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this DeviceSchema.

        Description about the device  # noqa: E501

        :param description: The description of this DeviceSchema.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Identifier for the device. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

        :return: The device_id of this DeviceSchema.  # noqa: E501
        :rtype: str
        """
        return self._device_id

    @device_id.setter
    def device_id(self, device_id):
        """Sets the device_id of this DeviceSchema.

        Identifier for the device. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

        :param device_id: The device_id of this DeviceSchema.  # noqa: E501
        :type: str
        """
        if device_id is None:
            raise ValueError("Invalid value for `device_id`, must not be `None`")  # noqa: E501
        if device_id is not None and len(device_id) > 64:
            raise ValueError("Invalid value for `device_id`, length must be less than or equal to `64`")  # noqa: E501
        if device_id is not None and not re.search('^[a-zA-Z0-9]([a-zA-Z0-9_-]*\\.*)*$', device_id):  # noqa: E501
            raise ValueError("Invalid value for `device_id`, must be a follow pattern or equal to `/^[a-zA-Z0-9]([a-zA-Z0-9_-]*\\.*)*$/`")  # noqa: E501

        self._device_id = device_id

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

        Name or IP the device  # noqa: E501

        :return: The host of this DeviceSchema.  # noqa: E501
        :rtype: str
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this DeviceSchema.

        Name or IP the device  # noqa: E501

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

        self._host = host

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


        :return: The i_agent of this DeviceSchema.  # noqa: E501
        :rtype: DeviceSchemaIAgent
        """
        return self._i_agent

    @i_agent.setter
    def i_agent(self, i_agent):
        """Sets the i_agent of this DeviceSchema.


        :param i_agent: The i_agent of this DeviceSchema.  # noqa: E501
        :type: DeviceSchemaIAgent
        """

        self._i_agent = i_agent

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


        :return: The open_config of this DeviceSchema.  # noqa: E501
        :rtype: DeviceSchemaOpenconfig
        """
        return self._open_config

    @open_config.setter
    def open_config(self, open_config):
        """Sets the open_config of this DeviceSchema.


        :param open_config: The open_config of this DeviceSchema.  # noqa: E501
        :type: DeviceSchemaOpenconfig
        """

        self._open_config = open_config

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


        :return: The snmp of this DeviceSchema.  # noqa: E501
        :rtype: DeviceSchemaSnmp
        """
        return self._snmp

    @snmp.setter
    def snmp(self, snmp):
        """Sets the snmp of this DeviceSchema.


        :param snmp: The snmp of this DeviceSchema.  # noqa: E501
        :type: DeviceSchemaSnmp
        """

        self._snmp = snmp

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

        ID which is sent in the JTI UDP messages  # noqa: E501

        :return: The system_id of this DeviceSchema.  # noqa: E501
        :rtype: str
        """
        return self._system_id

    @system_id.setter
    def system_id(self, system_id):
        """Sets the system_id of this DeviceSchema.

        ID which is sent in the JTI UDP messages  # noqa: E501

        :param system_id: The system_id of this DeviceSchema.  # noqa: E501
        :type: str
        """

        self._system_id = system_id

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

        Playbook variable configuration  # noqa: E501

        :return: The variable of this DeviceSchema.  # noqa: E501
        :rtype: list[DeviceSchemaVariable]
        """
        return self._variable

    @variable.setter
    def variable(self, variable):
        """Sets the variable of this DeviceSchema.

        Playbook variable configuration  # noqa: E501

        :param variable: The variable of this DeviceSchema.  # noqa: E501
        :type: list[DeviceSchemaVariable]
        """

        self._variable = variable

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


        :return: The vendor of this DeviceSchema.  # noqa: E501
        :rtype: DeviceSchemaVendor
        """
        return self._vendor

    @vendor.setter
    def vendor(self, vendor):
        """Sets the vendor of this DeviceSchema.


        :param vendor: The vendor of this DeviceSchema.  # noqa: E501
        :type: DeviceSchemaVendor
        """

        self._vendor = vendor

    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

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

        return self.__dict__ == other.__dict__

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