# 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 AdGroupAdServiceAd(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_type': 'AdGroupAdServiceAdType',
        'main_media_format': 'AdGroupAdServiceMainMediaFormat',
        'banner_ad': 'AdGroupAdServiceBannerAd',
        'carousel_ad': 'AdGroupAdServiceCarouselAd',
        'dynamic_display_ad': 'AdGroupAdServiceDynamicDisplayAd',
        'responsive_ad': 'AdGroupAdServiceResponsiveAd',
        'text_ad': 'AdGroupAdServiceTextAd',
        'custom_parameters': 'AdGroupAdServiceCustomParameters',
        'display_url': 'str',
        'display_url_level': 'AdGroupAdServiceDisplayUrlLevel',
        'final_url': 'str',
        'smartphone_final_url': 'str',
        'is_remove_smartphone_final_url': 'AdGroupAdServiceIsRemoveFlg',
        'tracking_url': 'str',
        'is_remove_tracking_url': 'AdGroupAdServiceIsRemoveFlg'
    }

    attribute_map = {
        'ad_type': 'adType',
        'main_media_format': 'mainMediaFormat',
        'banner_ad': 'bannerAd',
        'carousel_ad': 'carouselAd',
        'dynamic_display_ad': 'dynamicDisplayAd',
        'responsive_ad': 'responsiveAd',
        'text_ad': 'textAd',
        'custom_parameters': 'customParameters',
        'display_url': 'displayUrl',
        'display_url_level': 'displayUrlLevel',
        'final_url': 'finalUrl',
        'smartphone_final_url': 'smartphoneFinalUrl',
        'is_remove_smartphone_final_url': 'isRemoveSmartphoneFinalUrl',
        'tracking_url': 'trackingUrl',
        'is_remove_tracking_url': 'isRemoveTrackingUrl'
    }

    def __init__(self, ad_type=None, main_media_format=None, banner_ad=None, carousel_ad=None, dynamic_display_ad=None, responsive_ad=None, text_ad=None, custom_parameters=None, display_url=None, display_url_level=None, final_url=None, smartphone_final_url=None, is_remove_smartphone_final_url=None, tracking_url=None, is_remove_tracking_url=None, local_vars_configuration=None):  # noqa: E501
        """AdGroupAdServiceAd - 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_type = None
        self._main_media_format = None
        self._banner_ad = None
        self._carousel_ad = None
        self._dynamic_display_ad = None
        self._responsive_ad = None
        self._text_ad = None
        self._custom_parameters = None
        self._display_url = None
        self._display_url_level = None
        self._final_url = None
        self._smartphone_final_url = None
        self._is_remove_smartphone_final_url = None
        self._tracking_url = None
        self._is_remove_tracking_url = None
        self.discriminator = None

        self.ad_type = ad_type
        self.main_media_format = main_media_format
        self.banner_ad = banner_ad
        self.carousel_ad = carousel_ad
        self.dynamic_display_ad = dynamic_display_ad
        self.responsive_ad = responsive_ad
        self.text_ad = text_ad
        self.custom_parameters = custom_parameters
        self.display_url = display_url
        self.display_url_level = display_url_level
        self.final_url = final_url
        self.smartphone_final_url = smartphone_final_url
        self.is_remove_smartphone_final_url = is_remove_smartphone_final_url
        self.tracking_url = tracking_url
        self.is_remove_tracking_url = is_remove_tracking_url

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


        :return: The ad_type of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceAdType
        """
        return self._ad_type

    @ad_type.setter
    def ad_type(self, ad_type):
        """Sets the ad_type of this AdGroupAdServiceAd.


        :param ad_type: The ad_type of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceAdType
        """

        self._ad_type = ad_type

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


        :return: The main_media_format of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceMainMediaFormat
        """
        return self._main_media_format

    @main_media_format.setter
    def main_media_format(self, main_media_format):
        """Sets the main_media_format of this AdGroupAdServiceAd.


        :param main_media_format: The main_media_format of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceMainMediaFormat
        """

        self._main_media_format = main_media_format

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


        :return: The banner_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceBannerAd
        """
        return self._banner_ad

    @banner_ad.setter
    def banner_ad(self, banner_ad):
        """Sets the banner_ad of this AdGroupAdServiceAd.


        :param banner_ad: The banner_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceBannerAd
        """

        self._banner_ad = banner_ad

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


        :return: The carousel_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceCarouselAd
        """
        return self._carousel_ad

    @carousel_ad.setter
    def carousel_ad(self, carousel_ad):
        """Sets the carousel_ad of this AdGroupAdServiceAd.


        :param carousel_ad: The carousel_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceCarouselAd
        """

        self._carousel_ad = carousel_ad

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


        :return: The dynamic_display_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceDynamicDisplayAd
        """
        return self._dynamic_display_ad

    @dynamic_display_ad.setter
    def dynamic_display_ad(self, dynamic_display_ad):
        """Sets the dynamic_display_ad of this AdGroupAdServiceAd.


        :param dynamic_display_ad: The dynamic_display_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceDynamicDisplayAd
        """

        self._dynamic_display_ad = dynamic_display_ad

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


        :return: The responsive_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceResponsiveAd
        """
        return self._responsive_ad

    @responsive_ad.setter
    def responsive_ad(self, responsive_ad):
        """Sets the responsive_ad of this AdGroupAdServiceAd.


        :param responsive_ad: The responsive_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceResponsiveAd
        """

        self._responsive_ad = responsive_ad

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


        :return: The text_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceTextAd
        """
        return self._text_ad

    @text_ad.setter
    def text_ad(self, text_ad):
        """Sets the text_ad of this AdGroupAdServiceAd.


        :param text_ad: The text_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceTextAd
        """

        self._text_ad = text_ad

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


        :return: The custom_parameters of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceCustomParameters
        """
        return self._custom_parameters

    @custom_parameters.setter
    def custom_parameters(self, custom_parameters):
        """Sets the custom_parameters of this AdGroupAdServiceAd.


        :param custom_parameters: The custom_parameters of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceCustomParameters
        """

        self._custom_parameters = custom_parameters

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

        <div lang=\"ja\"> 表示URLです。<br> このフィールドを指定することはできません。代わりにfinalUrlから生成された値が自動で設定されます。<br> ただし、キャンペーン目的「アプリ訴求」の場合は、キャンペーンで指定したDeviceOsTypeに基づき、以下のいずれかのURLが自動で設定されます。<br> - iOSの場合：itunes.apple.com<br> - Androidの場合：play.google.com </div> <div lang=\"en\"> Display URL.<br> This field cannot be specified. Instead, the value generated from finalUrl will be set automatically.<br> However, When a campaign goal is \"app promotion\", Based on DeviceOsType specified on the campaign, any of the following URLs will be automatically set.<br> - For iOS : itunes.apple.com<br> - For Android : play.google.com </div>   # noqa: E501

        :return: The display_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._display_url

    @display_url.setter
    def display_url(self, display_url):
        """Sets the display_url of this AdGroupAdServiceAd.

        <div lang=\"ja\"> 表示URLです。<br> このフィールドを指定することはできません。代わりにfinalUrlから生成された値が自動で設定されます。<br> ただし、キャンペーン目的「アプリ訴求」の場合は、キャンペーンで指定したDeviceOsTypeに基づき、以下のいずれかのURLが自動で設定されます。<br> - iOSの場合：itunes.apple.com<br> - Androidの場合：play.google.com </div> <div lang=\"en\"> Display URL.<br> This field cannot be specified. Instead, the value generated from finalUrl will be set automatically.<br> However, When a campaign goal is \"app promotion\", Based on DeviceOsType specified on the campaign, any of the following URLs will be automatically set.<br> - For iOS : itunes.apple.com<br> - For Android : play.google.com </div>   # noqa: E501

        :param display_url: The display_url of this AdGroupAdServiceAd.  # noqa: E501
        :type: str
        """

        self._display_url = display_url

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


        :return: The display_url_level of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceDisplayUrlLevel
        """
        return self._display_url_level

    @display_url_level.setter
    def display_url_level(self, display_url_level):
        """Sets the display_url_level of this AdGroupAdServiceAd.


        :param display_url_level: The display_url_level of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceDisplayUrlLevel
        """

        self._display_url_level = display_url_level

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

        <div lang=\"ja\">最終リンク先URLです。<br> このフィールドは、ADD時は必須となり、SET時は省略可能となります。<br> キャンペーン目的「アプリ訴求」の場合は、このフィールドには以下のURLのみ設定できます。<br> - iOSの場合：itunes.apple.com, apps.apple.com<br> - Androidの場合：play.google.com </div> <div lang=\"en\">Final URL.<br> This field is required in ADD operation, and will be optional in SET operation.<br> If campaignGoal is APP_PROMOTION, only the following URL can be set in this field.<br> - For iOS : itunes.apple.com, apps.apple.com<br> - For Android : play.google.com </div>   # noqa: E501

        :return: The final_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._final_url

    @final_url.setter
    def final_url(self, final_url):
        """Sets the final_url of this AdGroupAdServiceAd.

        <div lang=\"ja\">最終リンク先URLです。<br> このフィールドは、ADD時は必須となり、SET時は省略可能となります。<br> キャンペーン目的「アプリ訴求」の場合は、このフィールドには以下のURLのみ設定できます。<br> - iOSの場合：itunes.apple.com, apps.apple.com<br> - Androidの場合：play.google.com </div> <div lang=\"en\">Final URL.<br> This field is required in ADD operation, and will be optional in SET operation.<br> If campaignGoal is APP_PROMOTION, only the following URL can be set in this field.<br> - For iOS : itunes.apple.com, apps.apple.com<br> - For Android : play.google.com </div>   # noqa: E501

        :param final_url: The final_url of this AdGroupAdServiceAd.  # noqa: E501
        :type: str
        """

        self._final_url = final_url

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

        <div lang=\"ja\">スマートフォン向けURLです。<br> ADDおよびSET時、このフィールドは省略可能となります。<br> キャンペーン目的「アプリ訴求」の場合は、ADD、SETのどちらも指定できません。 </div> <div lang=\"en\">Final URL (smartphone).<br> This field is optional in ADD and SET operation.<br> Not allowed for ADD and SET when a campaign goal is \"app promotion.\" </div>   # noqa: E501

        :return: The smartphone_final_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._smartphone_final_url

    @smartphone_final_url.setter
    def smartphone_final_url(self, smartphone_final_url):
        """Sets the smartphone_final_url of this AdGroupAdServiceAd.

        <div lang=\"ja\">スマートフォン向けURLです。<br> ADDおよびSET時、このフィールドは省略可能となります。<br> キャンペーン目的「アプリ訴求」の場合は、ADD、SETのどちらも指定できません。 </div> <div lang=\"en\">Final URL (smartphone).<br> This field is optional in ADD and SET operation.<br> Not allowed for ADD and SET when a campaign goal is \"app promotion.\" </div>   # noqa: E501

        :param smartphone_final_url: The smartphone_final_url of this AdGroupAdServiceAd.  # noqa: E501
        :type: str
        """

        self._smartphone_final_url = smartphone_final_url

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


        :return: The is_remove_smartphone_final_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceIsRemoveFlg
        """
        return self._is_remove_smartphone_final_url

    @is_remove_smartphone_final_url.setter
    def is_remove_smartphone_final_url(self, is_remove_smartphone_final_url):
        """Sets the is_remove_smartphone_final_url of this AdGroupAdServiceAd.


        :param is_remove_smartphone_final_url: The is_remove_smartphone_final_url of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceIsRemoveFlg
        """

        self._is_remove_smartphone_final_url = is_remove_smartphone_final_url

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

        <div lang=\"ja\">トラッキングURLです。<br> ADD時、このフィールドは省略可能となります。<br> finalUrlを指定するときのみ、任意で指定できます。<br> SET時にurlを指定する場合、このフィールドの値はクリアされます。 </div> <div lang=\"en\">Tracking URL.<br> This field is optional in ADD operation.<br> This field can be optionally specified only when specifying finalUrl.<br> If url is specified in SET operation, the value in this field will be cleared. </div>   # noqa: E501

        :return: The tracking_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._tracking_url

    @tracking_url.setter
    def tracking_url(self, tracking_url):
        """Sets the tracking_url of this AdGroupAdServiceAd.

        <div lang=\"ja\">トラッキングURLです。<br> ADD時、このフィールドは省略可能となります。<br> finalUrlを指定するときのみ、任意で指定できます。<br> SET時にurlを指定する場合、このフィールドの値はクリアされます。 </div> <div lang=\"en\">Tracking URL.<br> This field is optional in ADD operation.<br> This field can be optionally specified only when specifying finalUrl.<br> If url is specified in SET operation, the value in this field will be cleared. </div>   # noqa: E501

        :param tracking_url: The tracking_url of this AdGroupAdServiceAd.  # noqa: E501
        :type: str
        """

        self._tracking_url = tracking_url

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


        :return: The is_remove_tracking_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceIsRemoveFlg
        """
        return self._is_remove_tracking_url

    @is_remove_tracking_url.setter
    def is_remove_tracking_url(self, is_remove_tracking_url):
        """Sets the is_remove_tracking_url of this AdGroupAdServiceAd.


        :param is_remove_tracking_url: The is_remove_tracking_url of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceIsRemoveFlg
        """

        self._is_remove_tracking_url = is_remove_tracking_url

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

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