# coding: utf-8

"""
    Seido User REST API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 2.4.8
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class NetworkSubnetSmallModel(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 = {
        'uuid': 'str',
        'subnet': 'str',
        'is_full': 'bool',
        'used': 'int',
        'usage': 'float'
    }

    attribute_map = {
        'uuid': 'uuid',
        'subnet': 'subnet',
        'is_full': 'is_full',
        'used': 'used',
        'usage': 'usage'
    }

    def __init__(self, uuid=None, subnet=None, is_full=None, used=None, usage=None):  # noqa: E501
        """NetworkSubnetSmallModel - a model defined in OpenAPI"""  # noqa: E501

        self._uuid = None
        self._subnet = None
        self._is_full = None
        self._used = None
        self._usage = None
        self.discriminator = None

        if uuid is not None:
            self.uuid = uuid
        if subnet is not None:
            self.subnet = subnet
        self.is_full = is_full
        if used is not None:
            self.used = used
        if usage is not None:
            self.usage = usage

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


        :return: The uuid of this NetworkSubnetSmallModel.  # noqa: E501
        :rtype: str
        """
        return self._uuid

    @uuid.setter
    def uuid(self, uuid):
        """Sets the uuid of this NetworkSubnetSmallModel.


        :param uuid: The uuid of this NetworkSubnetSmallModel.  # noqa: E501
        :type: str
        """
        if uuid is not None and len(uuid) > 36:
            raise ValueError("Invalid value for `uuid`, length must be less than or equal to `36`")  # noqa: E501
        if uuid is not None and len(uuid) < 36:
            raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `36`")  # noqa: E501

        self._uuid = uuid

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


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

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


        :param subnet: The subnet of this NetworkSubnetSmallModel.  # noqa: E501
        :type: str
        """
        if subnet is not None and len(subnet) > 43:
            raise ValueError("Invalid value for `subnet`, length must be less than or equal to `43`")  # noqa: E501
        if subnet is not None and len(subnet) < 8:
            raise ValueError("Invalid value for `subnet`, length must be greater than or equal to `8`")  # noqa: E501

        self._subnet = subnet

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


        :return: The is_full of this NetworkSubnetSmallModel.  # noqa: E501
        :rtype: bool
        """
        return self._is_full

    @is_full.setter
    def is_full(self, is_full):
        """Sets the is_full of this NetworkSubnetSmallModel.


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

        self._is_full = is_full

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


        :return: The used of this NetworkSubnetSmallModel.  # noqa: E501
        :rtype: int
        """
        return self._used

    @used.setter
    def used(self, used):
        """Sets the used of this NetworkSubnetSmallModel.


        :param used: The used of this NetworkSubnetSmallModel.  # noqa: E501
        :type: int
        """

        self._used = used

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


        :return: The usage of this NetworkSubnetSmallModel.  # noqa: E501
        :rtype: float
        """
        return self._usage

    @usage.setter
    def usage(self, usage):
        """Sets the usage of this NetworkSubnetSmallModel.


        :param usage: The usage of this NetworkSubnetSmallModel.  # noqa: E501
        :type: float
        """

        self._usage = usage

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

        for attr, _ in six.iteritems(self.openapi_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, NetworkSubnetSmallModel):
            return False

        return self.__dict__ == other.__dict__

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