# coding: utf-8

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

    <div lang=\"ja\">Yahoo!広告 ディスプレイ広告 APIのWebサービスについて説明します。</div> <div lang=\"en\">Display Ads API Web Services supported in Yahoo! JAPAN Ads API.</div> <div><a target=\"_blank\" href=\"https://github.com/yahoojp-marketing/ads-display-api-documents/blob/master/design/v12/Route.yaml\">OpenAPI Specification</a></div> <div lang=\"ja\"><a target=\"_blank\" href=\"https://github.com/yahoojp-marketing/ads-display-api-documents/blob/master/bestpractice/ja\">Best Practice</a></div> <div lang=\"en\"><a target=\"_blank\" href=\"https://github.com/yahoojp-marketing/ads-display-api-documents/blob/master/bestpractice/en\">Best Practice</a></div>   # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from yahoo_display_test.configuration import Configuration


class AudienceListServiceAppUserAudienceList(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': 'AudienceListServiceIsOpen',
        'is_preset': 'AudienceListServiceIsPreset',
        'reach_period': 'int',
        'rules': 'list[AudienceListServiceRule]',
        'app_link': 'AudienceListServiceAppLink'
    }

    attribute_map = {
        'is_open': 'isOpen',
        'is_preset': 'isPreset',
        'reach_period': 'reachPeriod',
        'rules': 'rules',
        'app_link': 'appLink'
    }

    def __init__(self, is_open=None, is_preset=None, reach_period=None, rules=None, app_link=None, local_vars_configuration=None):  # noqa: E501
        """AudienceListServiceAppUserAudienceList - 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._rules = None
        self._app_link = None
        self.discriminator = None

        self.is_open = is_open
        self.is_preset = is_preset
        self.reach_period = reach_period
        self.rules = rules
        self.app_link = app_link

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


        :return: The is_open of this AudienceListServiceAppUserAudienceList.  # noqa: E501
        :rtype: AudienceListServiceIsOpen
        """
        return self._is_open

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


        :param is_open: The is_open of this AudienceListServiceAppUserAudienceList.  # noqa: E501
        :type: AudienceListServiceIsOpen
        """

        self._is_open = is_open

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


        :return: The is_preset of this AudienceListServiceAppUserAudienceList.  # noqa: E501
        :rtype: AudienceListServiceIsPreset
        """
        return self._is_preset

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


        :param is_preset: The is_preset of this AudienceListServiceAppUserAudienceList.  # noqa: E501
        :type: AudienceListServiceIsPreset
        """

        self._is_preset = is_preset

    @property
    def reach_period(self):
        """Gets the reach_period of this AudienceListServiceAppUserAudienceList.  # 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 AudienceListServiceAppUserAudienceList.  # noqa: E501
        :rtype: int
        """
        return self._reach_period

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

        <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 AudienceListServiceAppUserAudienceList.  # noqa: E501
        :type: int
        """

        self._reach_period = reach_period

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


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

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


        :param rules: The rules of this AudienceListServiceAppUserAudienceList.  # noqa: E501
        :type: list[AudienceListServiceRule]
        """

        self._rules = rules

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


        :return: The app_link of this AudienceListServiceAppUserAudienceList.  # noqa: E501
        :rtype: AudienceListServiceAppLink
        """
        return self._app_link

    @app_link.setter
    def app_link(self, app_link):
        """Sets the app_link of this AudienceListServiceAppUserAudienceList.


        :param app_link: The app_link of this AudienceListServiceAppUserAudienceList.  # noqa: E501
        :type: AudienceListServiceAppLink
        """

        self._app_link = app_link

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

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