
    i?B                        d Z ddlmZ  G d de          Z G d dee          Z G d de          Z G d	 d
e          Z G d de          Z G d de          Z	 G d de          Z
 G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Zg dZd S )!z-Enumerations for different types in the RFCs.    )Enumc                       e Zd ZdZd ZdS )r   zEnum class that can be pickled.c                      | j         | j        ffS )zFor pickling.)	__class___name_)self_ps     J/root/projects/butler/venv/lib/python3.11/site-packages/icalendar/enums.py__reduce_ex__zEnum.__reduce_ex__	   s    ~~--    N)__name__
__module____qualname____doc__r    r   r
   r   r      s)        )). . . . .r   r   c                       e Zd ZdZdefdZdS )StrEnumzEnum for strings.returnc                     | j         S )zcConvert to a string.

        This is needed when we set the value directly in components.
        )value)r   s    r
   __str__zStrEnum.__str__   s    
 zr   N)r   r   r   r   strr   r   r   r
   r   r      s5              r   r   c                   .    e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )
PARTSTATa  Enum for PARTSTAT from :rfc:`5545`.

    Values:
        ``NEEDS_ACTION``,
        ``ACCEPTED``,
        ``DECLINED``,
        ``TENTATIVE``,
        ``DELEGATED``,
        ``COMPLETED``,
        ``IN_PROCESS``

    Purpose:
        To specify the participation status for the calendar user
        specified by the property.

    Description:
        This parameter can be specified on properties with a
        CAL-ADDRESS value type.  The parameter identifies the
        participation status for the calendar user specified by the
        property value.  The parameter values differ depending on whether
        they are associated with a group-scheduled "VEVENT", "VTODO", or
        "VJOURNAL".  The values MUST match one of the values allowed for
        the given calendar component.  If not specified on a property that
        allows this parameter, the default value is NEEDS-ACTION.
        Applications MUST treat x-name and iana-token values they don't
        recognize the same way as they would the NEEDS-ACTION value.
    NEEDS-ACTIONACCEPTEDDECLINED	TENTATIVE	DELEGATED	COMPLETED
IN-PROCESSN)r   r   r   r   NEEDS_ACTIONr   r   r   r   r    
IN_PROCESSr   r   r
   r   r      s=         8 "LHHIIIJJJr   r   c                   2    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
S )STATUSaE  Enum for STATUS from :rfc:`5545`.

    Values for :class:`icalendar.cal.event.Event`:
        ``CONFIRMED``,
        ``TENTATIVE``,
        ``CANCELLED``

    Values for :class:`icalendar.cal.todo.Todo`:
        ``NEEDS_ACTION``,
        ``COMPLETED``,
        ``IN_PROCESS``,
        ``CANCELLED``

    Values for :class:`icalendar.cal.journal.Journal`:
        ``DRAFT``,
        ``FINAL``,
        ``CANCELLED``

    Description:
        In a group-scheduled calendar component, the property
        is used by the "Organizer" to provide a confirmation of the event
        to the "Attendees".  For example in a "VEVENT" calendar component,
        the "Organizer" can indicate that a meeting is tentative,
        confirmed, or cancelled.  In a "VTODO" calendar component, the
        "Organizer" can indicate that an action item needs action, is
        completed, is in process or being worked on, or has been
        cancelled.  In a "VJOURNAL" calendar component, the "Organizer"
        can indicate that a journal entry is draft, final, or has been
        cancelled or removed.
    r   	CONFIRMED	CANCELLEDr   r    r!   DRAFTFINALN)r   r   r   r   r   r&   r'   r"   r    r#   r(   r)   r   r   r
   r%   r%   ?   sG         @ III "LIJ EEEEr   r%   c                   "    e Zd ZdZdZdZdZdZdS )FBTYPEa!  Enum for FBTYPE from :rfc:`5545`.

    Values:
        ``FREE``,
        ``BUSY``,
        ``BUSY_UNAVAILABLE``,
        ``BUSY_TENTATIVE``

    See also :class:`BUSYTYPE`.

    Purpose:
        To specify the free or busy time type.

    Description:
        This parameter specifies the free or busy time type.
        The value FREE indicates that the time interval is free for
        scheduling.  The value BUSY indicates that the time interval is
        busy because one or more events have been scheduled for that
        interval.  The value BUSY-UNAVAILABLE indicates that the time
        interval is busy and that the interval can not be scheduled.  The
        value BUSY-TENTATIVE indicates that the time interval is busy
        because one or more events have been tentatively scheduled for
        that interval.  If not specified on a property that allows this
        parameter, the default is BUSY.  Applications MUST treat x-name
        and iana-token values they don't recognize the same way as they
        would the BUSY value.
    FREEBUSYBUSY-UNAVAILABLEBUSY-TENTATIVEN)r   r   r   r   r,   r-   BUSY_UNAVAILABLEBUSY_TENTATIVEr   r   r
   r+   r+   p   s/         8 DD)%NNNr   r+   c                   &    e Zd ZdZdZdZdZdZdZdS )CUTYPEa  Enum for CTYPE from :rfc:`5545`.

    Values:
        ``INDIVIDUAL``,
        ``GROUP``,
        ``RESOURCE``,
        ``ROOM``,
        ``UNKNOWN``

    Purpose:
        To identify the type of calendar user specified by the property.

    Description:
        This parameter can be specified on properties with a
        CAL-ADDRESS value type.  The parameter identifies the type of
        calendar user specified by the property.  If not specified on a
        property that allows this parameter, the default is INDIVIDUAL.
        Applications MUST treat x-name and iana-token values they don't
        recognize the same way as they would the UNKNOWN value.
    
INDIVIDUALGROUPRESOURCEROOMUNKNOWNN)	r   r   r   r   r4   r5   r6   r7   r8   r   r   r
   r3   r3      s3         * JEHDGGGr   r3   c                   B    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdS )RELTYPEa  Enum for RELTYPE from :rfc:`5545`.

    Values:
        ``PARENT``,
        ``CHILD``,
        ``SIBLING``,
        ``FINISHTOSTART``,
        ``FINISHTOFINISH``,
        ``STARTTOFINISH``,
        ``STARTTOSTART``,
        ``FIRST``,
        ``NEXT``,
        ``DEPENDS-ON``,
        ``REFID``,
        ``CONCEPT``

    Purpose:
        To specify the type of hierarchical relationship associated
        with the calendar component specified by the property.

    Description:
        This parameter can be specified on a property that
        references another related calendar.  The parameter specifies the
        hierarchical relationship type of the calendar component
        referenced by the property.  The parameter value can be PARENT, to
        indicate that the referenced calendar component is a superior of
        calendar component; CHILD to indicate that the referenced calendar
        component is a subordinate of the calendar component; or SIBLING
        to indicate that the referenced calendar component is a peer of
        the calendar component.  If this parameter is not specified on an
        allowable property, the default relationship type is PARENT.
        Applications MUST treat x-name and iana-token values they don't
        recognize the same way as they would the PARENT value.

    New Temporal RELTYPE Parameter Values (:rfc:`9253`):
        RELTYPE=FINISHTOSTART
            Task-B cannot start until Task-A finishes.
            For example, when painting is complete, carpet laying can begin.
        RELTYPE=FINISHTOFINISH
            Task-B can only be completed after Task-A is finished.
            The related tasks may run in parallel before completion.
        RELTYPE=STARTTOFINISH
            The start of Task-A (which occurs after Task-B) controls the
            finish of Task-B. For example, ticket sales (Task-B) end
            after the game starts (Task-A).
        RELTYPE=STARTTOSTART
            The start of Task-A triggers the start of Task-B,
            that is, Task-B can start anytime after Task-A starts.

    Additional New RELTYPE Parameter Values (:rfc:`9253`):
        RELTYPE=FIRST
            This indicates that the referenced calendar component is
            the first in a series the referencing calendar component
            is part of.
        RELTYPE=NEXT
            This indicates that the referenced calendar component
            is the next in a series the referencing calendar component
            is part of.
        RELTYPE=DEPENDS-ON
            This indicates that the current calendar component
            depends on the referenced calendar component in some manner.
            For example, a task may be blocked waiting on the other,
            referenced, task.
        RELTYPE=REFID
            This establishes a reference from the current component to
            components with a REFID property that matches the value given
            in the associated RELATED-TO property.
        RELTYPE=CONCEPT
            This establishes a reference from the current component to
            components with a CONCEPT property that matches the value
            given in the associated RELATED-TO property.

        Note that the relationship types of PARENT, CHILD, and SIBLING
        establish a hierarchical relationship. The new types of FIRST
        and NEXT are an ordering relationship.

    Examples:
        The following is an example from :rfc:`5545`:

        .. code-block:: ics

            RELATED-TO;RELTYPE=SIBLING:19960401-080045-4000F192713@
             example.com

        Usage inside of RELATED-TO according to :rfc:`9253`:

        .. code-block:: ics

            RELATED-TO;VALUE=URI;RELTYPE=STARTTOFINISH:
             https://example.com/caldav/user/jb/cal/
             19960401-080045-4000F192713.ics
    PARENTCHILDSIBLINGFINISHTOSTARTFINISHTOFINISHSTARTTOFINISHSTARTTOSTARTFIRSTNEXTz
DEPENDS-ONREFIDCONCEPTN)r   r   r   r   r;   r<   r=   r>   r?   r@   rA   rB   rC   
DEPENDS_ONrD   rE   r   r   r
   r:   r:      sY        [ [z FEG#M%N#M!LEDJEGGGr   r:   c                       e Zd ZdZdZdZdS )RANGEa>  Enum for RANGE from :rfc:`5545`.

    Values:
        ``THISANDFUTURE``,
        ``THISANDPRIOR`` (deprecated)

    Purpose:
        To specify the effective range of recurrence instances from
        the instance specified by the recurrence identifier specified by
        the property.

    Description:
        This parameter can be specified on a property that
        specifies a recurrence identifier.  The parameter specifies the
        effective range of recurrence instances that is specified by the
        property.  The effective range is from the recurrence identifier
        specified by the property.  If this parameter is not specified on
        an allowed property, then the default range is the single instance
        specified by the recurrence identifier value of the property.  The
        parameter value can only be "THISANDFUTURE" to indicate a range
        defined by the recurrence identifier and all subsequent instances.
        The value "THISANDPRIOR" is deprecated by this revision of
        iCalendar and MUST NOT be generated by applications.
    THISANDFUTURETHISANDPRIORN)r   r   r   r   rI   rJ   r   r   r
   rH   rH     s$         2 $M!LLLr   rH   c                       e Zd ZdZdZdZdS )RELATEDa%  Enum for RELATED from :rfc:`5545`.

    Values:
        ``START``,
        ``END``

    Purpose:
        To specify the relationship of the alarm trigger with
        respect to the start or end of the calendar component.

    Description:
        This parameter can be specified on properties that
        specify an alarm trigger with a "DURATION" value type.  The
        parameter specifies whether the alarm will trigger relative to the
        start or end of the calendar component.  The parameter value START
        will set the alarm to trigger off the start of the calendar
        component; the parameter value END will set the alarm to trigger
        off the end of the calendar component.  If the parameter is not
        specified on an allowable property, then the default is START.
    STARTENDN)r   r   r   r   rM   rN   r   r   r
   rL   rL   :  s$         * E
CCCr   rL   c                   "    e Zd ZdZdZdZdZdZdS )ROLEa  Enum for ROLE from :rfc:`5545`.

    Values:
        ``CHAIR``,
        ``REQ_PARTICIPANT``,
        ``OPT_PARTICIPANT``,
        ``NON_PARTICIPANT``

    Purpose:
        To specify the participation role for the calendar user
        specified by the property.

    Description:
        This parameter can be specified on properties with a
        CAL-ADDRESS value type.  The parameter specifies the participation
        role for the calendar user specified by the property in the group
        schedule calendar component.  If not specified on a property that
        allows this parameter, the default value is REQ-PARTICIPANT.
        Applications MUST treat x-name and iana-token values they don't
        recognize the same way as they would the REQ-PARTICIPANT value.

    CHAIRzREQ-PARTICIPANTzOPT-PARTICIPANTzNON-PARTICIPANTN)r   r   r   r   rQ   REQ_PARTICIPANTOPT_PARTICIPANTNON_PARTICIPANTr   r   r
   rP   rP   T  s.         . E'O'O'OOOr   rP   c                   F    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdS )VALUEa  VALUE datatypes as defined in :rfc:`5545`.

    Attributes: ``BOOLEAN``, ``CAL_ADDRESS``, ``DATE``, ``DATE_TIME``, ``DURATION``,
    ``FLOAT``, ``INTEGER``, ``PERIOD``, ``RECUR``, ``TEXT``, ``TIME``, ``URI``,
    ``UTC_OFFSET``

    Description:
        This parameter specifies the value type and format of
        the property value.  The property values MUST be of a single value
        type.  For example, a "RDATE" property cannot have a combination
        of DATE-TIME and TIME value types.

        If the property's value is the default value type, then this
        parameter need not be specified.  However, if the property's
        default value type is overridden by some other allowable value
        type, then this parameter MUST be specified.

        Applications MUST preserve the value data for x-name and iana-
        token values that they don't recognize without attempting to
        interpret or parse the value data.

    BOOLEANzCAL-ADDRESSDATEz	DATE-TIMEDURATIONFLOATINTEGERPERIODRECURTEXTTIMEURIz
UTC-OFFSETN)r   r   r   r   rW   CAL_ADDRESSrX   	DATE_TIMErY   rZ   r[   r\   r]   r^   r_   r`   
UTC_OFFSETr   r   r
   rV   rV   r  s[         . GKDIHEGFEDD
CJJJr   rV   c                       e Zd ZdZdZdZdZdS )BUSYTYPEa  Enum for BUSYTYPE from :rfc:`7953`.

    Values:
        ``BUSY``,
        ``BUSY_UNAVAILABLE``,
        ``BUSY_TENTATIVE``

    Description:
        This property is used to specify the default busy time
        type.  The values correspond to those used by the :class:`FBTYPE`
        parameter used on a "FREEBUSY" property, with the exception that
        the "FREE" value is not used in this property.  If not specified
        on a component that allows this property, the default is "BUSY-
        UNAVAILABLE".

    Example:
        The following is an example of this property:

        .. code-block:: ics

            BUSYTYPE:BUSY
    r-   r.   r/   N)r   r   r   r   r-   r0   r1   r   r   r
   re   re     s*         . D)%NNNr   re   c                       e Zd ZdZdZdZdZdS )CLASSa~  Enum for CLASS from :rfc:`5545`.

    Values:
        ``PUBLIC``,
        ``PRIVATE``,
        ``CONFIDENTIAL``

    Description:
        An access classification is only one component of the
        general security system within a calendar application.  It
        provides a method of capturing the scope of the access the
        calendar owner intends for information within an individual
        calendar entry.  The access classification of an individual
        iCalendar component is useful when measured along with the other
        security components of a calendar system (e.g., calendar user
        authentication, authorization, access rights, access role, etc.).
        Hence, the semantics of the individual access classifications
        cannot be completely defined by this memo alone.  Additionally,
        due to the "blind" nature of most exchange processes using this
        memo, these access classifications cannot serve as an enforcement
        statement for a system receiving an iCalendar object.  Rather,
        they provide a method for capturing the intention of the calendar
        owner for the access to the calendar component.  If not specified
        in a component that allows this property, the default value is
        PUBLIC.  Applications MUST treat x-name and iana-token values they
        don't recognize the same way as they would the PRIVATE value.
    PUBLICPRIVATECONFIDENTIALN)r   r   r   r   rh   ri   rj   r   r   r
   rg   rg     s)         8 FG!LLLr   rg   c                       e Zd ZdZdZdZdS )TRANSPaz  Enum for TRANSP from :rfc:`5545`.

    Values:
        ``OPAQUE``,
        ``TRANSPARENT``

    Description:
        Time Transparency is the characteristic of an event
        that determines whether it appears to consume time on a calendar.
        Events that consume actual time for the individual or resource
        associated with the calendar SHOULD be recorded as OPAQUE,
        allowing them to be detected by free/busy time searches.  Other
        events, which do not take up the individual's (or resource's) time
        SHOULD be recorded as TRANSPARENT, making them invisible to free/
        busy time searches.
    OPAQUETRANSPARENTN)r   r   r   r   rm   rn   r   r   r
   rl   rl     s$         " FKKKr   rl   )re   rg   r3   r+   r   rH   rL   r:   rP   r%   rl   rV   N)r   enumr   _Enumr   r   r   r%   r+   r3   r:   rH   rL   rP   rV   re   rg   rl   __all__r   r   r
   <module>rr      s   3 3      . . . . .5 . . .    c4   # # # # #w # # #L- - - - -W - - -b &  &  &  &  &W  &  &  &F    W   :i i i i ig i i iX" " " " "G " " "<    g   4( ( ( ( (7 ( ( (<$ $ $ $ $G $ $ $N& & & & &w & & &:" " " " "G " " "D         W      ,  r   