# 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.category_info import CategoryInfo  # noqa: F401,E501
from kps_api.models.node_role import NodeRole  # noqa: F401,E501


class EdgeV2(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 = {
        'connected': 'bool',
        'description': 'str',
        'edge_devices': 'float',
        'gateway': 'str',
        'id': 'str',
        'ip_address': 'str',
        'labels': 'list[CategoryInfo]',
        'name': 'str',
        'role': 'NodeRole',
        'serial_number': 'str',
        'short_id': 'str',
        'subnet': 'str',
        'type': 'str'
    }

    attribute_map = {
        'connected': 'connected',
        'description': 'description',
        'edge_devices': 'edgeDevices',
        'gateway': 'gateway',
        'id': 'id',
        'ip_address': 'ipAddress',
        'labels': 'labels',
        'name': 'name',
        'role': 'role',
        'serial_number': 'serialNumber',
        'short_id': 'shortId',
        'subnet': 'subnet',
        'type': 'type'
    }

    def __init__(self, connected=None, description=None, edge_devices=None, gateway=None, id=None, ip_address=None, labels=None, name=None, role=None, serial_number=None, short_id=None, subnet=None, type=None):  # noqa: E501
        """EdgeV2 - a model defined in Swagger"""  # noqa: E501
        self._connected = None
        self._description = None
        self._edge_devices = None
        self._gateway = None
        self._id = None
        self._ip_address = None
        self._labels = None
        self._name = None
        self._role = None
        self._serial_number = None
        self._short_id = None
        self._subnet = None
        self._type = None
        self.discriminator = None
        if connected is not None:
            self.connected = connected
        if description is not None:
            self.description = description
        self.edge_devices = edge_devices
        self.gateway = gateway
        if id is not None:
            self.id = id
        self.ip_address = ip_address
        if labels is not None:
            self.labels = labels
        self.name = name
        if role is not None:
            self.role = role
        self.serial_number = serial_number
        if short_id is not None:
            self.short_id = short_id
        self.subnet = subnet
        if type is not None:
            self.type = type

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

        Determines if the edge is currently connected to XI IoT management services.  # noqa: E501

        :return: The connected of this EdgeV2.  # noqa: E501
        :rtype: bool
        """
        return self._connected

    @connected.setter
    def connected(self, connected):
        """Sets the connected of this EdgeV2.

        Determines if the edge is currently connected to XI IoT management services.  # noqa: E501

        :param connected: The connected of this EdgeV2.  # noqa: E501
        :type: bool
        """

        self._connected = connected

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

        Edge description  # noqa: E501

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

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

        Edge description  # noqa: E501

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

        self._description = description

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

        Number of devices (nodes) in this edge  # noqa: E501

        :return: The edge_devices of this EdgeV2.  # noqa: E501
        :rtype: float
        """
        return self._edge_devices

    @edge_devices.setter
    def edge_devices(self, edge_devices):
        """Sets the edge_devices of this EdgeV2.

        Number of devices (nodes) in this edge  # noqa: E501

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

        self._edge_devices = edge_devices

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

        Edge Gateway IP address  # noqa: E501

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

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

        Edge Gateway IP address  # noqa: E501

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

        self._gateway = gateway

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

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

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

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

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

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

        self._id = id

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

        Edge IP Address  # noqa: E501

        :return: The ip_address of this EdgeV2.  # noqa: E501
        :rtype: str
        """
        return self._ip_address

    @ip_address.setter
    def ip_address(self, ip_address):
        """Sets the ip_address of this EdgeV2.

        Edge IP Address  # noqa: E501

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

        self._ip_address = ip_address

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

        A list of Category labels for this edge.  # noqa: E501

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

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

        A list of Category labels for this edge.  # noqa: E501

        :param labels: The labels of this EdgeV2.  # noqa: E501
        :type: list[CategoryInfo]
        """

        self._labels = labels

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

        Edge name. Maximum length edge name is determined by kubernetes. Name length limited to 60 as node name is the edge name plus a suffix. https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go  # noqa: E501

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

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

        Edge name. Maximum length edge name is determined by kubernetes. Name length limited to 60 as node name is the edge name plus a suffix. https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go  # noqa: E501

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

        self._name = name

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


        :return: The role of this EdgeV2.  # noqa: E501
        :rtype: NodeRole
        """
        return self._role

    @role.setter
    def role(self, role):
        """Sets the role of this EdgeV2.


        :param role: The role of this EdgeV2.  # noqa: E501
        :type: NodeRole
        """

        self._role = role

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

        Edge serial number  # noqa: E501

        :return: The serial_number of this EdgeV2.  # noqa: E501
        :rtype: str
        """
        return self._serial_number

    @serial_number.setter
    def serial_number(self, serial_number):
        """Sets the serial_number of this EdgeV2.

        Edge serial number  # noqa: E501

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

        self._serial_number = serial_number

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

        ShortID is the unique ID for the given edge. This ID must be unique for each edge, for the given tenant.  # noqa: E501

        :return: The short_id of this EdgeV2.  # noqa: E501
        :rtype: str
        """
        return self._short_id

    @short_id.setter
    def short_id(self, short_id):
        """Sets the short_id of this EdgeV2.

        ShortID is the unique ID for the given edge. This ID must be unique for each edge, for the given tenant.  # noqa: E501

        :param short_id: The short_id of this EdgeV2.  # noqa: E501
        :type: str
        """

        self._short_id = short_id

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

        Edge subnet mask  # noqa: E501

        :return: The subnet of this EdgeV2.  # noqa: E501
        :rtype: str
        """
        return self._subnet

    @subnet.setter
    def subnet(self, subnet):
        """Sets the subnet of this EdgeV2.

        Edge subnet mask  # noqa: E501

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

        self._subnet = subnet

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

        Type of edge.  # noqa: E501

        :return: The type of this EdgeV2.  # noqa: E501
        :rtype: str
        """
        return self._type

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

        Type of edge.  # noqa: E501

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

        self._type = type

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

        return self.__dict__ == other.__dict__

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