# coding: utf-8

"""
    Python client for GIG based clouds (pc4g)

    RESTful api client to a GIG based cloud.  # noqa: E501

    OpenAPI spec version: v1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from pc4g.configuration import Configuration


class CreateCloudspace(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',
        'location': 'str',
        'private_network': 'str',
        'vcpu_quota': 'int',
        'vdisk_space_quota': 'int',
        'memory_quota': 'int',
        'public_ip_quota': 'int',
        'firewall': 'object'
    }

    attribute_map = {
        'name': 'name',
        'location': 'location',
        'private_network': 'private_network',
        'vcpu_quota': 'vcpu_quota',
        'vdisk_space_quota': 'vdisk_space_quota',
        'memory_quota': 'memory_quota',
        'public_ip_quota': 'public_ip_quota',
        'firewall': 'firewall'
    }

    def __init__(self, name=None, location=None, private_network='192.168.103.0/24', vcpu_quota=None, vdisk_space_quota=None, memory_quota=None, public_ip_quota=None, firewall=None, _configuration=None):  # noqa: E501
        """CreateCloudspace - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._location = None
        self._private_network = None
        self._vcpu_quota = None
        self._vdisk_space_quota = None
        self._memory_quota = None
        self._public_ip_quota = None
        self._firewall = None
        self.discriminator = None

        self.name = name
        self.location = location
        if private_network is not None:
            self.private_network = private_network
        if vcpu_quota is not None:
            self.vcpu_quota = vcpu_quota
        if vdisk_space_quota is not None:
            self.vdisk_space_quota = vdisk_space_quota
        if memory_quota is not None:
            self.memory_quota = memory_quota
        if public_ip_quota is not None:
            self.public_ip_quota = public_ip_quota
        self.firewall = firewall

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

        Cloudspace Name  # noqa: E501

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

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

        Cloudspace Name  # noqa: E501

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

        Cloudspace location  # noqa: E501

        :return: The location of this CreateCloudspace.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this CreateCloudspace.

        Cloudspace location  # noqa: E501

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

        self._location = location

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

        Private Network  # noqa: E501

        :return: The private_network of this CreateCloudspace.  # noqa: E501
        :rtype: str
        """
        return self._private_network

    @private_network.setter
    def private_network(self, private_network):
        """Sets the private_network of this CreateCloudspace.

        Private Network  # noqa: E501

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

        self._private_network = private_network

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

        VCPU Quota. If omitted the account will be able to provision an unlimited amount of VCPUs.  # noqa: E501

        :return: The vcpu_quota of this CreateCloudspace.  # noqa: E501
        :rtype: int
        """
        return self._vcpu_quota

    @vcpu_quota.setter
    def vcpu_quota(self, vcpu_quota):
        """Sets the vcpu_quota of this CreateCloudspace.

        VCPU Quota. If omitted the account will be able to provision an unlimited amount of VCPUs.  # noqa: E501

        :param vcpu_quota: The vcpu_quota of this CreateCloudspace.  # noqa: E501
        :type: int
        """

        self._vcpu_quota = vcpu_quota

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

        VDisk Quota, If omitted the account will be able to provision an unlimited amount of VDisks.  # noqa: E501

        :return: The vdisk_space_quota of this CreateCloudspace.  # noqa: E501
        :rtype: int
        """
        return self._vdisk_space_quota

    @vdisk_space_quota.setter
    def vdisk_space_quota(self, vdisk_space_quota):
        """Sets the vdisk_space_quota of this CreateCloudspace.

        VDisk Quota, If omitted the account will be able to provision an unlimited amount of VDisks.  # noqa: E501

        :param vdisk_space_quota: The vdisk_space_quota of this CreateCloudspace.  # noqa: E501
        :type: int
        """

        self._vdisk_space_quota = vdisk_space_quota

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

        Memory Quota, If omitted the account will be able to provision an unlimited amount of Memory.  # noqa: E501

        :return: The memory_quota of this CreateCloudspace.  # noqa: E501
        :rtype: int
        """
        return self._memory_quota

    @memory_quota.setter
    def memory_quota(self, memory_quota):
        """Sets the memory_quota of this CreateCloudspace.

        Memory Quota, If omitted the account will be able to provision an unlimited amount of Memory.  # noqa: E501

        :param memory_quota: The memory_quota of this CreateCloudspace.  # noqa: E501
        :type: int
        """

        self._memory_quota = memory_quota

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

        Public IP Quota, If omitted the account will be able to provision an unlimited amount of Public IPs.  # noqa: E501

        :return: The public_ip_quota of this CreateCloudspace.  # noqa: E501
        :rtype: int
        """
        return self._public_ip_quota

    @public_ip_quota.setter
    def public_ip_quota(self, public_ip_quota):
        """Sets the public_ip_quota of this CreateCloudspace.

        Public IP Quota, If omitted the account will be able to provision an unlimited amount of Public IPs.  # noqa: E501

        :param public_ip_quota: The public_ip_quota of this CreateCloudspace.  # noqa: E501
        :type: int
        """

        self._public_ip_quota = public_ip_quota

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

        Only one of parent_cloudspace_id or external_network_id should be passed  # noqa: E501

        :return: The firewall of this CreateCloudspace.  # noqa: E501
        :rtype: object
        """
        return self._firewall

    @firewall.setter
    def firewall(self, firewall):
        """Sets the firewall of this CreateCloudspace.

        Only one of parent_cloudspace_id or external_network_id should be passed  # noqa: E501

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

        self._firewall = firewall

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

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