# 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 AdGroupTargetServiceTarget(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 = {
        'ad_schedule_target': 'AdGroupTargetServiceAdScheduleTarget',
        'age_target': 'AdGroupTargetServiceAgeTarget',
        'app_target': 'AdGroupTargetServiceAppTarget',
        'audience_category_target': 'AdGroupTargetServiceAudienceCategoryTarget',
        'carrier_target': 'AdGroupTargetServiceCarrierTarget',
        'device_target': 'AdGroupTargetServiceDeviceTarget',
        'gender_target': 'AdGroupTargetServiceGenderTarget',
        'geo_target': 'AdGroupTargetServiceGeoTarget',
        'interest_category_target': 'AdGroupTargetServiceInterestCategoryTarget',
        'is_remove': 'bool',
        'os_target': 'AdGroupTargetServiceOsTarget',
        'os_version_target': 'AdGroupTargetServiceOsVersionTarget',
        'placement_target': 'AdGroupTargetServicePlacementTarget',
        'search_target': 'AdGroupTargetServiceSearchTarget',
        'site_category_target': 'AdGroupTargetServiceSiteCategoryTarget',
        'site_retargeting_target': 'AdGroupTargetServiceSiteRetargetingTarget',
        'target_id': 'str',
        'target_type': 'AdGroupTargetServiceTargetType'
    }

    attribute_map = {
        'ad_schedule_target': 'adScheduleTarget',
        'age_target': 'ageTarget',
        'app_target': 'appTarget',
        'audience_category_target': 'audienceCategoryTarget',
        'carrier_target': 'carrierTarget',
        'device_target': 'deviceTarget',
        'gender_target': 'genderTarget',
        'geo_target': 'geoTarget',
        'interest_category_target': 'interestCategoryTarget',
        'is_remove': 'isRemove',
        'os_target': 'osTarget',
        'os_version_target': 'osVersionTarget',
        'placement_target': 'placementTarget',
        'search_target': 'searchTarget',
        'site_category_target': 'siteCategoryTarget',
        'site_retargeting_target': 'siteRetargetingTarget',
        'target_id': 'targetId',
        'target_type': 'targetType'
    }

    def __init__(self, ad_schedule_target=None, age_target=None, app_target=None, audience_category_target=None, carrier_target=None, device_target=None, gender_target=None, geo_target=None, interest_category_target=None, is_remove=None, os_target=None, os_version_target=None, placement_target=None, search_target=None, site_category_target=None, site_retargeting_target=None, target_id=None, target_type=None, local_vars_configuration=None):  # noqa: E501
        """AdGroupTargetServiceTarget - 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._ad_schedule_target = None
        self._age_target = None
        self._app_target = None
        self._audience_category_target = None
        self._carrier_target = None
        self._device_target = None
        self._gender_target = None
        self._geo_target = None
        self._interest_category_target = None
        self._is_remove = None
        self._os_target = None
        self._os_version_target = None
        self._placement_target = None
        self._search_target = None
        self._site_category_target = None
        self._site_retargeting_target = None
        self._target_id = None
        self._target_type = None
        self.discriminator = None

        self.ad_schedule_target = ad_schedule_target
        self.age_target = age_target
        self.app_target = app_target
        self.audience_category_target = audience_category_target
        self.carrier_target = carrier_target
        self.device_target = device_target
        self.gender_target = gender_target
        self.geo_target = geo_target
        self.interest_category_target = interest_category_target
        self.is_remove = is_remove
        self.os_target = os_target
        self.os_version_target = os_version_target
        self.placement_target = placement_target
        self.search_target = search_target
        self.site_category_target = site_category_target
        self.site_retargeting_target = site_retargeting_target
        self.target_id = target_id
        self.target_type = target_type

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


        :return: The ad_schedule_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceAdScheduleTarget
        """
        return self._ad_schedule_target

    @ad_schedule_target.setter
    def ad_schedule_target(self, ad_schedule_target):
        """Sets the ad_schedule_target of this AdGroupTargetServiceTarget.


        :param ad_schedule_target: The ad_schedule_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceAdScheduleTarget
        """

        self._ad_schedule_target = ad_schedule_target

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


        :return: The age_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceAgeTarget
        """
        return self._age_target

    @age_target.setter
    def age_target(self, age_target):
        """Sets the age_target of this AdGroupTargetServiceTarget.


        :param age_target: The age_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceAgeTarget
        """

        self._age_target = age_target

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


        :return: The app_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceAppTarget
        """
        return self._app_target

    @app_target.setter
    def app_target(self, app_target):
        """Sets the app_target of this AdGroupTargetServiceTarget.


        :param app_target: The app_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceAppTarget
        """

        self._app_target = app_target

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


        :return: The audience_category_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceAudienceCategoryTarget
        """
        return self._audience_category_target

    @audience_category_target.setter
    def audience_category_target(self, audience_category_target):
        """Sets the audience_category_target of this AdGroupTargetServiceTarget.


        :param audience_category_target: The audience_category_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceAudienceCategoryTarget
        """

        self._audience_category_target = audience_category_target

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


        :return: The carrier_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceCarrierTarget
        """
        return self._carrier_target

    @carrier_target.setter
    def carrier_target(self, carrier_target):
        """Sets the carrier_target of this AdGroupTargetServiceTarget.


        :param carrier_target: The carrier_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceCarrierTarget
        """

        self._carrier_target = carrier_target

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


        :return: The device_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceDeviceTarget
        """
        return self._device_target

    @device_target.setter
    def device_target(self, device_target):
        """Sets the device_target of this AdGroupTargetServiceTarget.


        :param device_target: The device_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceDeviceTarget
        """

        self._device_target = device_target

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


        :return: The gender_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceGenderTarget
        """
        return self._gender_target

    @gender_target.setter
    def gender_target(self, gender_target):
        """Sets the gender_target of this AdGroupTargetServiceTarget.


        :param gender_target: The gender_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceGenderTarget
        """

        self._gender_target = gender_target

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


        :return: The geo_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceGeoTarget
        """
        return self._geo_target

    @geo_target.setter
    def geo_target(self, geo_target):
        """Sets the geo_target of this AdGroupTargetServiceTarget.


        :param geo_target: The geo_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceGeoTarget
        """

        self._geo_target = geo_target

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


        :return: The interest_category_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceInterestCategoryTarget
        """
        return self._interest_category_target

    @interest_category_target.setter
    def interest_category_target(self, interest_category_target):
        """Sets the interest_category_target of this AdGroupTargetServiceTarget.


        :param interest_category_target: The interest_category_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceInterestCategoryTarget
        """

        self._interest_category_target = interest_category_target

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

        <div lang=\"ja\"> trueの場合、ターゲティング種別をすべて削除します。<br> このフィールドは、ADD、SETおよびREMOVE時は無視され、REPLACE時は省略可能となります。 </div> <div lang=\"en\"> If true, delete all targeting types.<br> This field will be ignored in ADD, SET and REMOVE operation, and will be optional in REPLACE operation. </div>   # noqa: E501

        :return: The is_remove of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: bool
        """
        return self._is_remove

    @is_remove.setter
    def is_remove(self, is_remove):
        """Sets the is_remove of this AdGroupTargetServiceTarget.

        <div lang=\"ja\"> trueの場合、ターゲティング種別をすべて削除します。<br> このフィールドは、ADD、SETおよびREMOVE時は無視され、REPLACE時は省略可能となります。 </div> <div lang=\"en\"> If true, delete all targeting types.<br> This field will be ignored in ADD, SET and REMOVE operation, and will be optional in REPLACE operation. </div>   # noqa: E501

        :param is_remove: The is_remove of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: bool
        """

        self._is_remove = is_remove

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


        :return: The os_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceOsTarget
        """
        return self._os_target

    @os_target.setter
    def os_target(self, os_target):
        """Sets the os_target of this AdGroupTargetServiceTarget.


        :param os_target: The os_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceOsTarget
        """

        self._os_target = os_target

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


        :return: The os_version_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceOsVersionTarget
        """
        return self._os_version_target

    @os_version_target.setter
    def os_version_target(self, os_version_target):
        """Sets the os_version_target of this AdGroupTargetServiceTarget.


        :param os_version_target: The os_version_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceOsVersionTarget
        """

        self._os_version_target = os_version_target

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


        :return: The placement_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServicePlacementTarget
        """
        return self._placement_target

    @placement_target.setter
    def placement_target(self, placement_target):
        """Sets the placement_target of this AdGroupTargetServiceTarget.


        :param placement_target: The placement_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServicePlacementTarget
        """

        self._placement_target = placement_target

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


        :return: The search_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceSearchTarget
        """
        return self._search_target

    @search_target.setter
    def search_target(self, search_target):
        """Sets the search_target of this AdGroupTargetServiceTarget.


        :param search_target: The search_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceSearchTarget
        """

        self._search_target = search_target

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


        :return: The site_category_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceSiteCategoryTarget
        """
        return self._site_category_target

    @site_category_target.setter
    def site_category_target(self, site_category_target):
        """Sets the site_category_target of this AdGroupTargetServiceTarget.


        :param site_category_target: The site_category_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceSiteCategoryTarget
        """

        self._site_category_target = site_category_target

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


        :return: The site_retargeting_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceSiteRetargetingTarget
        """
        return self._site_retargeting_target

    @site_retargeting_target.setter
    def site_retargeting_target(self, site_retargeting_target):
        """Sets the site_retargeting_target of this AdGroupTargetServiceTarget.


        :param site_retargeting_target: The site_retargeting_target of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceSiteRetargetingTarget
        """

        self._site_retargeting_target = site_retargeting_target

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

        <div lang=\"ja\"> ターゲットIDです。<br> このフィールドは、ADDおよびREPLACE時は省略可能となり、SETおよびREMOVE時は必須となります。<br> ※ADD時、targetTypeが以下のいずれかの場合は必須です。<br> ‐SITE_RETARGETING<br> ‐PLACEMENT_TARGET<br> ‐SEARCH_TARGET<br> ‐GEO_TARGET<br> ‐INTEREST_CATEGORY<br> ‐SITE_CATEGORY<br> ‐AUDIENCE_CATEGORY_TARGET<br> ※REPLACE時、isRemoveがtrueの場合は設定不要です。<br> <br> ‐SITE_RETARGETING: targetListId<br> ‐PLACEMENT_TARGET: placementUrlListId<br> ‐SEARCH_TARGET: searchKeywordListId<br> ‐GEO_TARGET: IM地域コード(geo)<br> ‐INTEREST_CATEGORY: カテゴリーコード(category)<br> ‐SITE_CATEGORY: カテゴリーコード(category)<br> ‐OS_VERSION_TARGET: osVersion<br> ‐AUDIENCE_CATEGORY_TARGET: オーディエンスカテゴリーコード(audience category) </div> <div lang=\"en\"> Target ID.<br> This field is optional in ADD and REPLACE operation, and is required in SET and REMOVE operation.<br> *If targetType is any of the following, this field is required in ADD operation.<br> ‐SITE_RETARGETING<br> ‐PLACEMENT_TARGET<br> ‐SEARCH_TARGET<br> ‐GEO_TARGET<br> ‐INTEREST_CATEGORY<br> ‐SITE_CATEGORY<br> ‐AUDIENCE_CATEGORY_TARGET<br> *If isRemove is true, this field does not need to be set in REPLACE operation.<br> <br> ‐SITE_RETARGETING: targetListId<br> ‐PLACEMENT_TARGET: placementUrlListId<br> ‐SEARCH_TARGET: searchKeywordListId<br> ‐GEO_TARGET: IM area code(geo)<br> ‐INTEREST_CATEGORY: category code(category)<br> ‐SITE_CATEGORY: category code(category)<br> ‐OS_VERSION_TARGET: osVersion<br> ‐AUDIENCE_CATEGORY_TARGET: audience category code(audience category) </div>   # noqa: E501

        :return: The target_id of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: str
        """
        return self._target_id

    @target_id.setter
    def target_id(self, target_id):
        """Sets the target_id of this AdGroupTargetServiceTarget.

        <div lang=\"ja\"> ターゲットIDです。<br> このフィールドは、ADDおよびREPLACE時は省略可能となり、SETおよびREMOVE時は必須となります。<br> ※ADD時、targetTypeが以下のいずれかの場合は必須です。<br> ‐SITE_RETARGETING<br> ‐PLACEMENT_TARGET<br> ‐SEARCH_TARGET<br> ‐GEO_TARGET<br> ‐INTEREST_CATEGORY<br> ‐SITE_CATEGORY<br> ‐AUDIENCE_CATEGORY_TARGET<br> ※REPLACE時、isRemoveがtrueの場合は設定不要です。<br> <br> ‐SITE_RETARGETING: targetListId<br> ‐PLACEMENT_TARGET: placementUrlListId<br> ‐SEARCH_TARGET: searchKeywordListId<br> ‐GEO_TARGET: IM地域コード(geo)<br> ‐INTEREST_CATEGORY: カテゴリーコード(category)<br> ‐SITE_CATEGORY: カテゴリーコード(category)<br> ‐OS_VERSION_TARGET: osVersion<br> ‐AUDIENCE_CATEGORY_TARGET: オーディエンスカテゴリーコード(audience category) </div> <div lang=\"en\"> Target ID.<br> This field is optional in ADD and REPLACE operation, and is required in SET and REMOVE operation.<br> *If targetType is any of the following, this field is required in ADD operation.<br> ‐SITE_RETARGETING<br> ‐PLACEMENT_TARGET<br> ‐SEARCH_TARGET<br> ‐GEO_TARGET<br> ‐INTEREST_CATEGORY<br> ‐SITE_CATEGORY<br> ‐AUDIENCE_CATEGORY_TARGET<br> *If isRemove is true, this field does not need to be set in REPLACE operation.<br> <br> ‐SITE_RETARGETING: targetListId<br> ‐PLACEMENT_TARGET: placementUrlListId<br> ‐SEARCH_TARGET: searchKeywordListId<br> ‐GEO_TARGET: IM area code(geo)<br> ‐INTEREST_CATEGORY: category code(category)<br> ‐SITE_CATEGORY: category code(category)<br> ‐OS_VERSION_TARGET: osVersion<br> ‐AUDIENCE_CATEGORY_TARGET: audience category code(audience category) </div>   # noqa: E501

        :param target_id: The target_id of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: str
        """

        self._target_id = target_id

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


        :return: The target_type of this AdGroupTargetServiceTarget.  # noqa: E501
        :rtype: AdGroupTargetServiceTargetType
        """
        return self._target_type

    @target_type.setter
    def target_type(self, target_type):
        """Sets the target_type of this AdGroupTargetServiceTarget.


        :param target_type: The target_type of this AdGroupTargetServiceTarget.  # noqa: E501
        :type: AdGroupTargetServiceTargetType
        """

        self._target_type = target_type

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

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