# coding: utf-8

"""
    Hydrogen Proton API

    Financial engineering module of Hydrogen Atom  # noqa: E501

    OpenAPI spec version: 1.9.1
    Contact: info@hydrogenplatform.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from proton_api.configuration import Configuration


class SpendingAnalysisRequest(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 = {
        'merchant_scope': 'list[str]',
        'account_ids': 'list[str]',
        'business_ids': 'list[str]',
        'card_ids': 'list[str]',
        'show_by_merchant': 'bool',
        'show_by_period': 'bool',
        'only_cleansed': 'bool',
        'frequency': 'int',
        'end_date': 'date',
        'as_of_date': 'date',
        'transaction_category_scope': 'list[str]',
        'start_date': 'date',
        'card_status_scope': 'list[str]',
        'only_active_clients': 'bool',
        'lookback_periods': 'int',
        'frequency_unit': 'str',
        'household_ids': 'list[str]',
        'aggregation_account_ids': 'list[str]',
        'currency_code': 'str',
        'client_ids': 'list[str]',
        'scope': 'str',
        'currency_conversion': 'str',
        'transaction_status_scope': 'list[str]',
        'show_by_category': 'bool'
    }

    attribute_map = {
        'merchant_scope': 'merchant_scope',
        'account_ids': 'account_ids',
        'business_ids': 'business_ids',
        'card_ids': 'card_ids',
        'show_by_merchant': 'show_by_merchant',
        'show_by_period': 'show_by_period',
        'only_cleansed': 'only_cleansed',
        'frequency': 'frequency',
        'end_date': 'end_date',
        'as_of_date': 'as_of_date',
        'transaction_category_scope': 'transaction_category_scope',
        'start_date': 'start_date',
        'card_status_scope': 'card_status_scope',
        'only_active_clients': 'only_active_clients',
        'lookback_periods': 'lookback_periods',
        'frequency_unit': 'frequency_unit',
        'household_ids': 'household_ids',
        'aggregation_account_ids': 'aggregation_account_ids',
        'currency_code': 'currency_code',
        'client_ids': 'client_ids',
        'scope': 'scope',
        'currency_conversion': 'currency_conversion',
        'transaction_status_scope': 'transaction_status_scope',
        'show_by_category': 'show_by_category'
    }

    def __init__(self, merchant_scope=None, account_ids=None, business_ids=None, card_ids=None, show_by_merchant=False, show_by_period=False, only_cleansed=False, frequency=1, end_date=None, as_of_date=None, transaction_category_scope=None, start_date=None, card_status_scope=None, only_active_clients=False, lookback_periods=0, frequency_unit=None, household_ids=None, aggregation_account_ids=None, currency_code=None, client_ids=None, scope='all', currency_conversion=None, transaction_status_scope=None, show_by_category=False, _configuration=None):  # noqa: E501
        """SpendingAnalysisRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._merchant_scope = None
        self._account_ids = None
        self._business_ids = None
        self._card_ids = None
        self._show_by_merchant = None
        self._show_by_period = None
        self._only_cleansed = None
        self._frequency = None
        self._end_date = None
        self._as_of_date = None
        self._transaction_category_scope = None
        self._start_date = None
        self._card_status_scope = None
        self._only_active_clients = None
        self._lookback_periods = None
        self._frequency_unit = None
        self._household_ids = None
        self._aggregation_account_ids = None
        self._currency_code = None
        self._client_ids = None
        self._scope = None
        self._currency_conversion = None
        self._transaction_status_scope = None
        self._show_by_category = None
        self.discriminator = None

        if merchant_scope is not None:
            self.merchant_scope = merchant_scope
        if account_ids is not None:
            self.account_ids = account_ids
        if business_ids is not None:
            self.business_ids = business_ids
        if card_ids is not None:
            self.card_ids = card_ids
        if show_by_merchant is not None:
            self.show_by_merchant = show_by_merchant
        if show_by_period is not None:
            self.show_by_period = show_by_period
        if only_cleansed is not None:
            self.only_cleansed = only_cleansed
        if frequency is not None:
            self.frequency = frequency
        if end_date is not None:
            self.end_date = end_date
        if as_of_date is not None:
            self.as_of_date = as_of_date
        if transaction_category_scope is not None:
            self.transaction_category_scope = transaction_category_scope
        if start_date is not None:
            self.start_date = start_date
        if card_status_scope is not None:
            self.card_status_scope = card_status_scope
        if only_active_clients is not None:
            self.only_active_clients = only_active_clients
        if lookback_periods is not None:
            self.lookback_periods = lookback_periods
        self.frequency_unit = frequency_unit
        if household_ids is not None:
            self.household_ids = household_ids
        if aggregation_account_ids is not None:
            self.aggregation_account_ids = aggregation_account_ids
        if currency_code is not None:
            self.currency_code = currency_code
        if client_ids is not None:
            self.client_ids = client_ids
        if scope is not None:
            self.scope = scope
        if currency_conversion is not None:
            self.currency_conversion = currency_conversion
        if transaction_status_scope is not None:
            self.transaction_status_scope = transaction_status_scope
        if show_by_category is not None:
            self.show_by_category = show_by_category

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


        :return: The merchant_scope of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._merchant_scope

    @merchant_scope.setter
    def merchant_scope(self, merchant_scope):
        """Sets the merchant_scope of this SpendingAnalysisRequest.


        :param merchant_scope: The merchant_scope of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._merchant_scope = merchant_scope

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


        :return: The account_ids of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._account_ids

    @account_ids.setter
    def account_ids(self, account_ids):
        """Sets the account_ids of this SpendingAnalysisRequest.


        :param account_ids: The account_ids of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._account_ids = account_ids

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


        :return: The business_ids of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._business_ids

    @business_ids.setter
    def business_ids(self, business_ids):
        """Sets the business_ids of this SpendingAnalysisRequest.


        :param business_ids: The business_ids of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._business_ids = business_ids

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


        :return: The card_ids of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._card_ids

    @card_ids.setter
    def card_ids(self, card_ids):
        """Sets the card_ids of this SpendingAnalysisRequest.


        :param card_ids: The card_ids of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._card_ids = card_ids

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


        :return: The show_by_merchant of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: bool
        """
        return self._show_by_merchant

    @show_by_merchant.setter
    def show_by_merchant(self, show_by_merchant):
        """Sets the show_by_merchant of this SpendingAnalysisRequest.


        :param show_by_merchant: The show_by_merchant of this SpendingAnalysisRequest.  # noqa: E501
        :type: bool
        """

        self._show_by_merchant = show_by_merchant

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


        :return: The show_by_period of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: bool
        """
        return self._show_by_period

    @show_by_period.setter
    def show_by_period(self, show_by_period):
        """Sets the show_by_period of this SpendingAnalysisRequest.


        :param show_by_period: The show_by_period of this SpendingAnalysisRequest.  # noqa: E501
        :type: bool
        """

        self._show_by_period = show_by_period

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


        :return: The only_cleansed of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: bool
        """
        return self._only_cleansed

    @only_cleansed.setter
    def only_cleansed(self, only_cleansed):
        """Sets the only_cleansed of this SpendingAnalysisRequest.


        :param only_cleansed: The only_cleansed of this SpendingAnalysisRequest.  # noqa: E501
        :type: bool
        """

        self._only_cleansed = only_cleansed

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


        :return: The frequency of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: int
        """
        return self._frequency

    @frequency.setter
    def frequency(self, frequency):
        """Sets the frequency of this SpendingAnalysisRequest.


        :param frequency: The frequency of this SpendingAnalysisRequest.  # noqa: E501
        :type: int
        """
        if (self._configuration.client_side_validation and
                frequency is not None and frequency < 1):  # noqa: E501
            raise ValueError("Invalid value for `frequency`, must be a value greater than or equal to `1`")  # noqa: E501

        self._frequency = frequency

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


        :return: The end_date of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: date
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this SpendingAnalysisRequest.


        :param end_date: The end_date of this SpendingAnalysisRequest.  # noqa: E501
        :type: date
        """

        self._end_date = end_date

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


        :return: The as_of_date of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: date
        """
        return self._as_of_date

    @as_of_date.setter
    def as_of_date(self, as_of_date):
        """Sets the as_of_date of this SpendingAnalysisRequest.


        :param as_of_date: The as_of_date of this SpendingAnalysisRequest.  # noqa: E501
        :type: date
        """

        self._as_of_date = as_of_date

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


        :return: The transaction_category_scope of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._transaction_category_scope

    @transaction_category_scope.setter
    def transaction_category_scope(self, transaction_category_scope):
        """Sets the transaction_category_scope of this SpendingAnalysisRequest.


        :param transaction_category_scope: The transaction_category_scope of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._transaction_category_scope = transaction_category_scope

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


        :return: The start_date of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: date
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this SpendingAnalysisRequest.


        :param start_date: The start_date of this SpendingAnalysisRequest.  # noqa: E501
        :type: date
        """

        self._start_date = start_date

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


        :return: The card_status_scope of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._card_status_scope

    @card_status_scope.setter
    def card_status_scope(self, card_status_scope):
        """Sets the card_status_scope of this SpendingAnalysisRequest.


        :param card_status_scope: The card_status_scope of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._card_status_scope = card_status_scope

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


        :return: The only_active_clients of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: bool
        """
        return self._only_active_clients

    @only_active_clients.setter
    def only_active_clients(self, only_active_clients):
        """Sets the only_active_clients of this SpendingAnalysisRequest.


        :param only_active_clients: The only_active_clients of this SpendingAnalysisRequest.  # noqa: E501
        :type: bool
        """

        self._only_active_clients = only_active_clients

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


        :return: The lookback_periods of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: int
        """
        return self._lookback_periods

    @lookback_periods.setter
    def lookback_periods(self, lookback_periods):
        """Sets the lookback_periods of this SpendingAnalysisRequest.


        :param lookback_periods: The lookback_periods of this SpendingAnalysisRequest.  # noqa: E501
        :type: int
        """
        if (self._configuration.client_side_validation and
                lookback_periods is not None and lookback_periods < 0):  # noqa: E501
            raise ValueError("Invalid value for `lookback_periods`, must be a value greater than or equal to `0`")  # noqa: E501

        self._lookback_periods = lookback_periods

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


        :return: The frequency_unit of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: str
        """
        return self._frequency_unit

    @frequency_unit.setter
    def frequency_unit(self, frequency_unit):
        """Sets the frequency_unit of this SpendingAnalysisRequest.


        :param frequency_unit: The frequency_unit of this SpendingAnalysisRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and frequency_unit is None:
            raise ValueError("Invalid value for `frequency_unit`, must not be `None`")  # noqa: E501
        allowed_values = ["daily", "weekly", "bi-weekly", "monthly", "quarterly", "annually"]  # noqa: E501
        if (self._configuration.client_side_validation and
                frequency_unit not in allowed_values):
            raise ValueError(
                "Invalid value for `frequency_unit` ({0}), must be one of {1}"  # noqa: E501
                .format(frequency_unit, allowed_values)
            )

        self._frequency_unit = frequency_unit

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


        :return: The household_ids of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._household_ids

    @household_ids.setter
    def household_ids(self, household_ids):
        """Sets the household_ids of this SpendingAnalysisRequest.


        :param household_ids: The household_ids of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._household_ids = household_ids

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


        :return: The aggregation_account_ids of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._aggregation_account_ids

    @aggregation_account_ids.setter
    def aggregation_account_ids(self, aggregation_account_ids):
        """Sets the aggregation_account_ids of this SpendingAnalysisRequest.


        :param aggregation_account_ids: The aggregation_account_ids of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._aggregation_account_ids = aggregation_account_ids

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


        :return: The currency_code of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this SpendingAnalysisRequest.


        :param currency_code: The currency_code of this SpendingAnalysisRequest.  # noqa: E501
        :type: str
        """

        self._currency_code = currency_code

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


        :return: The client_ids of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._client_ids

    @client_ids.setter
    def client_ids(self, client_ids):
        """Sets the client_ids of this SpendingAnalysisRequest.


        :param client_ids: The client_ids of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._client_ids = client_ids

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


        :return: The scope of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: str
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this SpendingAnalysisRequest.


        :param scope: The scope of this SpendingAnalysisRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["all", "external", "internal", "cards"]  # noqa: E501
        if (self._configuration.client_side_validation and
                scope not in allowed_values):
            raise ValueError(
                "Invalid value for `scope` ({0}), must be one of {1}"  # noqa: E501
                .format(scope, allowed_values)
            )

        self._scope = scope

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


        :return: The currency_conversion of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: str
        """
        return self._currency_conversion

    @currency_conversion.setter
    def currency_conversion(self, currency_conversion):
        """Sets the currency_conversion of this SpendingAnalysisRequest.


        :param currency_conversion: The currency_conversion of this SpendingAnalysisRequest.  # noqa: E501
        :type: str
        """

        self._currency_conversion = currency_conversion

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


        :return: The transaction_status_scope of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._transaction_status_scope

    @transaction_status_scope.setter
    def transaction_status_scope(self, transaction_status_scope):
        """Sets the transaction_status_scope of this SpendingAnalysisRequest.


        :param transaction_status_scope: The transaction_status_scope of this SpendingAnalysisRequest.  # noqa: E501
        :type: list[str]
        """

        self._transaction_status_scope = transaction_status_scope

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


        :return: The show_by_category of this SpendingAnalysisRequest.  # noqa: E501
        :rtype: bool
        """
        return self._show_by_category

    @show_by_category.setter
    def show_by_category(self, show_by_category):
        """Sets the show_by_category of this SpendingAnalysisRequest.


        :param show_by_category: The show_by_category of this SpendingAnalysisRequest.  # noqa: E501
        :type: bool
        """

        self._show_by_category = show_by_category

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

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