# coding: utf-8

"""
    Yahoo!広告 検索広告 API リファレンス / Yahoo! JAPAN Ads Search Ads API Reference

    <div lang=\"ja\">Yahoo!広告 検索広告 APIのWebサービスについて説明します。</div> <div lang=\"en\">Search Ads API Web Services supported in Yahoo! JAPAN Ads API.</div> <div><a target=\"_blank\" href=\"https://github.com/yahoojp-marketing/ads-search-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-search-api-documents/blob/master/bestpractice/ja\">Best Practice</a></div> <div lang=\"en\"><a target=\"_blank\" href=\"https://github.com/yahoojp-marketing/ads-search-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_search_api_v12.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',
        'text_ad2': 'AdGroupAdServiceTextAd2',
        'app_ad': 'AdGroupAdServiceAppAd',
        'extended_text_ad': 'AdGroupAdServiceExtendedTextAd',
        'dynamic_search_linked_ad': 'AdGroupAdServiceDynamicSearchLinkedAd',
        'responsive_search_ad': 'AdGroupAdServiceResponsiveSearchAd',
        'final_url': 'str',
        'review_final_url': 'str',
        'smartphone_final_url': 'str',
        'review_smartphone_final_url': 'str',
        'is_remove_smartphone_final_url': 'AdGroupAdServiceIsRemove',
        'tracking_url': 'str',
        'review_tracking_url': 'str',
        'is_remove_tracking_url': 'AdGroupAdServiceIsRemove',
        'custom_parameters': 'AdGroupAdServiceCustomParameters',
        'review_custom_parameters': 'AdGroupAdServiceCustomParameters',
        'device_preference': 'AdGroupAdServiceDevicePreference',
        'display_url': 'str',
        'url': 'str'
    }

    attribute_map = {
        'ad_type': 'adType',
        'text_ad2': 'textAd2',
        'app_ad': 'appAd',
        'extended_text_ad': 'extendedTextAd',
        'dynamic_search_linked_ad': 'dynamicSearchLinkedAd',
        'responsive_search_ad': 'responsiveSearchAd',
        'final_url': 'finalUrl',
        'review_final_url': 'reviewFinalUrl',
        'smartphone_final_url': 'smartphoneFinalUrl',
        'review_smartphone_final_url': 'reviewSmartphoneFinalUrl',
        'is_remove_smartphone_final_url': 'isRemoveSmartphoneFinalUrl',
        'tracking_url': 'trackingUrl',
        'review_tracking_url': 'reviewTrackingUrl',
        'is_remove_tracking_url': 'isRemoveTrackingUrl',
        'custom_parameters': 'customParameters',
        'review_custom_parameters': 'reviewCustomParameters',
        'device_preference': 'devicePreference',
        'display_url': 'displayUrl',
        'url': 'url'
    }

    def __init__(self, ad_type=None, text_ad2=None, app_ad=None, extended_text_ad=None, dynamic_search_linked_ad=None, responsive_search_ad=None, final_url=None, review_final_url=None, smartphone_final_url=None, review_smartphone_final_url=None, is_remove_smartphone_final_url=None, tracking_url=None, review_tracking_url=None, is_remove_tracking_url=None, custom_parameters=None, review_custom_parameters=None, device_preference=None, display_url=None, 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._text_ad2 = None
        self._app_ad = None
        self._extended_text_ad = None
        self._dynamic_search_linked_ad = None
        self._responsive_search_ad = None
        self._final_url = None
        self._review_final_url = None
        self._smartphone_final_url = None
        self._review_smartphone_final_url = None
        self._is_remove_smartphone_final_url = None
        self._tracking_url = None
        self._review_tracking_url = None
        self._is_remove_tracking_url = None
        self._custom_parameters = None
        self._review_custom_parameters = None
        self._device_preference = None
        self._display_url = None
        self._url = None
        self.discriminator = None

        self.ad_type = ad_type
        self.text_ad2 = text_ad2
        self.app_ad = app_ad
        self.extended_text_ad = extended_text_ad
        self.dynamic_search_linked_ad = dynamic_search_linked_ad
        self.responsive_search_ad = responsive_search_ad
        self.final_url = final_url
        self.review_final_url = review_final_url
        self.smartphone_final_url = smartphone_final_url
        self.review_smartphone_final_url = review_smartphone_final_url
        self.is_remove_smartphone_final_url = is_remove_smartphone_final_url
        self.tracking_url = tracking_url
        self.review_tracking_url = review_tracking_url
        self.is_remove_tracking_url = is_remove_tracking_url
        self.custom_parameters = custom_parameters
        self.review_custom_parameters = review_custom_parameters
        self.device_preference = device_preference
        self.display_url = display_url
        self.url = 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 text_ad2(self):
        """Gets the text_ad2 of this AdGroupAdServiceAd.  # noqa: E501


        :return: The text_ad2 of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceTextAd2
        """
        return self._text_ad2

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


        :param text_ad2: The text_ad2 of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceTextAd2
        """

        self._text_ad2 = text_ad2

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


        :return: The app_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceAppAd
        """
        return self._app_ad

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


        :param app_ad: The app_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceAppAd
        """

        self._app_ad = app_ad

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


        :return: The extended_text_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceExtendedTextAd
        """
        return self._extended_text_ad

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


        :param extended_text_ad: The extended_text_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceExtendedTextAd
        """

        self._extended_text_ad = extended_text_ad

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


        :return: The dynamic_search_linked_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceDynamicSearchLinkedAd
        """
        return self._dynamic_search_linked_ad

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


        :param dynamic_search_linked_ad: The dynamic_search_linked_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceDynamicSearchLinkedAd
        """

        self._dynamic_search_linked_ad = dynamic_search_linked_ad

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


        :return: The responsive_search_ad of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceResponsiveSearchAd
        """
        return self._responsive_search_ad

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


        :param responsive_search_ad: The responsive_search_ad of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceResponsiveSearchAd
        """

        self._responsive_search_ad = responsive_search_ad

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

        <div lang=\"ja\">最終リンク先URLです。<br> ADD時、このフィールドは必須となります。※adTypeがDYNAMIC_SEARCH_LINKED_ADの場合は無視されます。<br> SET時、adTypeがRESPONSIVE_SEARCH_ADの場合のみ更新可能です。</div> <div lang=\"en\">Landing page URL.<br> This field is required in ADD operation. *If adType is DYNAMIC_SEARCH_LINKED_AD, this field will be ignored.</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時、このフィールドは必須となります。※adTypeがDYNAMIC_SEARCH_LINKED_ADの場合は無視されます。<br> SET時、adTypeがRESPONSIVE_SEARCH_ADの場合のみ更新可能です。</div> <div lang=\"en\">Landing page URL.<br> This field is required in ADD operation. *If adType is DYNAMIC_SEARCH_LINKED_AD, this field will be ignored.</div>   # noqa: E501

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

        self._final_url = final_url

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

        <div lang=\"ja\">審査中の最終リンク先URLです。<br> このフィールドは、リクエストの際には無視されます。<br> 審査中の間のみ、レスポンスの際に返却されます。</div> <div lang=\"en\">Landing page URL on editorial review.<br> This field will be ignored on input.<br> It will be returned at the time of response only during the review.</div>   # noqa: E501

        :return: The review_final_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._review_final_url

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

        <div lang=\"ja\">審査中の最終リンク先URLです。<br> このフィールドは、リクエストの際には無視されます。<br> 審査中の間のみ、レスポンスの際に返却されます。</div> <div lang=\"en\">Landing page URL on editorial review.<br> This field will be ignored on input.<br> It will be returned at the time of response only during the review.</div>   # noqa: E501

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

        self._review_final_url = review_final_url

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

        <div lang=\"ja\">最終リンク先URL（スマートフォン）です。<br> ADD時、このフィールドは省略可能となります。※adTypeがDYNAMIC_SEARCH_LINKED_ADの場合は無視されます。<br> SET時、adTypeがRESPONSIVE_SEARCH_ADの場合のみ更新可能です。</div> <div lang=\"en\">Landing page URL (Smartphone).<br> This field is optional in ADD operation. *If adType is DYNAMIC_SEARCH_LINKED_AD, this field will be ignored.</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時、このフィールドは省略可能となります。※adTypeがDYNAMIC_SEARCH_LINKED_ADの場合は無視されます。<br> SET時、adTypeがRESPONSIVE_SEARCH_ADの場合のみ更新可能です。</div> <div lang=\"en\">Landing page URL (Smartphone).<br> This field is optional in ADD operation. *If adType is DYNAMIC_SEARCH_LINKED_AD, this field will be ignored.</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 review_smartphone_final_url(self):
        """Gets the review_smartphone_final_url of this AdGroupAdServiceAd.  # noqa: E501

        <div lang=\"ja\">審査中の最終リンク先URL（スマートフォン）です。<br> このフィールドは、リクエストの際には無視されます。<br> 審査中の間のみ、レスポンスの際に返却されます。</div> <div lang=\"en\">Landing page URL (Smartphone) on editorial review.<br> This field will be ignored on input.<br> It will be returned at the time of response only during the review.</div>   # noqa: E501

        :return: The review_smartphone_final_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._review_smartphone_final_url

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

        <div lang=\"ja\">審査中の最終リンク先URL（スマートフォン）です。<br> このフィールドは、リクエストの際には無視されます。<br> 審査中の間のみ、レスポンスの際に返却されます。</div> <div lang=\"en\">Landing page URL (Smartphone) on editorial review.<br> This field will be ignored on input.<br> It will be returned at the time of response only during the review.</div>   # noqa: E501

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

        self._review_smartphone_final_url = review_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: AdGroupAdServiceIsRemove
        """
        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: AdGroupAdServiceIsRemove
        """

        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> SET時、adTypeがRESPONSIVE_SEARCH_ADの場合のみ更新可能です。</div> <div lang=\"en\">Tracking URL.<br> This field is optional in ADD operation.</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> SET時、adTypeがRESPONSIVE_SEARCH_ADの場合のみ更新可能です。</div> <div lang=\"en\">Tracking URL.<br> This field is optional in ADD operation.</div>   # noqa: E501

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

        self._tracking_url = tracking_url

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

        <div lang=\"ja\">審査中のトラッキングURLです。<br> このフィールドは、リクエストの際には無視されます。<br> 審査中の間のみ、レスポンスの際に返却されます。</div> <div lang=\"en\">Tracking URL on editorial review.<br> This field will be ignored on input.<br> It will be returned at the time of response only during the review.</div>   # noqa: E501

        :return: The review_tracking_url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._review_tracking_url

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

        <div lang=\"ja\">審査中のトラッキングURLです。<br> このフィールドは、リクエストの際には無視されます。<br> 審査中の間のみ、レスポンスの際に返却されます。</div> <div lang=\"en\">Tracking URL on editorial review.<br> This field will be ignored on input.<br> It will be returned at the time of response only during the review.</div>   # noqa: E501

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

        self._review_tracking_url = review_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: AdGroupAdServiceIsRemove
        """
        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: AdGroupAdServiceIsRemove
        """

        self._is_remove_tracking_url = is_remove_tracking_url

    @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 review_custom_parameters(self):
        """Gets the review_custom_parameters of this AdGroupAdServiceAd.  # noqa: E501


        :return: The review_custom_parameters of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceCustomParameters
        """
        return self._review_custom_parameters

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


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

        self._review_custom_parameters = review_custom_parameters

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


        :return: The device_preference of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: AdGroupAdServiceDevicePreference
        """
        return self._device_preference

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


        :param device_preference: The device_preference of this AdGroupAdServiceAd.  # noqa: E501
        :type: AdGroupAdServiceDevicePreference
        """

        self._device_preference = device_preference

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

        <div lang=\"ja\">表示URLです。<br> このフィールドは、レスポンスの際に返却されますが、リクエストの際には無視されます。</div> <div lang=\"en\">Display URL.<br> Although this field will be returned in the response, it will be ignored on input.</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> このフィールドは、レスポンスの際に返却されますが、リクエストの際には無視されます。</div> <div lang=\"en\">Display URL.<br> Although this field will be returned in the response, it will be ignored on input.</div>   # noqa: E501

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

        self._display_url = display_url

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

        <div lang=\"ja\">移行前のリンク先URLです。<br> このフィールドは、レスポンスの際に返却されますが、リクエストの際には無視されます。</div> <div lang=\"en\">Destination URL before upgrading. <br> Although this field will be returned in the response, it will be ignored on input.</div>   # noqa: E501

        :return: The url of this AdGroupAdServiceAd.  # noqa: E501
        :rtype: str
        """
        return self._url

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

        <div lang=\"ja\">移行前のリンク先URLです。<br> このフィールドは、レスポンスの際に返却されますが、リクエストの際には無視されます。</div> <div lang=\"en\">Destination URL before upgrading. <br> Although this field will be returned in the response, it will be ignored on input.</div>   # noqa: E501

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

        self._url = 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()
