# 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 Vlan(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 = {
        'entity_async_status': 'EntityAsyncStatus',
        'gateway_ip': 'str',
        'gateway_subnetmask': 'str',
        'id': 'str',
        'labels': 'list[NestedLabel]',
        'local_id': 'str',
        'mode_type': 'VlanModeType',
        'name': 'str',
        'network_ids': 'list[str]',
        'qos_burst': 'float',
        'qos_max_bandwidth': 'float',
        'qos_min_bandwidth': 'float',
        'qos_priority': 'int',
        'subnetmask': 'str',
        'type': 'NetworkType',
        'vds': 'NestedVds',
        'vlan_id': 'int',
        'vm_nics': 'list[NestedVmNic]'
    }

    attribute_map = {
        'entity_async_status': 'entityAsyncStatus',
        'gateway_ip': 'gateway_ip',
        'gateway_subnetmask': 'gateway_subnetmask',
        'id': 'id',
        'labels': 'labels',
        'local_id': 'local_id',
        'mode_type': 'mode_type',
        'name': 'name',
        'network_ids': 'network_ids',
        'qos_burst': 'qos_burst',
        'qos_max_bandwidth': 'qos_max_bandwidth',
        'qos_min_bandwidth': 'qos_min_bandwidth',
        'qos_priority': 'qos_priority',
        'subnetmask': 'subnetmask',
        'type': 'type',
        'vds': 'vds',
        'vlan_id': 'vlan_id',
        'vm_nics': 'vm_nics'
    }

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

        self._entity_async_status = None
        self._gateway_ip = None
        self._gateway_subnetmask = None
        self._id = None
        self._labels = None
        self._local_id = None
        self._mode_type = None
        self._name = None
        self._network_ids = None
        self._qos_burst = None
        self._qos_max_bandwidth = None
        self._qos_min_bandwidth = None
        self._qos_priority = None
        self._subnetmask = None
        self._type = None
        self._vds = None
        self._vlan_id = None
        self._vm_nics = None
        self.discriminator = None

        self.entity_async_status = kwargs.get("entity_async_status", None)
        self.gateway_ip = kwargs.get("gateway_ip", None)
        self.gateway_subnetmask = kwargs.get("gateway_subnetmask", None)
        if "id" in kwargs:
            self.id = kwargs["id"]
        self.labels = kwargs.get("labels", None)
        if "local_id" in kwargs:
            self.local_id = kwargs["local_id"]
        self.mode_type = kwargs.get("mode_type", None)
        if "name" in kwargs:
            self.name = kwargs["name"]
        if "network_ids" in kwargs:
            self.network_ids = kwargs["network_ids"]
        self.qos_burst = kwargs.get("qos_burst", None)
        self.qos_max_bandwidth = kwargs.get("qos_max_bandwidth", None)
        self.qos_min_bandwidth = kwargs.get("qos_min_bandwidth", None)
        self.qos_priority = kwargs.get("qos_priority", None)
        self.subnetmask = kwargs.get("subnetmask", None)
        if "type" in kwargs:
            self.type = kwargs["type"]
        if "vds" in kwargs:
            self.vds = kwargs["vds"]
        if "vlan_id" in kwargs:
            self.vlan_id = kwargs["vlan_id"]
        self.vm_nics = kwargs.get("vm_nics", None)

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


        :return: The entity_async_status of this Vlan.  # 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 Vlan.


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

        self._entity_async_status = entity_async_status

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


        :return: The gateway_ip of this Vlan.  # noqa: E501
        :rtype: str
        """
        return self._gateway_ip

    @gateway_ip.setter
    def gateway_ip(self, gateway_ip):
        """Sets the gateway_ip of this Vlan.


        :param gateway_ip: The gateway_ip of this Vlan.  # noqa: E501
        :type gateway_ip: str
        """

        self._gateway_ip = gateway_ip

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


        :return: The gateway_subnetmask of this Vlan.  # noqa: E501
        :rtype: str
        """
        return self._gateway_subnetmask

    @gateway_subnetmask.setter
    def gateway_subnetmask(self, gateway_subnetmask):
        """Sets the gateway_subnetmask of this Vlan.


        :param gateway_subnetmask: The gateway_subnetmask of this Vlan.  # noqa: E501
        :type gateway_subnetmask: str
        """

        self._gateway_subnetmask = gateway_subnetmask

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


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

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


        :param id: The id of this Vlan.  # 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 labels(self):
        """Gets the labels of this Vlan.  # noqa: E501


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

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


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

        self._labels = labels

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


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

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


        :param local_id: The local_id of this Vlan.  # 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 mode_type(self):
        """Gets the mode_type of this Vlan.  # noqa: E501


        :return: The mode_type of this Vlan.  # noqa: E501
        :rtype: VlanModeType
        """
        return self._mode_type

    @mode_type.setter
    def mode_type(self, mode_type):
        """Sets the mode_type of this Vlan.


        :param mode_type: The mode_type of this Vlan.  # noqa: E501
        :type mode_type: VlanModeType
        """

        self._mode_type = mode_type

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


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

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


        :param name: The name of this Vlan.  # 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 network_ids(self):
        """Gets the network_ids of this Vlan.  # noqa: E501


        :return: The network_ids of this Vlan.  # noqa: E501
        :rtype: list[str]
        """
        return self._network_ids

    @network_ids.setter
    def network_ids(self, network_ids):
        """Sets the network_ids of this Vlan.


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

        self._network_ids = network_ids

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


        :return: The qos_burst of this Vlan.  # noqa: E501
        :rtype: float
        """
        return self._qos_burst

    @qos_burst.setter
    def qos_burst(self, qos_burst):
        """Sets the qos_burst of this Vlan.


        :param qos_burst: The qos_burst of this Vlan.  # noqa: E501
        :type qos_burst: float
        """

        self._qos_burst = qos_burst

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


        :return: The qos_max_bandwidth of this Vlan.  # noqa: E501
        :rtype: float
        """
        return self._qos_max_bandwidth

    @qos_max_bandwidth.setter
    def qos_max_bandwidth(self, qos_max_bandwidth):
        """Sets the qos_max_bandwidth of this Vlan.


        :param qos_max_bandwidth: The qos_max_bandwidth of this Vlan.  # noqa: E501
        :type qos_max_bandwidth: float
        """

        self._qos_max_bandwidth = qos_max_bandwidth

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


        :return: The qos_min_bandwidth of this Vlan.  # noqa: E501
        :rtype: float
        """
        return self._qos_min_bandwidth

    @qos_min_bandwidth.setter
    def qos_min_bandwidth(self, qos_min_bandwidth):
        """Sets the qos_min_bandwidth of this Vlan.


        :param qos_min_bandwidth: The qos_min_bandwidth of this Vlan.  # noqa: E501
        :type qos_min_bandwidth: float
        """

        self._qos_min_bandwidth = qos_min_bandwidth

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


        :return: The qos_priority of this Vlan.  # noqa: E501
        :rtype: int
        """
        return self._qos_priority

    @qos_priority.setter
    def qos_priority(self, qos_priority):
        """Sets the qos_priority of this Vlan.


        :param qos_priority: The qos_priority of this Vlan.  # noqa: E501
        :type qos_priority: int
        """

        self._qos_priority = qos_priority

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


        :return: The subnetmask of this Vlan.  # noqa: E501
        :rtype: str
        """
        return self._subnetmask

    @subnetmask.setter
    def subnetmask(self, subnetmask):
        """Sets the subnetmask of this Vlan.


        :param subnetmask: The subnetmask of this Vlan.  # noqa: E501
        :type subnetmask: str
        """

        self._subnetmask = subnetmask

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


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

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


        :param type: The type of this Vlan.  # 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 vds(self):
        """Gets the vds of this Vlan.  # noqa: E501


        :return: The vds of this Vlan.  # noqa: E501
        :rtype: NestedVds
        """
        return self._vds

    @vds.setter
    def vds(self, vds):
        """Sets the vds of this Vlan.


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

        self._vds = vds

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


        :return: The vlan_id of this Vlan.  # noqa: E501
        :rtype: int
        """
        return self._vlan_id

    @vlan_id.setter
    def vlan_id(self, vlan_id):
        """Sets the vlan_id of this Vlan.


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

        self._vlan_id = vlan_id

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


        :return: The vm_nics of this Vlan.  # noqa: E501
        :rtype: list[NestedVmNic]
        """
        return self._vm_nics

    @vm_nics.setter
    def vm_nics(self, vm_nics):
        """Sets the vm_nics of this Vlan.


        :param vm_nics: The vm_nics of this Vlan.  # noqa: E501
        :type vm_nics: list[NestedVmNic]
        """

        self._vm_nics = vm_nics

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

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