# coding: utf-8

"""
    Mentortools Access Server

    Mentortools service for Access Packages with lazy access resolution

    The version of the OpenAPI document: 0.1.0
    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 RelativeTo(str, Enum):
    """
    What a rule's ``unlock_delay_ms`` counts from.  ``purchase`` — the grant (``granted_at``); today's behavior and the default. ``parent`` — the parent resource's resolved unlock instant. ``previous`` — the previous sibling's resolved unlock instant (drip chains: \"7 days after the previous module\"); inserting a node re-times the whole chain with no manual edits. Falls back parent → purchase when no such node resolves.
    """

    """
    allowed enum values
    """
    PURCHASE = 'purchase'
    PARENT = 'parent'
    PREVIOUS = 'previous'

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


