# coding: utf-8

"""
    Pinterest REST API

    Pinterest's REST API

    The version of the OpenAPI document: 5.23.0
    Contact: blah+oapicf@cliffano.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class BudgetType(str, Enum):
    """
    Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. For CBO campaigns, only \"CBO_ADGROUP\" is allowed. For WEB_SESSIONS campaigns, only \"LIFETIME\" is allowed. For update, only draft ad groups may update budget type.
    """

    """
    allowed enum values
    """
    DAILY = 'DAILY'
    LIFETIME = 'LIFETIME'
    CBO_ADGROUP = 'CBO_ADGROUP'

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of BudgetType from a JSON string"""
        return cls(json.loads(json_str))


