# coding: utf-8

"""
    Command Center operations

    Command Center operations  # noqa: E501

    OpenAPI spec version: 23.03-sp1
    Contact: support@zadarastorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from CommandCenter.configuration import Configuration


class CreateCustomNetwork(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 = {
        'user': 'str',
        'name': 'str',
        'cidr': 'str',
        'ipv6_cidr': 'str',
        'gateway': 'str',
        'ipv6_gateway': 'str',
        'ip_range': 'str',
        'ipv6_ip_range': 'str',
        'vlan_id': 'int'
    }

    attribute_map = {
        'user': 'user',
        'name': 'name',
        'cidr': 'cidr',
        'ipv6_cidr': 'ipv6_cidr',
        'gateway': 'gateway',
        'ipv6_gateway': 'ipv6_gateway',
        'ip_range': 'ip_range',
        'ipv6_ip_range': 'ipv6_ip_range',
        'vlan_id': 'vlan_id'
    }

    def __init__(self, user=None, name=None, cidr=None, ipv6_cidr=None, gateway=None, ipv6_gateway=None, ip_range=None, ipv6_ip_range=None, vlan_id=None, _configuration=None):  # noqa: E501
        """CreateCustomNetwork - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._user = None
        self._name = None
        self._cidr = None
        self._ipv6_cidr = None
        self._gateway = None
        self._ipv6_gateway = None
        self._ip_range = None
        self._ipv6_ip_range = None
        self._vlan_id = None
        self.discriminator = None

        self.user = user
        self.name = name
        if cidr is not None:
            self.cidr = cidr
        if ipv6_cidr is not None:
            self.ipv6_cidr = ipv6_cidr
        self.gateway = gateway
        if ipv6_gateway is not None:
            self.ipv6_gateway = ipv6_gateway
        if ip_range is not None:
            self.ip_range = ip_range
        if ipv6_ip_range is not None:
            self.ipv6_ip_range = ipv6_ip_range
        if vlan_id is not None:
            self.vlan_id = vlan_id

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

        Tenant id  # noqa: E501

        :return: The user of this CreateCustomNetwork.  # noqa: E501
        :rtype: str
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this CreateCustomNetwork.

        Tenant id  # noqa: E501

        :param user: The user of this CreateCustomNetwork.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and user is None:
            raise ValueError("Invalid value for `user`, must not be `None`")  # noqa: E501

        self._user = user

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


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

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


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

        self._name = name

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


        :return: The cidr of this CreateCustomNetwork.  # noqa: E501
        :rtype: str
        """
        return self._cidr

    @cidr.setter
    def cidr(self, cidr):
        """Sets the cidr of this CreateCustomNetwork.


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

        self._cidr = cidr

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


        :return: The ipv6_cidr of this CreateCustomNetwork.  # noqa: E501
        :rtype: str
        """
        return self._ipv6_cidr

    @ipv6_cidr.setter
    def ipv6_cidr(self, ipv6_cidr):
        """Sets the ipv6_cidr of this CreateCustomNetwork.


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

        self._ipv6_cidr = ipv6_cidr

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


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

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


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

        self._gateway = gateway

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


        :return: The ipv6_gateway of this CreateCustomNetwork.  # noqa: E501
        :rtype: str
        """
        return self._ipv6_gateway

    @ipv6_gateway.setter
    def ipv6_gateway(self, ipv6_gateway):
        """Sets the ipv6_gateway of this CreateCustomNetwork.


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

        self._ipv6_gateway = ipv6_gateway

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


        :return: The ip_range of this CreateCustomNetwork.  # noqa: E501
        :rtype: str
        """
        return self._ip_range

    @ip_range.setter
    def ip_range(self, ip_range):
        """Sets the ip_range of this CreateCustomNetwork.


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

        self._ip_range = ip_range

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


        :return: The ipv6_ip_range of this CreateCustomNetwork.  # noqa: E501
        :rtype: str
        """
        return self._ipv6_ip_range

    @ipv6_ip_range.setter
    def ipv6_ip_range(self, ipv6_ip_range):
        """Sets the ipv6_ip_range of this CreateCustomNetwork.


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

        self._ipv6_ip_range = ipv6_ip_range

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

        To automatically assign use \"vlan_id\":\"\"  # noqa: E501

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

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

        To automatically assign use \"vlan_id\":\"\"  # noqa: E501

        :param vlan_id: The vlan_id of this CreateCustomNetwork.  # noqa: E501
        :type: int
        """

        self._vlan_id = vlan_id

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

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