# coding: utf-8

"""
    VNS3 Controller API

    Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge  # noqa: E501

    The version of the OpenAPI document: 4.8
    Contact: solutions@cohesive.net
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class CreateFWSubgroupRequest(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 = {"rules": "str", "name": "str", "position": "int", "flush": "bool"}

    attribute_map = {
        "rules": "rules",
        "name": "name",
        "position": "position",
        "flush": "flush",
    }

    def __init__(self, rules=None, name=None, position=None, flush=True):  # noqa: E501
        """CreateFWSubgroupRequest - a model defined in OpenAPI"""  # noqa: E501

        self._rules = None
        self._name = None
        self._position = None
        self._flush = None
        self.discriminator = None

        if rules is not None:
            self.rules = rules
        if name is not None:
            self.name = name
        if position is not None:
            self.position = position
        if flush is not None:
            self.flush = flush

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

        Chained firewall rules seperated by \\n  # noqa: E501

        :return: The rules of this CreateFWSubgroupRequest.  # noqa: E501
        :rtype: str
        """
        return self._rules

    @rules.setter
    def rules(self, rules):
        """Sets the rules of this CreateFWSubgroupRequest.

        Chained firewall rules seperated by \\n  # noqa: E501

        :param rules: The rules of this CreateFWSubgroupRequest.  # noqa: E501
        :type: str
        """

        self._rules = rules

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

        'name of the subgroup. Must be valid chain that begins with one of the following: PRE_C_, PST_C_, FWD_C_, INP_C_, OUT_C_.'    # noqa: E501

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

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

        'name of the subgroup. Must be valid chain that begins with one of the following: PRE_C_, PST_C_, FWD_C_, INP_C_, OUT_C_.'    # noqa: E501

        :param name: The name of this CreateFWSubgroupRequest.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Position which the chain will be inserted in the list of Firewall rules.  Default is 0, which is first in the ruleset   # noqa: E501

        :return: The position of this CreateFWSubgroupRequest.  # noqa: E501
        :rtype: int
        """
        return self._position

    @position.setter
    def position(self, position):
        """Sets the position of this CreateFWSubgroupRequest.

        Position which the chain will be inserted in the list of Firewall rules.  Default is 0, which is first in the ruleset   # noqa: E501

        :param position: The position of this CreateFWSubgroupRequest.  # noqa: E501
        :type: int
        """

        self._position = position

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


        :return: The flush of this CreateFWSubgroupRequest.  # noqa: E501
        :rtype: bool
        """
        return self._flush

    @flush.setter
    def flush(self, flush):
        """Sets the flush of this CreateFWSubgroupRequest.


        :param flush: The flush of this CreateFWSubgroupRequest.  # noqa: E501
        :type: bool
        """

        self._flush = flush

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

        return self.__dict__ == other.__dict__

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