# coding: utf-8

"""
    Zadara Provisioning Portal API

     # Overview  This document outlines the methods available for creation and high-level administration of Zadara Storage VPSAs via a Zadara Storage Provisioning Portal. This API supports form-encoded requests, and can return either JSON or XML responses.  ## Endpoint  The base URL for the requests is the Provisioning Portal URL you created your VPSA through - for example: https://manage.zadarastorage.com/, and all APIs will be prefixed with /api as noted in the documentation below.  ## Authentication  To use this API, an authentication token is required. The API for retrieving this token can be found below in the Authentication section. You may pass this token in requests either via the the X-Token header or via basic authentication (base64 encoded) in Authorization header.  ## Questions  If you have any questions or need support involving the REST API, please contact for assistance.   # 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 ProvisioningPortal.configuration import Configuration


class CreateVirtualNetwork(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 = {
        'name': 'str',
        'provider_id': 'str',
        'tenant_id': 'str',
        'gateway': 'str',
        'gateway_zone_1': 'str',
        'ipv6_gateway': 'str',
        'ipv6_gateway_zone_1': 'str',
        'cidr': 'str',
        'ipv6_cidr': 'str',
        'allocatable_ip_ranges': 'str',
        'ipv6_allocatable_ip_ranges': 'str',
        'vlan_id': 'int',
        'default_for_tenant': 'bool'
    }

    attribute_map = {
        'name': 'name',
        'provider_id': 'provider_id',
        'tenant_id': 'tenant_id',
        'gateway': 'gateway',
        'gateway_zone_1': 'gateway_zone_1',
        'ipv6_gateway': 'ipv6_gateway',
        'ipv6_gateway_zone_1': 'ipv6_gateway_zone_1',
        'cidr': 'cidr',
        'ipv6_cidr': 'ipv6_cidr',
        'allocatable_ip_ranges': 'allocatable_ip_ranges',
        'ipv6_allocatable_ip_ranges': 'ipv6_allocatable_ip_ranges',
        'vlan_id': 'vlan_id',
        'default_for_tenant': 'default_for_tenant'
    }

    def __init__(self, name=None, provider_id=None, tenant_id=None, gateway=None, gateway_zone_1=None, ipv6_gateway=None, ipv6_gateway_zone_1=None, cidr=None, ipv6_cidr=None, allocatable_ip_ranges=None, ipv6_allocatable_ip_ranges=None, vlan_id=None, default_for_tenant=None, _configuration=None):  # noqa: E501
        """CreateVirtualNetwork - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._provider_id = None
        self._tenant_id = None
        self._gateway = None
        self._gateway_zone_1 = None
        self._ipv6_gateway = None
        self._ipv6_gateway_zone_1 = None
        self._cidr = None
        self._ipv6_cidr = None
        self._allocatable_ip_ranges = None
        self._ipv6_allocatable_ip_ranges = None
        self._vlan_id = None
        self._default_for_tenant = None
        self.discriminator = None

        self.name = name
        self.provider_id = provider_id
        self.tenant_id = tenant_id
        if gateway is not None:
            self.gateway = gateway
        if gateway_zone_1 is not None:
            self.gateway_zone_1 = gateway_zone_1
        if ipv6_gateway is not None:
            self.ipv6_gateway = ipv6_gateway
        if ipv6_gateway_zone_1 is not None:
            self.ipv6_gateway_zone_1 = ipv6_gateway_zone_1
        if cidr is not None:
            self.cidr = cidr
        if ipv6_cidr is not None:
            self.ipv6_cidr = ipv6_cidr
        if allocatable_ip_ranges is not None:
            self.allocatable_ip_ranges = allocatable_ip_ranges
        if ipv6_allocatable_ip_ranges is not None:
            self.ipv6_allocatable_ip_ranges = ipv6_allocatable_ip_ranges
        if vlan_id is not None:
            self.vlan_id = vlan_id
        if default_for_tenant is not None:
            self.default_for_tenant = default_for_tenant

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


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

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


        :param name: The name of this CreateVirtualNetwork.  # 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 provider_id(self):
        """Gets the provider_id of this CreateVirtualNetwork.  # noqa: E501


        :return: The provider_id of this CreateVirtualNetwork.  # noqa: E501
        :rtype: str
        """
        return self._provider_id

    @provider_id.setter
    def provider_id(self, provider_id):
        """Sets the provider_id of this CreateVirtualNetwork.


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

        self._provider_id = provider_id

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


        :return: The tenant_id of this CreateVirtualNetwork.  # noqa: E501
        :rtype: str
        """
        return self._tenant_id

    @tenant_id.setter
    def tenant_id(self, tenant_id):
        """Sets the tenant_id of this CreateVirtualNetwork.


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

        self._tenant_id = tenant_id

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


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

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


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

        self._gateway = gateway

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


        :return: The gateway_zone_1 of this CreateVirtualNetwork.  # noqa: E501
        :rtype: str
        """
        return self._gateway_zone_1

    @gateway_zone_1.setter
    def gateway_zone_1(self, gateway_zone_1):
        """Sets the gateway_zone_1 of this CreateVirtualNetwork.


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

        self._gateway_zone_1 = gateway_zone_1

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


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

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


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

        self._ipv6_gateway = ipv6_gateway

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


        :return: The ipv6_gateway_zone_1 of this CreateVirtualNetwork.  # noqa: E501
        :rtype: str
        """
        return self._ipv6_gateway_zone_1

    @ipv6_gateway_zone_1.setter
    def ipv6_gateway_zone_1(self, ipv6_gateway_zone_1):
        """Sets the ipv6_gateway_zone_1 of this CreateVirtualNetwork.


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

        self._ipv6_gateway_zone_1 = ipv6_gateway_zone_1

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


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

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


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

        self._cidr = cidr

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


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

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


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

        self._ipv6_cidr = ipv6_cidr

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


        :return: The allocatable_ip_ranges of this CreateVirtualNetwork.  # noqa: E501
        :rtype: str
        """
        return self._allocatable_ip_ranges

    @allocatable_ip_ranges.setter
    def allocatable_ip_ranges(self, allocatable_ip_ranges):
        """Sets the allocatable_ip_ranges of this CreateVirtualNetwork.


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

        self._allocatable_ip_ranges = allocatable_ip_ranges

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


        :return: The ipv6_allocatable_ip_ranges of this CreateVirtualNetwork.  # noqa: E501
        :rtype: str
        """
        return self._ipv6_allocatable_ip_ranges

    @ipv6_allocatable_ip_ranges.setter
    def ipv6_allocatable_ip_ranges(self, ipv6_allocatable_ip_ranges):
        """Sets the ipv6_allocatable_ip_ranges of this CreateVirtualNetwork.


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

        self._ipv6_allocatable_ip_ranges = ipv6_allocatable_ip_ranges

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

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

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

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

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

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

        self._vlan_id = vlan_id

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


        :return: The default_for_tenant of this CreateVirtualNetwork.  # noqa: E501
        :rtype: bool
        """
        return self._default_for_tenant

    @default_for_tenant.setter
    def default_for_tenant(self, default_for_tenant):
        """Sets the default_for_tenant of this CreateVirtualNetwork.


        :param default_for_tenant: The default_for_tenant of this CreateVirtualNetwork.  # noqa: E501
        :type: bool
        """

        self._default_for_tenant = default_for_tenant

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

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