# coding: utf-8

"""
    Marketing API

    <p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:</p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i> for the products they want to promote. eBay displays the ads in search results and in other marketing modules as <b>SPONSORED</b> listings. If an item in a Promoted Listings campaign sells, the seller is assessed a Promoted Listings fee, which is a seller-specified percentage applied to the sales price. For complete details, refer to the <a href=\"/api-docs/sell/static/marketing/pl-landing.html\">Promoted Listings playbook</a>.</li><li><b>Promotions Manager</b> gives sellers a way to offer discounts on specific items as a way to attract buyers to their inventory. Sellers can set up discounts (such as \"20% off\" and other types of offers) on specific items or on an entire customer order. To further attract buyers, eBay prominently displays promotion <i>teasers</i> throughout buyer flows. For complete details, see <a href=\"/api-docs/sell/static/marketing/promotions-manager.html\">Promotions Manager</a>.</li></ul>  <p><b>Marketing reports</b>, on both the Promoted Listings and Promotions Manager platforms, give sellers information that shows the effectiveness of their marketing strategies. The data gives sellers the ability to review and fine tune their marketing efforts.</p><p><b>Store Email Campaign</b> allows sellers to create and send email campaigns to customers who have signed up to receive their newsletter. For more information on email campaigns, see <a href=\"/api-docs/sell/static/marketing/store-email-campaigns.html#email-campain-types\" target=\"_blank\">Store Email Campaigns</a>.<p class=\"tablenote\"><b>Important!</b> Sellers must have an active eBay Store subscription, and they must accept the <b>Terms and Conditions</b> before they can make requests to these APIs in the Production environment. There are also site-specific listings requirements and restrictions associated with these marketing tools, as listed in the \"requirements and restrictions\" sections for <a href=\"/api-docs/sell/marketing/static/overview.html#PL-requirements\">Promoted Listings</a> and <a href=\"/api-docs/sell/marketing/static/overview.html#PM-requirements\">Promotions Manager</a>.</p> <p>The table below lists all the Marketing API calls grouped by resource.</p>  # noqa: E501

    OpenAPI spec version: v1.22.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class FundingStrategy(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'ad_rate_strategy': 'str',
        'bidding_strategy': 'str',
        'bid_percentage': 'str',
        'bid_preferences': 'list[BidPreference]',
        'dynamic_ad_rate_preferences': 'list[DynamicAdRatePreference]',
        'funding_model': 'str'
    }

    attribute_map = {
        'ad_rate_strategy': 'adRateStrategy',
        'bidding_strategy': 'biddingStrategy',
        'bid_percentage': 'bidPercentage',
        'bid_preferences': 'bidPreferences',
        'dynamic_ad_rate_preferences': 'dynamicAdRatePreferences',
        'funding_model': 'fundingModel'
    }

    def __init__(self, ad_rate_strategy=None, bidding_strategy=None, bid_percentage=None, bid_preferences=None, dynamic_ad_rate_preferences=None, funding_model=None):  # noqa: E501
        """FundingStrategy - a model defined in Swagger"""  # noqa: E501
        self._ad_rate_strategy = None
        self._bidding_strategy = None
        self._bid_percentage = None
        self._bid_preferences = None
        self._dynamic_ad_rate_preferences = None
        self._funding_model = None
        self.discriminator = None
        if ad_rate_strategy is not None:
            self.ad_rate_strategy = ad_rate_strategy
        if bidding_strategy is not None:
            self.bidding_strategy = bidding_strategy
        if bid_percentage is not None:
            self.bid_percentage = bid_percentage
        if bid_preferences is not None:
            self.bid_preferences = bid_preferences
        if dynamic_ad_rate_preferences is not None:
            self.dynamic_ad_rate_preferences = dynamic_ad_rate_preferences
        if funding_model is not None:
            self.funding_model = funding_model

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

        This field is used to set the ad rate strategy for a Cost Per Sale (CPS) campaign.<br><br>The default value for this field is <code>FIXED</code>. If this field is omitted, the default value will be used.<br><br><span class=\"tablenote\"><b>Note:</b> This field is not applicable for Cost Per Click (CPC) or offsite campaigns.</span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/marketing/types/pls:AdRateStrategyEnum'>eBay API documentation</a>  # noqa: E501

        :return: The ad_rate_strategy of this FundingStrategy.  # noqa: E501
        :rtype: str
        """
        return self._ad_rate_strategy

    @ad_rate_strategy.setter
    def ad_rate_strategy(self, ad_rate_strategy):
        """Sets the ad_rate_strategy of this FundingStrategy.

        This field is used to set the ad rate strategy for a Cost Per Sale (CPS) campaign.<br><br>The default value for this field is <code>FIXED</code>. If this field is omitted, the default value will be used.<br><br><span class=\"tablenote\"><b>Note:</b> This field is not applicable for Cost Per Click (CPC) or offsite campaigns.</span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/marketing/types/pls:AdRateStrategyEnum'>eBay API documentation</a>  # noqa: E501

        :param ad_rate_strategy: The ad_rate_strategy of this FundingStrategy.  # noqa: E501
        :type: str
        """

        self._ad_rate_strategy = ad_rate_strategy

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

        Indicates the bidding strategy for an onsite Cost Per Click (CPC) campaign that uses manual targeting.<br><br><span class=\"tablenote\"><b>Note:</b> This field is not applicable for smart targeting campaigns.</span><br>Valid values are:<ul><li><code>FIXED</code><br><br>When using a fixed bidding strategy, sellers manually assign and adjust keyword bids for the CPC campaign.</li><li><code>DYNAMIC</code><br><br>When using a dynamic bidding strategy, eBay manages the campaign's keyword bids and automatically updates them daily to the suggested bid.<br><br><span class=\"tablenote\"><b>Note:</b> For a CPC campaign using dynamic bidding, sellers can continue to manually add keywords for the campaign, but they are no longer able to manually adjust their associated bid values. In order to manually adjust bid values, sellers must use the <code>FIXED</code> bidding strategy.</span></li></ul><br><b>Default value:</b> FIXED For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/marketing/types/pls:BiddingStrategyEnum'>eBay API documentation</a>  # noqa: E501

        :return: The bidding_strategy of this FundingStrategy.  # noqa: E501
        :rtype: str
        """
        return self._bidding_strategy

    @bidding_strategy.setter
    def bidding_strategy(self, bidding_strategy):
        """Sets the bidding_strategy of this FundingStrategy.

        Indicates the bidding strategy for an onsite Cost Per Click (CPC) campaign that uses manual targeting.<br><br><span class=\"tablenote\"><b>Note:</b> This field is not applicable for smart targeting campaigns.</span><br>Valid values are:<ul><li><code>FIXED</code><br><br>When using a fixed bidding strategy, sellers manually assign and adjust keyword bids for the CPC campaign.</li><li><code>DYNAMIC</code><br><br>When using a dynamic bidding strategy, eBay manages the campaign's keyword bids and automatically updates them daily to the suggested bid.<br><br><span class=\"tablenote\"><b>Note:</b> For a CPC campaign using dynamic bidding, sellers can continue to manually add keywords for the campaign, but they are no longer able to manually adjust their associated bid values. In order to manually adjust bid values, sellers must use the <code>FIXED</code> bidding strategy.</span></li></ul><br><b>Default value:</b> FIXED For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/marketing/types/pls:BiddingStrategyEnum'>eBay API documentation</a>  # noqa: E501

        :param bidding_strategy: The bidding_strategy of this FundingStrategy.  # noqa: E501
        :type: str
        """

        self._bidding_strategy = bidding_strategy

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

        The user-defined <b>bid percentage</b> (also known as the <i>ad rate</i>) sets the level that eBay increases the visibility in search results for the associated listing. The higher the <b>bidPercentage</b> value, the more eBay promotes the listing.  <br><br>The value specified here is also used to calculate the Promoted Listings fee. This percentage value is multiplied by the final sales price to determine the fee. <br><br>The Promoted Listings fee is determined at the time the transaction completes and the seller is assessed the fee only when an item sells through a Promoted Listings ad campaign. <br><br>The <b>bidPercentage</b> is a single precision value that is guided by the following rules: <ul><li>These values are <b>valid</b>:<br>&nbsp;&nbsp;&nbsp;<code>4.1</code>, &nbsp;&nbsp;&nbsp;<code>5.0</code>, &nbsp;&nbsp;&nbsp;<code>5.5</code>, ...</li>  <li>These values are <b>not valid</b>:<br /> &nbsp;&nbsp;&nbsp;<code>0.01</code>, &nbsp;&nbsp;&nbsp;<code>10.75</code>, &nbsp;&nbsp;&nbsp;<code>99.99</code>,<br /> &nbsp;&nbsp;&nbsp;and so on.</li></ul>This is the default bid percentage for the campaigns using the Cost Per Sale (CPS) funding model, and this value will be overridden by any ads in the campaign that have their own set bid percentages.<br /><br />If a bid percentage is not provided for an ad, eBay uses the default bid percentage of the associated campaign.<br /><br /><span class=\"tablenote\"><b>Note:</b>This field is only relevant for campaigns that use the CPS funding model and a fixed ad rate. It is not used for campaigns that use the Cost Per Click (CPC) funding model and should not be provided when the selected adRateStrategy for the campaign is dynamic.</span><br><br><span class=\"tablenote\"><b>Note:</b> This field has a minimum value of <code>2.0</code> and a maximum value of <code>100.0</code>.</span>  # noqa: E501

        :return: The bid_percentage of this FundingStrategy.  # noqa: E501
        :rtype: str
        """
        return self._bid_percentage

    @bid_percentage.setter
    def bid_percentage(self, bid_percentage):
        """Sets the bid_percentage of this FundingStrategy.

        The user-defined <b>bid percentage</b> (also known as the <i>ad rate</i>) sets the level that eBay increases the visibility in search results for the associated listing. The higher the <b>bidPercentage</b> value, the more eBay promotes the listing.  <br><br>The value specified here is also used to calculate the Promoted Listings fee. This percentage value is multiplied by the final sales price to determine the fee. <br><br>The Promoted Listings fee is determined at the time the transaction completes and the seller is assessed the fee only when an item sells through a Promoted Listings ad campaign. <br><br>The <b>bidPercentage</b> is a single precision value that is guided by the following rules: <ul><li>These values are <b>valid</b>:<br>&nbsp;&nbsp;&nbsp;<code>4.1</code>, &nbsp;&nbsp;&nbsp;<code>5.0</code>, &nbsp;&nbsp;&nbsp;<code>5.5</code>, ...</li>  <li>These values are <b>not valid</b>:<br /> &nbsp;&nbsp;&nbsp;<code>0.01</code>, &nbsp;&nbsp;&nbsp;<code>10.75</code>, &nbsp;&nbsp;&nbsp;<code>99.99</code>,<br /> &nbsp;&nbsp;&nbsp;and so on.</li></ul>This is the default bid percentage for the campaigns using the Cost Per Sale (CPS) funding model, and this value will be overridden by any ads in the campaign that have their own set bid percentages.<br /><br />If a bid percentage is not provided for an ad, eBay uses the default bid percentage of the associated campaign.<br /><br /><span class=\"tablenote\"><b>Note:</b>This field is only relevant for campaigns that use the CPS funding model and a fixed ad rate. It is not used for campaigns that use the Cost Per Click (CPC) funding model and should not be provided when the selected adRateStrategy for the campaign is dynamic.</span><br><br><span class=\"tablenote\"><b>Note:</b> This field has a minimum value of <code>2.0</code> and a maximum value of <code>100.0</code>.</span>  # noqa: E501

        :param bid_percentage: The bid_percentage of this FundingStrategy.  # noqa: E501
        :type: str
        """

        self._bid_percentage = bid_percentage

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

        This container indicates the bidding preferences of the campaign, such as the maximum CPC amount.<br><br><span class=\"tablenote\"><b>Note:</b> This container is only applicable for smart targeting campaigns.</span><br>This container is required if the user wants to create a Smart Targeting campaign.  # noqa: E501

        :return: The bid_preferences of this FundingStrategy.  # noqa: E501
        :rtype: list[BidPreference]
        """
        return self._bid_preferences

    @bid_preferences.setter
    def bid_preferences(self, bid_preferences):
        """Sets the bid_preferences of this FundingStrategy.

        This container indicates the bidding preferences of the campaign, such as the maximum CPC amount.<br><br><span class=\"tablenote\"><b>Note:</b> This container is only applicable for smart targeting campaigns.</span><br>This container is required if the user wants to create a Smart Targeting campaign.  # noqa: E501

        :param bid_preferences: The bid_preferences of this FundingStrategy.  # noqa: E501
        :type: list[BidPreference]
        """

        self._bid_preferences = bid_preferences

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

        A field that indicates whether a single, user-defined bid percentage (also known as the <i>ad rate</i>) should be used, or whether eBay should automatically adjust listings to maintain the daily suggested bid percentage.<br /><br /><span class=\"tablenote\"><span style=\"color:#004680\"><strong>Note:</strong></span> Dynamic adjustment is only applicable when the <b>adRateStrategy</b> is set to <code>DYNAMIC</code> This field is not applicable for offsite campaigns.</span><br /><b>Default:</b> <code>FIXED</code>  # noqa: E501

        :return: The dynamic_ad_rate_preferences of this FundingStrategy.  # noqa: E501
        :rtype: list[DynamicAdRatePreference]
        """
        return self._dynamic_ad_rate_preferences

    @dynamic_ad_rate_preferences.setter
    def dynamic_ad_rate_preferences(self, dynamic_ad_rate_preferences):
        """Sets the dynamic_ad_rate_preferences of this FundingStrategy.

        A field that indicates whether a single, user-defined bid percentage (also known as the <i>ad rate</i>) should be used, or whether eBay should automatically adjust listings to maintain the daily suggested bid percentage.<br /><br /><span class=\"tablenote\"><span style=\"color:#004680\"><strong>Note:</strong></span> Dynamic adjustment is only applicable when the <b>adRateStrategy</b> is set to <code>DYNAMIC</code> This field is not applicable for offsite campaigns.</span><br /><b>Default:</b> <code>FIXED</code>  # noqa: E501

        :param dynamic_ad_rate_preferences: The dynamic_ad_rate_preferences of this FundingStrategy.  # noqa: E501
        :type: list[DynamicAdRatePreference]
        """

        self._dynamic_ad_rate_preferences = dynamic_ad_rate_preferences

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

        Indicates the model that eBay uses to calculate the Promoted Listings fee. <p>For a description of the funding model types, refer to <b>FundingModelTypeEnum</b>. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/marketing/types/pls:FundingModelEnum'>eBay API documentation</a>  # noqa: E501

        :return: The funding_model of this FundingStrategy.  # noqa: E501
        :rtype: str
        """
        return self._funding_model

    @funding_model.setter
    def funding_model(self, funding_model):
        """Sets the funding_model of this FundingStrategy.

        Indicates the model that eBay uses to calculate the Promoted Listings fee. <p>For a description of the funding model types, refer to <b>FundingModelTypeEnum</b>. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/marketing/types/pls:FundingModelEnum'>eBay API documentation</a>  # noqa: E501

        :param funding_model: The funding_model of this FundingStrategy.  # noqa: E501
        :type: str
        """

        self._funding_model = funding_model

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(FundingStrategy, dict):
            for key, value in self.items():
                result[key] = 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, FundingStrategy):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
