# coding: utf-8
try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from aoc.configuration import Configuration


class Vds(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'bond_mode': 'str',
        'cluster': 'NestedCluster',
        'entity_async_status': 'EntityAsyncStatus',
        'everoute_cluster': 'NestedEverouteCluster',
        'id': 'str',
        'internal': 'bool',
        'labels': 'list[NestedLabel]',
        'local_id': 'str',
        'name': 'str',
        'nics': 'list[NestedNic]',
        'ovsbr_name': 'str',
        'type': 'NetworkType',
        'vlans': 'list[NestedVlan]',
        'vlans_num': 'int',
        'work_mode': 'str'
    }

    attribute_map = {
        'bond_mode': 'bond_mode',
        'cluster': 'cluster',
        'entity_async_status': 'entityAsyncStatus',
        'everoute_cluster': 'everoute_cluster',
        'id': 'id',
        'internal': 'internal',
        'labels': 'labels',
        'local_id': 'local_id',
        'name': 'name',
        'nics': 'nics',
        'ovsbr_name': 'ovsbr_name',
        'type': 'type',
        'vlans': 'vlans',
        'vlans_num': 'vlans_num',
        'work_mode': 'work_mode'
    }

    def __init__(self, **kwargs):  # noqa: E501
        """Vds - a model defined in OpenAPI"""  # noqa: E501
        self.local_vars_configuration = kwargs.get("local_vars_configuration", Configuration.get_default_copy())

        self._bond_mode = None
        self._cluster = None
        self._entity_async_status = None
        self._everoute_cluster = None
        self._id = None
        self._internal = None
        self._labels = None
        self._local_id = None
        self._name = None
        self._nics = None
        self._ovsbr_name = None
        self._type = None
        self._vlans = None
        self._vlans_num = None
        self._work_mode = None
        self.discriminator = None

        if "bond_mode" in kwargs:
            self.bond_mode = kwargs["bond_mode"]
        if "cluster" in kwargs:
            self.cluster = kwargs["cluster"]
        self.entity_async_status = kwargs.get("entity_async_status", None)
        self.everoute_cluster = kwargs.get("everoute_cluster", None)
        if "id" in kwargs:
            self.id = kwargs["id"]
        if "internal" in kwargs:
            self.internal = kwargs["internal"]
        self.labels = kwargs.get("labels", None)
        if "local_id" in kwargs:
            self.local_id = kwargs["local_id"]
        if "name" in kwargs:
            self.name = kwargs["name"]
        self.nics = kwargs.get("nics", None)
        if "ovsbr_name" in kwargs:
            self.ovsbr_name = kwargs["ovsbr_name"]
        if "type" in kwargs:
            self.type = kwargs["type"]
        self.vlans = kwargs.get("vlans", None)
        if "vlans_num" in kwargs:
            self.vlans_num = kwargs["vlans_num"]
        self.work_mode = kwargs.get("work_mode", None)

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


        :return: The bond_mode of this Vds.  # noqa: E501
        :rtype: str
        """
        return self._bond_mode

    @bond_mode.setter
    def bond_mode(self, bond_mode):
        """Sets the bond_mode of this Vds.


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

        self._bond_mode = bond_mode

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


        :return: The cluster of this Vds.  # noqa: E501
        :rtype: NestedCluster
        """
        return self._cluster

    @cluster.setter
    def cluster(self, cluster):
        """Sets the cluster of this Vds.


        :param cluster: The cluster of this Vds.  # noqa: E501
        :type cluster: NestedCluster
        """
        if self.local_vars_configuration.client_side_validation and cluster is None:  # noqa: E501
            raise ValueError("Invalid value for `cluster`, must not be `None`")  # noqa: E501

        self._cluster = cluster

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


        :return: The entity_async_status of this Vds.  # noqa: E501
        :rtype: EntityAsyncStatus
        """
        return self._entity_async_status

    @entity_async_status.setter
    def entity_async_status(self, entity_async_status):
        """Sets the entity_async_status of this Vds.


        :param entity_async_status: The entity_async_status of this Vds.  # noqa: E501
        :type entity_async_status: EntityAsyncStatus
        """

        self._entity_async_status = entity_async_status

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


        :return: The everoute_cluster of this Vds.  # noqa: E501
        :rtype: NestedEverouteCluster
        """
        return self._everoute_cluster

    @everoute_cluster.setter
    def everoute_cluster(self, everoute_cluster):
        """Sets the everoute_cluster of this Vds.


        :param everoute_cluster: The everoute_cluster of this Vds.  # noqa: E501
        :type everoute_cluster: NestedEverouteCluster
        """

        self._everoute_cluster = everoute_cluster

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


        :return: The id of this Vds.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Vds.


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

        self._id = id

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


        :return: The internal of this Vds.  # noqa: E501
        :rtype: bool
        """
        return self._internal

    @internal.setter
    def internal(self, internal):
        """Sets the internal of this Vds.


        :param internal: The internal of this Vds.  # noqa: E501
        :type internal: bool
        """
        if self.local_vars_configuration.client_side_validation and internal is None:  # noqa: E501
            raise ValueError("Invalid value for `internal`, must not be `None`")  # noqa: E501

        self._internal = internal

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


        :return: The labels of this Vds.  # noqa: E501
        :rtype: list[NestedLabel]
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this Vds.


        :param labels: The labels of this Vds.  # noqa: E501
        :type labels: list[NestedLabel]
        """

        self._labels = labels

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


        :return: The local_id of this Vds.  # noqa: E501
        :rtype: str
        """
        return self._local_id

    @local_id.setter
    def local_id(self, local_id):
        """Sets the local_id of this Vds.


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

        self._local_id = local_id

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


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

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


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

        self._name = name

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


        :return: The nics of this Vds.  # noqa: E501
        :rtype: list[NestedNic]
        """
        return self._nics

    @nics.setter
    def nics(self, nics):
        """Sets the nics of this Vds.


        :param nics: The nics of this Vds.  # noqa: E501
        :type nics: list[NestedNic]
        """

        self._nics = nics

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


        :return: The ovsbr_name of this Vds.  # noqa: E501
        :rtype: str
        """
        return self._ovsbr_name

    @ovsbr_name.setter
    def ovsbr_name(self, ovsbr_name):
        """Sets the ovsbr_name of this Vds.


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

        self._ovsbr_name = ovsbr_name

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


        :return: The type of this Vds.  # noqa: E501
        :rtype: NetworkType
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Vds.


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

        self._type = type

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


        :return: The vlans of this Vds.  # noqa: E501
        :rtype: list[NestedVlan]
        """
        return self._vlans

    @vlans.setter
    def vlans(self, vlans):
        """Sets the vlans of this Vds.


        :param vlans: The vlans of this Vds.  # noqa: E501
        :type vlans: list[NestedVlan]
        """

        self._vlans = vlans

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


        :return: The vlans_num of this Vds.  # noqa: E501
        :rtype: int
        """
        return self._vlans_num

    @vlans_num.setter
    def vlans_num(self, vlans_num):
        """Sets the vlans_num of this Vds.


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

        self._vlans_num = vlans_num

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


        :return: The work_mode of this Vds.  # noqa: E501
        :rtype: str
        """
        return self._work_mode

    @work_mode.setter
    def work_mode(self, work_mode):
        """Sets the work_mode of this Vds.


        :param work_mode: The work_mode of this Vds.  # noqa: E501
        :type work_mode: str
        """

        self._work_mode = work_mode

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, Vds):
            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, Vds):
            return True

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