# coding: utf-8

"""
    Pure1 Public REST API

    Pure1 Public REST API, developed by [Pure Storage, Inc.](http://www.purestorage.com/)  [Knowledge base reference documentation](https://support.purestorage.com/Pure1/Pure1_Manage/Pure1_Manage_-_REST_API/Pure1_Manage_-_REST_API__Reference)  # noqa: E501

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from pypureclient.pure1.models.arrays_built_in import ArraysBuiltIn  # noqa: F401,E501
from pypureclient.pure1.models.fixed_reference import FixedReference  # noqa: F401,E501


class NetworkInterface(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 = {
        'as_of': 'int',
        'id': 'str',
        'name': 'str',
        'arrays': 'list[FixedReference]',
        'address': 'str',
        'enabled': 'bool',
        'gateway': 'str',
        'hwaddr': 'str',
        'mtu': 'int',
        'netmask': 'str',
        'services': 'list[str]',
        'speed': 'int',
        'subinterfaces': 'list[str]'
    }

    attribute_map = {
        'as_of': '_as_of',
        'id': 'id',
        'name': 'name',
        'arrays': 'arrays',
        'address': 'address',
        'enabled': 'enabled',
        'gateway': 'gateway',
        'hwaddr': 'hwaddr',
        'mtu': 'mtu',
        'netmask': 'netmask',
        'services': 'services',
        'speed': 'speed',
        'subinterfaces': 'subinterfaces'
    }

    def __init__(self, as_of=None, id=None, name=None, arrays=None, address=None, enabled=None, gateway=None, hwaddr=None, mtu=None, netmask=None, services=None, speed=None, subinterfaces=None):  # noqa: E501
        """NetworkInterface - a model defined in Swagger"""  # noqa: E501

        self._as_of = None
        self._id = None
        self._name = None
        self._arrays = None
        self._address = None
        self._enabled = None
        self._gateway = None
        self._hwaddr = None
        self._mtu = None
        self._netmask = None
        self._services = None
        self._speed = None
        self._subinterfaces = None
        self.discriminator = None

        self.as_of = as_of
        self.id = id
        self.name = name
        self.arrays = arrays
        self.address = address
        self.enabled = enabled
        self.gateway = gateway
        self.hwaddr = hwaddr
        self.mtu = mtu
        self.netmask = netmask
        self.services = services
        self.speed = speed
        self.subinterfaces = subinterfaces

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

        The freshness of the data (timestamp in millis since epoch)  # noqa: E501

        :return: The as_of of this NetworkInterface.  # noqa: E501
        :rtype: int
        """
        return self._as_of

    @as_of.setter
    def as_of(self, as_of):
        """Sets the as_of of this NetworkInterface.

        The freshness of the data (timestamp in millis since epoch)  # noqa: E501

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

        self._as_of = as_of

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

        A non-modifiable, globally unique ID chosen by the system.  # noqa: E501

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

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

        A non-modifiable, globally unique ID chosen by the system.  # noqa: E501

        :param id: The id of this NetworkInterface.  # noqa: E501
        :type: str
        """

        self._id = id

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

        A non-modifiable, locally unique name chosen by the system.  # noqa: E501

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

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

        A non-modifiable, locally unique name chosen by the system.  # noqa: E501

        :param name: The name of this NetworkInterface.  # noqa: E501
        :type: str
        """

        self._name = name

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

        The list of arrays where this resource exists. Many resources are on a single array, but some resources - for example pods - can be stretched across multiple arrays.  # noqa: E501

        :return: The arrays of this NetworkInterface.  # noqa: E501
        :rtype: list[FixedReference]
        """
        return self._arrays

    @arrays.setter
    def arrays(self, arrays):
        """Sets the arrays of this NetworkInterface.

        The list of arrays where this resource exists. Many resources are on a single array, but some resources - for example pods - can be stretched across multiple arrays.  # noqa: E501

        :param arrays: The arrays of this NetworkInterface.  # noqa: E501
        :type: list[FixedReference]
        """

        self._arrays = arrays

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

        IP address of this network interface  # noqa: E501

        :return: The address of this NetworkInterface.  # noqa: E501
        :rtype: str
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this NetworkInterface.

        IP address of this network interface  # noqa: E501

        :param address: The address of this NetworkInterface.  # noqa: E501
        :type: str
        """

        self._address = address

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


        :return: The enabled of this NetworkInterface.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this NetworkInterface.


        :param enabled: The enabled of this NetworkInterface.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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


        :return: The gateway of this NetworkInterface.  # noqa: E501
        :rtype: str
        """
        return self._gateway

    @gateway.setter
    def gateway(self, gateway):
        """Sets the gateway of this NetworkInterface.


        :param gateway: The gateway of this NetworkInterface.  # noqa: E501
        :type: str
        """

        self._gateway = gateway

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

        Hardware address  # noqa: E501

        :return: The hwaddr of this NetworkInterface.  # noqa: E501
        :rtype: str
        """
        return self._hwaddr

    @hwaddr.setter
    def hwaddr(self, hwaddr):
        """Sets the hwaddr of this NetworkInterface.

        Hardware address  # noqa: E501

        :param hwaddr: The hwaddr of this NetworkInterface.  # noqa: E501
        :type: str
        """

        self._hwaddr = hwaddr

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

        Maximum transmission unit  # noqa: E501

        :return: The mtu of this NetworkInterface.  # noqa: E501
        :rtype: int
        """
        return self._mtu

    @mtu.setter
    def mtu(self, mtu):
        """Sets the mtu of this NetworkInterface.

        Maximum transmission unit  # noqa: E501

        :param mtu: The mtu of this NetworkInterface.  # noqa: E501
        :type: int
        """

        self._mtu = mtu

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


        :return: The netmask of this NetworkInterface.  # noqa: E501
        :rtype: str
        """
        return self._netmask

    @netmask.setter
    def netmask(self, netmask):
        """Sets the netmask of this NetworkInterface.


        :param netmask: The netmask of this NetworkInterface.  # noqa: E501
        :type: str
        """

        self._netmask = netmask

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

        services and protocols that are enabled on the interface  # noqa: E501

        :return: The services of this NetworkInterface.  # noqa: E501
        :rtype: list[str]
        """
        return self._services

    @services.setter
    def services(self, services):
        """Sets the services of this NetworkInterface.

        services and protocols that are enabled on the interface  # noqa: E501

        :param services: The services of this NetworkInterface.  # noqa: E501
        :type: list[str]
        """

        self._services = services

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

        Speed in bytes per second  # noqa: E501

        :return: The speed of this NetworkInterface.  # noqa: E501
        :rtype: int
        """
        return self._speed

    @speed.setter
    def speed(self, speed):
        """Sets the speed of this NetworkInterface.

        Speed in bytes per second  # noqa: E501

        :param speed: The speed of this NetworkInterface.  # noqa: E501
        :type: int
        """

        self._speed = speed

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


        :return: The subinterfaces of this NetworkInterface.  # noqa: E501
        :rtype: list[str]
        """
        return self._subinterfaces

    @subinterfaces.setter
    def subinterfaces(self, subinterfaces):
        """Sets the subinterfaces of this NetworkInterface.


        :param subinterfaces: The subinterfaces of this NetworkInterface.  # noqa: E501
        :type: list[str]
        """

        self._subinterfaces = subinterfaces

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

        return self.__dict__ == other.__dict__

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