# 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 SubnetModel(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',
        'created': 'int',
        'updated': 'int',
        'owner_id': 'int',
        'location_uuid': 'str',
        'resource_uuid': 'str',
        'is_visible': 'bool',
        'is_full': 'bool',
        'is_master_shared': 'bool',
        'is_broken': 'bool',
        'master_uuid': 'str',
        'network_uuid': 'str',
        'subnet': 'str',
        'master': 'str',
        'network': 'int',
        'broadcast': 'str',
        'vrrp': 'str',
        'version': 'int',
        'prefixlen': 'int',
        'netmask': 'str',
        'gateway': 'str',
        'used': 'int',
        'usage': 'float',
        'free': 'int',
        'is_processing': 'bool'
    }

    attribute_map = {
        'uuid': 'uuid',
        'created': 'created',
        'updated': 'updated',
        'owner_id': 'owner_id',
        'location_uuid': 'location_uuid',
        'resource_uuid': 'resource_uuid',
        'is_visible': 'is_visible',
        'is_full': 'is_full',
        'is_master_shared': 'is_master_shared',
        'is_broken': 'is_broken',
        'master_uuid': 'master_uuid',
        'network_uuid': 'network_uuid',
        'subnet': 'subnet',
        'master': 'master',
        'network': 'network',
        'broadcast': 'broadcast',
        'vrrp': 'vrrp',
        'version': 'version',
        'prefixlen': 'prefixlen',
        'netmask': 'netmask',
        'gateway': 'gateway',
        'used': 'used',
        'usage': 'usage',
        'free': 'free',
        'is_processing': 'is_processing'
    }

    def __init__(self, uuid=None, created=None, updated=None, owner_id=None, location_uuid=None, resource_uuid=None, is_visible=None, is_full=None, is_master_shared=None, is_broken=None, master_uuid=None, network_uuid=None, subnet=None, master=None, network=None, broadcast=None, vrrp=None, version=None, prefixlen=None, netmask=None, gateway=None, used=None, usage=None, free=None, is_processing=None):  # noqa: E501
        """SubnetModel - a model defined in OpenAPI"""  # noqa: E501

        self._uuid = None
        self._created = None
        self._updated = None
        self._owner_id = None
        self._location_uuid = None
        self._resource_uuid = None
        self._is_visible = None
        self._is_full = None
        self._is_master_shared = None
        self._is_broken = None
        self._master_uuid = None
        self._network_uuid = None
        self._subnet = None
        self._master = None
        self._network = None
        self._broadcast = None
        self._vrrp = None
        self._version = None
        self._prefixlen = None
        self._netmask = None
        self._gateway = None
        self._used = None
        self._usage = None
        self._free = None
        self._is_processing = None
        self.discriminator = None

        self.uuid = uuid
        self.created = created
        self.updated = updated
        self.owner_id = owner_id
        self.location_uuid = location_uuid
        self.resource_uuid = resource_uuid
        self.is_visible = is_visible
        self.is_full = is_full
        self.is_master_shared = is_master_shared
        self.is_broken = is_broken
        self.master_uuid = master_uuid
        self.network_uuid = network_uuid
        self.subnet = subnet
        if master is not None:
            self.master = master
        if network is not None:
            self.network = network
        if broadcast is not None:
            self.broadcast = broadcast
        if vrrp is not None:
            self.vrrp = vrrp
        self.version = version
        self.prefixlen = prefixlen
        if netmask is not None:
            self.netmask = netmask
        if gateway is not None:
            self.gateway = gateway
        if used is not None:
            self.used = used
        if usage is not None:
            self.usage = usage
        if free is not None:
            self.free = free
        self.is_processing = is_processing

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


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

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


        :param uuid: The uuid of this SubnetModel.  # noqa: E501
        :type: str
        """
        if uuid is None:
            raise ValueError("Invalid value for `uuid`, must not be `None`")  # noqa: E501
        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 created(self):
        """Gets the created of this SubnetModel.  # noqa: E501


        :return: The created of this SubnetModel.  # noqa: E501
        :rtype: int
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this SubnetModel.


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

        self._created = created

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


        :return: The updated of this SubnetModel.  # noqa: E501
        :rtype: int
        """
        return self._updated

    @updated.setter
    def updated(self, updated):
        """Sets the updated of this SubnetModel.


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

        self._updated = updated

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

        Owner id  # noqa: E501

        :return: The owner_id of this SubnetModel.  # noqa: E501
        :rtype: int
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this SubnetModel.

        Owner id  # noqa: E501

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

        self._owner_id = owner_id

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


        :return: The location_uuid of this SubnetModel.  # noqa: E501
        :rtype: str
        """
        return self._location_uuid

    @location_uuid.setter
    def location_uuid(self, location_uuid):
        """Sets the location_uuid of this SubnetModel.


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

        self._location_uuid = location_uuid

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


        :return: The resource_uuid of this SubnetModel.  # noqa: E501
        :rtype: str
        """
        return self._resource_uuid

    @resource_uuid.setter
    def resource_uuid(self, resource_uuid):
        """Sets the resource_uuid of this SubnetModel.


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

        self._resource_uuid = resource_uuid

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


        :return: The is_visible of this SubnetModel.  # noqa: E501
        :rtype: bool
        """
        return self._is_visible

    @is_visible.setter
    def is_visible(self, is_visible):
        """Sets the is_visible of this SubnetModel.


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

        self._is_visible = is_visible

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


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

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


        :param is_full: The is_full of this SubnetModel.  # 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 is_master_shared(self):
        """Gets the is_master_shared of this SubnetModel.  # noqa: E501


        :return: The is_master_shared of this SubnetModel.  # noqa: E501
        :rtype: bool
        """
        return self._is_master_shared

    @is_master_shared.setter
    def is_master_shared(self, is_master_shared):
        """Sets the is_master_shared of this SubnetModel.


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

        self._is_master_shared = is_master_shared

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


        :return: The is_broken of this SubnetModel.  # noqa: E501
        :rtype: bool
        """
        return self._is_broken

    @is_broken.setter
    def is_broken(self, is_broken):
        """Sets the is_broken of this SubnetModel.


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

        self._is_broken = is_broken

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


        :return: The master_uuid of this SubnetModel.  # noqa: E501
        :rtype: str
        """
        return self._master_uuid

    @master_uuid.setter
    def master_uuid(self, master_uuid):
        """Sets the master_uuid of this SubnetModel.


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

        self._master_uuid = master_uuid

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


        :return: The network_uuid of this SubnetModel.  # noqa: E501
        :rtype: str
        """
        return self._network_uuid

    @network_uuid.setter
    def network_uuid(self, network_uuid):
        """Sets the network_uuid of this SubnetModel.


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

        self._network_uuid = network_uuid

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


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

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


        :param subnet: The subnet of this SubnetModel.  # noqa: E501
        :type: str
        """
        if subnet is None:
            raise ValueError("Invalid value for `subnet`, must not be `None`")  # noqa: E501
        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 master(self):
        """Gets the master of this SubnetModel.  # noqa: E501


        :return: The master of this SubnetModel.  # noqa: E501
        :rtype: str
        """
        return self._master

    @master.setter
    def master(self, master):
        """Sets the master of this SubnetModel.


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

        self._master = master

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


        :return: The network of this SubnetModel.  # noqa: E501
        :rtype: int
        """
        return self._network

    @network.setter
    def network(self, network):
        """Sets the network of this SubnetModel.


        :param network: The network of this SubnetModel.  # noqa: E501
        :type: int
        """

        self._network = network

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


        :return: The broadcast of this SubnetModel.  # noqa: E501
        :rtype: str
        """
        return self._broadcast

    @broadcast.setter
    def broadcast(self, broadcast):
        """Sets the broadcast of this SubnetModel.


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

        self._broadcast = broadcast

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


        :return: The vrrp of this SubnetModel.  # noqa: E501
        :rtype: str
        """
        return self._vrrp

    @vrrp.setter
    def vrrp(self, vrrp):
        """Sets the vrrp of this SubnetModel.


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

        self._vrrp = vrrp

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


        :return: The version of this SubnetModel.  # noqa: E501
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this SubnetModel.


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

        self._version = version

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


        :return: The prefixlen of this SubnetModel.  # noqa: E501
        :rtype: int
        """
        return self._prefixlen

    @prefixlen.setter
    def prefixlen(self, prefixlen):
        """Sets the prefixlen of this SubnetModel.


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

        self._prefixlen = prefixlen

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


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

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


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

        self._netmask = netmask

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


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

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


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

        self._gateway = gateway

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


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

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


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

        self._used = used

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


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

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


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

        self._usage = usage

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


        :return: The free of this SubnetModel.  # noqa: E501
        :rtype: int
        """
        return self._free

    @free.setter
    def free(self, free):
        """Sets the free of this SubnetModel.


        :param free: The free of this SubnetModel.  # noqa: E501
        :type: int
        """

        self._free = free

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


        :return: The is_processing of this SubnetModel.  # noqa: E501
        :rtype: bool
        """
        return self._is_processing

    @is_processing.setter
    def is_processing(self, is_processing):
        """Sets the is_processing of this SubnetModel.


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

        self._is_processing = is_processing

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

        return self.__dict__ == other.__dict__

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