# coding: utf-8

"""
    Digitick REST API

    The Digitick REST API is a set of methods giving access to catalog, user and cart management.

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


from pprint import pformat
from six import iteritems
import re


class PriceDetailResponse(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, access_code_required=None, rule=None, filters=None, required_membership_rules=None):
        """
        PriceDetailResponse - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'int',
            'access_code_required': 'bool',
            'rule': 'PriceRuleResponse',
            'filters': 'list[PriceFiltersResponse]',
            'required_membership_rules': 'list[RequiredMembershipRulesResponse]'
        }

        self.attribute_map = {
            'id': 'id',
            'access_code_required': 'accessCodeRequired',
            'rule': 'rule',
            'filters': 'filters',
            'required_membership_rules': 'requiredMembershipRules'
        }

        self._id = id
        self._access_code_required = access_code_required
        self._rule = rule
        self._filters = filters
        self._required_membership_rules = required_membership_rules

    @property
    def id(self):
        """
        Gets the id of this PriceDetailResponse.

        :return: The id of this PriceDetailResponse.
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this PriceDetailResponse.

        :param id: The id of this PriceDetailResponse.
        :type: int
        """

        self._id = id

    @property
    def access_code_required(self):
        """
        Gets the access_code_required of this PriceDetailResponse.

        :return: The access_code_required of this PriceDetailResponse.
        :rtype: bool
        """
        return self._access_code_required

    @access_code_required.setter
    def access_code_required(self, access_code_required):
        """
        Sets the access_code_required of this PriceDetailResponse.

        :param access_code_required: The access_code_required of this PriceDetailResponse.
        :type: bool
        """

        self._access_code_required = access_code_required

    @property
    def rule(self):
        """
        Gets the rule of this PriceDetailResponse.

        :return: The rule of this PriceDetailResponse.
        :rtype: PriceRuleResponse
        """
        return self._rule

    @rule.setter
    def rule(self, rule):
        """
        Sets the rule of this PriceDetailResponse.

        :param rule: The rule of this PriceDetailResponse.
        :type: PriceRuleResponse
        """

        self._rule = rule

    @property
    def filters(self):
        """
        Gets the filters of this PriceDetailResponse.

        :return: The filters of this PriceDetailResponse.
        :rtype: list[PriceFiltersResponse]
        """
        return self._filters

    @filters.setter
    def filters(self, filters):
        """
        Sets the filters of this PriceDetailResponse.

        :param filters: The filters of this PriceDetailResponse.
        :type: list[PriceFiltersResponse]
        """

        self._filters = filters

    @property
    def required_membership_rules(self):
        """
        Gets the required_membership_rules of this PriceDetailResponse.

        :return: The required_membership_rules of this PriceDetailResponse.
        :rtype: list[RequiredMembershipRulesResponse]
        """
        return self._required_membership_rules

    @required_membership_rules.setter
    def required_membership_rules(self, required_membership_rules):
        """
        Sets the required_membership_rules of this PriceDetailResponse.

        :param required_membership_rules: The required_membership_rules of this PriceDetailResponse.
        :type: list[RequiredMembershipRulesResponse]
        """

        self._required_membership_rules = required_membership_rules

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, PriceDetailResponse):
            return False

        return self.__dict__ == other.__dict__

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