# coding: utf-8

"""
    Yahoo!広告 ディスプレイ広告 API リファレンス / Yahoo! Ads Display Ads API Reference

    <div lang=\"ja\">Yahoo!広告 ディスプレイ広告 APIのWebサービスについて説明します。<br> 「Try it out」のご利用には、事前にアプリケーションの登録が必要です。また、アプリケーションのリダイレクトURIの1つに<br> https://yahoojp-marketing.github.io/ads-display-api-documents/oauth2-redirect.htmlを登録してください。 </div> <div lang=\"en\">Display Ads API Web Services supported in Yahoo! Ads API.<br> When you use \"Try it out\", you need to register your application in advance.<br> As one of redirect URI for application, you need to set \"https://yahoojp-marketing.github.io/ads-display-api-documents/oauth2-redirect.html\". </div>   # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from yahoo_ads_display.configuration import Configuration


class RetargetingListServiceRuleTargetList(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'is_open': 'RetargetingListServiceIsOpen',
        'is_preset': 'RetargetingListServiceIsPreset',
        'reach_period': 'int',
        'retargeting_tag_id': 'str',
        'rules': 'list[RetargetingListServiceRule]'
    }

    attribute_map = {
        'is_open': 'isOpen',
        'is_preset': 'isPreset',
        'reach_period': 'reachPeriod',
        'retargeting_tag_id': 'retargetingTagId',
        'rules': 'rules'
    }

    def __init__(self, is_open=None, is_preset=None, reach_period=None, retargeting_tag_id=None, rules=None, local_vars_configuration=None):  # noqa: E501
        """RetargetingListServiceRuleTargetList - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._is_open = None
        self._is_preset = None
        self._reach_period = None
        self._retargeting_tag_id = None
        self._rules = None
        self.discriminator = None

        self.is_open = is_open
        self.is_preset = is_preset
        self.reach_period = reach_period
        self.retargeting_tag_id = retargeting_tag_id
        self.rules = rules

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


        :return: The is_open of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :rtype: RetargetingListServiceIsOpen
        """
        return self._is_open

    @is_open.setter
    def is_open(self, is_open):
        """Sets the is_open of this RetargetingListServiceRuleTargetList.


        :param is_open: The is_open of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :type: RetargetingListServiceIsOpen
        """

        self._is_open = is_open

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


        :return: The is_preset of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :rtype: RetargetingListServiceIsPreset
        """
        return self._is_preset

    @is_preset.setter
    def is_preset(self, is_preset):
        """Sets the is_preset of this RetargetingListServiceRuleTargetList.


        :param is_preset: The is_preset of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :type: RetargetingListServiceIsPreset
        """

        self._is_preset = is_preset

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

        <div lang=\"ja\"> リーチの蓄積期間（1日～540日）です。<br> このフィールドは、ADD時に必須となり、SET時に省略可能となります。 </div> <div lang=\"en\"> Cookies validation period. (1 - 540 days) <br> This field is required in ADD operation, and is optional in SET operation. </div>   # noqa: E501

        :return: The reach_period of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :rtype: int
        """
        return self._reach_period

    @reach_period.setter
    def reach_period(self, reach_period):
        """Sets the reach_period of this RetargetingListServiceRuleTargetList.

        <div lang=\"ja\"> リーチの蓄積期間（1日～540日）です。<br> このフィールドは、ADD時に必須となり、SET時に省略可能となります。 </div> <div lang=\"en\"> Cookies validation period. (1 - 540 days) <br> This field is required in ADD operation, and is optional in SET operation. </div>   # noqa: E501

        :param reach_period: The reach_period of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :type: int
        """

        self._reach_period = reach_period

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

        <div lang=\"ja\"> リターゲティングタグIDです。<br> このフィールドは、ADD時に必須となります。 </div> <div lang=\"en\"> ID of Retargeting Tag. <br> This field is required in ADD operation. </div>   # noqa: E501

        :return: The retargeting_tag_id of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :rtype: str
        """
        return self._retargeting_tag_id

    @retargeting_tag_id.setter
    def retargeting_tag_id(self, retargeting_tag_id):
        """Sets the retargeting_tag_id of this RetargetingListServiceRuleTargetList.

        <div lang=\"ja\"> リターゲティングタグIDです。<br> このフィールドは、ADD時に必須となります。 </div> <div lang=\"en\"> ID of Retargeting Tag. <br> This field is required in ADD operation. </div>   # noqa: E501

        :param retargeting_tag_id: The retargeting_tag_id of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :type: str
        """

        self._retargeting_tag_id = retargeting_tag_id

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


        :return: The rules of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :rtype: list[RetargetingListServiceRule]
        """
        return self._rules

    @rules.setter
    def rules(self, rules):
        """Sets the rules of this RetargetingListServiceRuleTargetList.


        :param rules: The rules of this RetargetingListServiceRuleTargetList.  # noqa: E501
        :type: list[RetargetingListServiceRule]
        """

        self._rules = rules

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

        for attr, _ in six.iteritems(self.openapi_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 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, RetargetingListServiceRuleTargetList):
            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, RetargetingListServiceRuleTargetList):
            return True

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