# coding: utf-8

"""
    Selling Partner API for Replenishment

    The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.

    The version of the OpenAPI document: 2022-11-07
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class ListOfferMetricsRequestFilters(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 = {
        'aggregation_frequency': 'AggregationFrequency',
        'time_interval': 'TimeInterval',
        'time_period_type': 'TimePeriodType',
        'marketplace_id': 'str',
        'program_types': 'List[ProgramType]',
        'asins': 'List[str]',
    }

    attribute_map = {
        'aggregation_frequency': 'aggregationFrequency',
        'time_interval': 'timeInterval',
        'time_period_type': 'timePeriodType',
        'marketplace_id': 'marketplaceId',
        'program_types': 'programTypes',
        'asins': 'asins',
    }

    def __init__(self, aggregation_frequency=None, time_interval=None, time_period_type=None, marketplace_id=None, program_types=None, asins=None, _configuration=None):  # noqa: E501
        """ListOfferMetricsRequestFilters - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._aggregation_frequency = None
        self._time_interval = None
        self._time_period_type = None
        self._marketplace_id = None
        self._program_types = None
        self._asins = None
        self.discriminator = None

        if aggregation_frequency is not None:
            self.aggregation_frequency = aggregation_frequency
        self.time_interval = time_interval
        self.time_period_type = time_period_type
        self.marketplace_id = marketplace_id
        self.program_types = program_types
        if asins is not None:
            self.asins = asins

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


        :return: The aggregation_frequency of this ListOfferMetricsRequestFilters.  # noqa: E501
        :rtype: AggregationFrequency
        """
        return self._aggregation_frequency

    @aggregation_frequency.setter
    def aggregation_frequency(self, aggregation_frequency):
        """Sets the aggregation_frequency of this ListOfferMetricsRequestFilters.


        :param aggregation_frequency: The aggregation_frequency of this ListOfferMetricsRequestFilters.  # noqa: E501
        :type: AggregationFrequency
        """

        self._aggregation_frequency = aggregation_frequency

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


        :return: The time_interval of this ListOfferMetricsRequestFilters.  # noqa: E501
        :rtype: TimeInterval
        """
        return self._time_interval

    @time_interval.setter
    def time_interval(self, time_interval):
        """Sets the time_interval of this ListOfferMetricsRequestFilters.


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

        self._time_interval = time_interval

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


        :return: The time_period_type of this ListOfferMetricsRequestFilters.  # noqa: E501
        :rtype: TimePeriodType
        """
        return self._time_period_type

    @time_period_type.setter
    def time_period_type(self, time_period_type):
        """Sets the time_period_type of this ListOfferMetricsRequestFilters.


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

        self._time_period_type = time_period_type

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

        The marketplace identifier. The supported marketplaces for both sellers and vendors are US, CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the identifier for the marketplace.  # noqa: E501

        :return: The marketplace_id of this ListOfferMetricsRequestFilters.  # noqa: E501
        :rtype: str
        """
        return self._marketplace_id

    @marketplace_id.setter
    def marketplace_id(self, marketplace_id):
        """Sets the marketplace_id of this ListOfferMetricsRequestFilters.

        The marketplace identifier. The supported marketplaces for both sellers and vendors are US, CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the identifier for the marketplace.  # noqa: E501

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

        self._marketplace_id = marketplace_id

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

        A list of replenishment program types.  # noqa: E501

        :return: The program_types of this ListOfferMetricsRequestFilters.  # noqa: E501
        :rtype: List[ProgramType]
        """
        return self._program_types

    @program_types.setter
    def program_types(self, program_types):
        """Sets the program_types of this ListOfferMetricsRequestFilters.

        A list of replenishment program types.  # noqa: E501

        :param program_types: The program_types of this ListOfferMetricsRequestFilters.  # noqa: E501
        :type: List[ProgramType]
        """
        if self._configuration.client_side_validation and program_types is None:
            raise ValueError("Invalid value for `program_types`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                program_types is not None and len(program_types) < 1):
            raise ValueError("Invalid value for `program_types`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._program_types = program_types

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

        A list of Amazon Standard Identification Numbers (ASINs).  # noqa: E501

        :return: The asins of this ListOfferMetricsRequestFilters.  # noqa: E501
        :rtype: List[str]
        """
        return self._asins

    @asins.setter
    def asins(self, asins):
        """Sets the asins of this ListOfferMetricsRequestFilters.

        A list of Amazon Standard Identification Numbers (ASINs).  # noqa: E501

        :param asins: The asins of this ListOfferMetricsRequestFilters.  # noqa: E501
        :type: List[str]
        """
        if (self._configuration.client_side_validation and
                asins is not None and len(asins) > 20):
            raise ValueError("Invalid value for `asins`, number of items must be less than or equal to `20`")  # noqa: E501
        if (self._configuration.client_side_validation and
                asins is not None and len(asins) < 1):
            raise ValueError("Invalid value for `asins`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._asins = asins

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

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