# coding: utf-8

"""
    waf

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class CreateCCRuleRequest(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 = {
        'accurate_group': 'AccurateGroupForCreateCCRuleInput',
        'cc_type': 'int',
        'count_time': 'int',
        'cron_confs': 'list[CronConfForCreateCCRuleInput]',
        'cron_enable': 'int',
        'effect_time': 'int',
        'enable': 'int',
        'exemption_time': 'int',
        'field': 'str',
        'host': 'str',
        'name': 'str',
        'path_threshold': 'int',
        'project_name': 'str',
        'rule_priority': 'int',
        'rule_tag': 'str',
        'single_threshold': 'int',
        'url': 'str'
    }

    attribute_map = {
        'accurate_group': 'AccurateGroup',
        'cc_type': 'CCType',
        'count_time': 'CountTime',
        'cron_confs': 'CronConfs',
        'cron_enable': 'CronEnable',
        'effect_time': 'EffectTime',
        'enable': 'Enable',
        'exemption_time': 'ExemptionTime',
        'field': 'Field',
        'host': 'Host',
        'name': 'Name',
        'path_threshold': 'PathThreshold',
        'project_name': 'ProjectName',
        'rule_priority': 'RulePriority',
        'rule_tag': 'RuleTag',
        'single_threshold': 'SingleThreshold',
        'url': 'Url'
    }

    def __init__(self, accurate_group=None, cc_type=None, count_time=None, cron_confs=None, cron_enable=None, effect_time=None, enable=None, exemption_time=None, field=None, host=None, name=None, path_threshold=None, project_name=None, rule_priority=None, rule_tag=None, single_threshold=None, url=None, _configuration=None):  # noqa: E501
        """CreateCCRuleRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._accurate_group = None
        self._cc_type = None
        self._count_time = None
        self._cron_confs = None
        self._cron_enable = None
        self._effect_time = None
        self._enable = None
        self._exemption_time = None
        self._field = None
        self._host = None
        self._name = None
        self._path_threshold = None
        self._project_name = None
        self._rule_priority = None
        self._rule_tag = None
        self._single_threshold = None
        self._url = None
        self.discriminator = None

        if accurate_group is not None:
            self.accurate_group = accurate_group
        if cc_type is not None:
            self.cc_type = cc_type
        if count_time is not None:
            self.count_time = count_time
        if cron_confs is not None:
            self.cron_confs = cron_confs
        if cron_enable is not None:
            self.cron_enable = cron_enable
        self.effect_time = effect_time
        self.enable = enable
        if exemption_time is not None:
            self.exemption_time = exemption_time
        self.field = field
        self.host = host
        self.name = name
        if path_threshold is not None:
            self.path_threshold = path_threshold
        if project_name is not None:
            self.project_name = project_name
        self.rule_priority = rule_priority
        if rule_tag is not None:
            self.rule_tag = rule_tag
        if single_threshold is not None:
            self.single_threshold = single_threshold
        self.url = url

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


        :return: The accurate_group of this CreateCCRuleRequest.  # noqa: E501
        :rtype: AccurateGroupForCreateCCRuleInput
        """
        return self._accurate_group

    @accurate_group.setter
    def accurate_group(self, accurate_group):
        """Sets the accurate_group of this CreateCCRuleRequest.


        :param accurate_group: The accurate_group of this CreateCCRuleRequest.  # noqa: E501
        :type: AccurateGroupForCreateCCRuleInput
        """

        self._accurate_group = accurate_group

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


        :return: The cc_type of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._cc_type

    @cc_type.setter
    def cc_type(self, cc_type):
        """Sets the cc_type of this CreateCCRuleRequest.


        :param cc_type: The cc_type of this CreateCCRuleRequest.  # noqa: E501
        :type: int
        """

        self._cc_type = cc_type

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


        :return: The count_time of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._count_time

    @count_time.setter
    def count_time(self, count_time):
        """Sets the count_time of this CreateCCRuleRequest.


        :param count_time: The count_time of this CreateCCRuleRequest.  # noqa: E501
        :type: int
        """

        self._count_time = count_time

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


        :return: The cron_confs of this CreateCCRuleRequest.  # noqa: E501
        :rtype: list[CronConfForCreateCCRuleInput]
        """
        return self._cron_confs

    @cron_confs.setter
    def cron_confs(self, cron_confs):
        """Sets the cron_confs of this CreateCCRuleRequest.


        :param cron_confs: The cron_confs of this CreateCCRuleRequest.  # noqa: E501
        :type: list[CronConfForCreateCCRuleInput]
        """

        self._cron_confs = cron_confs

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


        :return: The cron_enable of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._cron_enable

    @cron_enable.setter
    def cron_enable(self, cron_enable):
        """Sets the cron_enable of this CreateCCRuleRequest.


        :param cron_enable: The cron_enable of this CreateCCRuleRequest.  # noqa: E501
        :type: int
        """

        self._cron_enable = cron_enable

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


        :return: The effect_time of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._effect_time

    @effect_time.setter
    def effect_time(self, effect_time):
        """Sets the effect_time of this CreateCCRuleRequest.


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

        self._effect_time = effect_time

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


        :return: The enable of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._enable

    @enable.setter
    def enable(self, enable):
        """Sets the enable of this CreateCCRuleRequest.


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

        self._enable = enable

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


        :return: The exemption_time of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._exemption_time

    @exemption_time.setter
    def exemption_time(self, exemption_time):
        """Sets the exemption_time of this CreateCCRuleRequest.


        :param exemption_time: The exemption_time of this CreateCCRuleRequest.  # noqa: E501
        :type: int
        """

        self._exemption_time = exemption_time

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


        :return: The field of this CreateCCRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._field

    @field.setter
    def field(self, field):
        """Sets the field of this CreateCCRuleRequest.


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

        self._field = field

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


        :return: The host of this CreateCCRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this CreateCCRuleRequest.


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

        self._host = host

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


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

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


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


        :return: The path_threshold of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._path_threshold

    @path_threshold.setter
    def path_threshold(self, path_threshold):
        """Sets the path_threshold of this CreateCCRuleRequest.


        :param path_threshold: The path_threshold of this CreateCCRuleRequest.  # noqa: E501
        :type: int
        """

        self._path_threshold = path_threshold

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


        :return: The project_name of this CreateCCRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._project_name

    @project_name.setter
    def project_name(self, project_name):
        """Sets the project_name of this CreateCCRuleRequest.


        :param project_name: The project_name of this CreateCCRuleRequest.  # noqa: E501
        :type: str
        """

        self._project_name = project_name

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


        :return: The rule_priority of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._rule_priority

    @rule_priority.setter
    def rule_priority(self, rule_priority):
        """Sets the rule_priority of this CreateCCRuleRequest.


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

        self._rule_priority = rule_priority

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


        :return: The rule_tag of this CreateCCRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._rule_tag

    @rule_tag.setter
    def rule_tag(self, rule_tag):
        """Sets the rule_tag of this CreateCCRuleRequest.


        :param rule_tag: The rule_tag of this CreateCCRuleRequest.  # noqa: E501
        :type: str
        """

        self._rule_tag = rule_tag

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


        :return: The single_threshold of this CreateCCRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._single_threshold

    @single_threshold.setter
    def single_threshold(self, single_threshold):
        """Sets the single_threshold of this CreateCCRuleRequest.


        :param single_threshold: The single_threshold of this CreateCCRuleRequest.  # noqa: E501
        :type: int
        """

        self._single_threshold = single_threshold

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


        :return: The url of this CreateCCRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this CreateCCRuleRequest.


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

        self._url = url

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

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