# coding: utf-8

"""
    vepfs

    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 CreateLensPolicyRequest(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 = {
        'description': 'str',
        'lens_policy_name': 'str',
        'logic_operator': 'str',
        'rule_groups': 'list[RuleGroupForCreateLensPolicyInput]'
    }

    attribute_map = {
        'description': 'Description',
        'lens_policy_name': 'LensPolicyName',
        'logic_operator': 'LogicOperator',
        'rule_groups': 'RuleGroups'
    }

    def __init__(self, description=None, lens_policy_name=None, logic_operator=None, rule_groups=None, _configuration=None):  # noqa: E501
        """CreateLensPolicyRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._description = None
        self._lens_policy_name = None
        self._logic_operator = None
        self._rule_groups = None
        self.discriminator = None

        if description is not None:
            self.description = description
        self.lens_policy_name = lens_policy_name
        if logic_operator is not None:
            self.logic_operator = logic_operator
        if rule_groups is not None:
            self.rule_groups = rule_groups

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


        :return: The description of this CreateLensPolicyRequest.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this CreateLensPolicyRequest.


        :param description: The description of this CreateLensPolicyRequest.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The lens_policy_name of this CreateLensPolicyRequest.  # noqa: E501
        :rtype: str
        """
        return self._lens_policy_name

    @lens_policy_name.setter
    def lens_policy_name(self, lens_policy_name):
        """Sets the lens_policy_name of this CreateLensPolicyRequest.


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

        self._lens_policy_name = lens_policy_name

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


        :return: The logic_operator of this CreateLensPolicyRequest.  # noqa: E501
        :rtype: str
        """
        return self._logic_operator

    @logic_operator.setter
    def logic_operator(self, logic_operator):
        """Sets the logic_operator of this CreateLensPolicyRequest.


        :param logic_operator: The logic_operator of this CreateLensPolicyRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["Or", "And", "AndNot"]  # noqa: E501
        if (self._configuration.client_side_validation and
                logic_operator not in allowed_values):
            raise ValueError(
                "Invalid value for `logic_operator` ({0}), must be one of {1}"  # noqa: E501
                .format(logic_operator, allowed_values)
            )

        self._logic_operator = logic_operator

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


        :return: The rule_groups of this CreateLensPolicyRequest.  # noqa: E501
        :rtype: list[RuleGroupForCreateLensPolicyInput]
        """
        return self._rule_groups

    @rule_groups.setter
    def rule_groups(self, rule_groups):
        """Sets the rule_groups of this CreateLensPolicyRequest.


        :param rule_groups: The rule_groups of this CreateLensPolicyRequest.  # noqa: E501
        :type: list[RuleGroupForCreateLensPolicyInput]
        """

        self._rule_groups = rule_groups

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

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