# 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 CreateCloudspaceFirewall(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 = {
        'private': 'bool',
        'external_network_id': 'int',
        'parent_cloudspace_id': 'str',
        'custom': 'object'
    }

    attribute_map = {
        'private': 'private',
        'external_network_id': 'external_network_id',
        'parent_cloudspace_id': 'parent_cloudspace_id',
        'custom': 'custom'
    }

    def __init__(self, private=False, external_network_id=None, parent_cloudspace_id=None, custom=None, _configuration=None):  # noqa: E501
        """CreateCloudspaceFirewall - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._private = None
        self._external_network_id = None
        self._parent_cloudspace_id = None
        self._custom = None
        self.discriminator = None

        self.private = private
        if external_network_id is not None:
            self.external_network_id = external_network_id
        if parent_cloudspace_id is not None:
            self.parent_cloudspace_id = parent_cloudspace_id
        if custom is not None:
            self.custom = custom

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

        Private cloudspace  # noqa: E501

        :return: The private of this CreateCloudspaceFirewall.  # noqa: E501
        :rtype: bool
        """
        return self._private

    @private.setter
    def private(self, private):
        """Sets the private of this CreateCloudspaceFirewall.

        Private cloudspace  # noqa: E501

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

        self._private = private

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

        Cloudspace Parent external network ID. Otherwise if empty default network will be used  # noqa: E501

        :return: The external_network_id of this CreateCloudspaceFirewall.  # noqa: E501
        :rtype: int
        """
        return self._external_network_id

    @external_network_id.setter
    def external_network_id(self, external_network_id):
        """Sets the external_network_id of this CreateCloudspaceFirewall.

        Cloudspace Parent external network ID. Otherwise if empty default network will be used  # noqa: E501

        :param external_network_id: The external_network_id of this CreateCloudspaceFirewall.  # noqa: E501
        :type: int
        """

        self._external_network_id = external_network_id

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

        Parent Cloudspace ID, used for nested cloudspace, needs to be in the same location  # noqa: E501

        :return: The parent_cloudspace_id of this CreateCloudspaceFirewall.  # noqa: E501
        :rtype: str
        """
        return self._parent_cloudspace_id

    @parent_cloudspace_id.setter
    def parent_cloudspace_id(self, parent_cloudspace_id):
        """Sets the parent_cloudspace_id of this CreateCloudspaceFirewall.

        Parent Cloudspace ID, used for nested cloudspace, needs to be in the same location  # noqa: E501

        :param parent_cloudspace_id: The parent_cloudspace_id of this CreateCloudspaceFirewall.  # noqa: E501
        :type: str
        """

        self._parent_cloudspace_id = parent_cloudspace_id

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

        Custom firewall specs, if not passed default virtual gateway will be used with external_network_id Only one cdrom_id or image_id should be passed  # noqa: E501

        :return: The custom of this CreateCloudspaceFirewall.  # noqa: E501
        :rtype: object
        """
        return self._custom

    @custom.setter
    def custom(self, custom):
        """Sets the custom of this CreateCloudspaceFirewall.

        Custom firewall specs, if not passed default virtual gateway will be used with external_network_id Only one cdrom_id or image_id should be passed  # noqa: E501

        :param custom: The custom of this CreateCloudspaceFirewall.  # noqa: E501
        :type: object
        """

        self._custom = custom

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

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