o
    ɶd
                     @   s8   d dl mZmZmZ d dlmZ eG dd deZdS )    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s   e Zd ZdZdZdZdZdZdZdd Z	e
d	d
 Zedd Zejdd Zedd Zejdd Zedd Zejdd Zdd Zdd Zdd ZdS )Schedulez&
    Schedule for scheduled task.
    FIXED_FREQUENCYCRON
RETRY_ONCERETRY_INDEFINITELYSKIPc                 K   s2   dddd| _ dddd| _d| _d| _d| _dS )aG  
        Initializes a new Schedule object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
        to a service operations then you should favor using a subclass over the base class:

        * :class:`~oci.log_analytics.models.CronSchedule`
        * :class:`~oci.log_analytics.models.FixedFrequencySchedule`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param type:
            The value to assign to the type property of this Schedule.
            Allowed values for this property are: "FIXED_FREQUENCY", "CRON", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type type: str

        :param misfire_policy:
            The value to assign to the misfire_policy property of this Schedule.
            Allowed values for this property are: "RETRY_ONCE", "RETRY_INDEFINITELY", "SKIP", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type misfire_policy: str

        :param time_of_first_execution:
            The value to assign to the time_of_first_execution property of this Schedule.
        :type time_of_first_execution: datetime

        strdatetime)typemisfire_policytime_of_first_executionr   ZmisfirePolicyZtimeOfFirstExecutionN)Zswagger_typesZattribute_map_type_misfire_policy_time_of_first_execution)selfkwargs r   Eusr/lib/python3.10/site-packages/oci/log_analytics/models/schedule.py__init__&   s   
zSchedule.__init__c                 C   s$   | d }|dkr
dS |dkrdS dS )z
        Given the hash representation of a subtype of this class,
        use the info in the hash to return the class of the subtype.
        r   r   ZCronScheduler   ZFixedFrequencyScheduler   r   )Zobject_dictionaryr   r   r   r   get_subtypeQ   s   zSchedule.get_subtypec                 C      | j S )ae  
        **[Required]** Gets the type of this Schedule.
        Schedule type discriminator.

        Allowed values for this property are: "FIXED_FREQUENCY", "CRON", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The type of this Schedule.
        :rtype: str
        )r   r   r   r   r   r   a      zSchedule.typec                 C   s    ddg}t ||sd}|| _dS )z
        Sets the type of this Schedule.
        Schedule type discriminator.


        :param type: The type of this Schedule.
        :type: str
        r   r   UNKNOWN_ENUM_VALUEN)r   r   )r   r   allowed_valuesr   r   r   r   p      


c                 C   r   )a}  
        Gets the misfire_policy of this Schedule.
        Schedule misfire retry policy.

        Allowed values for this property are: "RETRY_ONCE", "RETRY_INDEFINITELY", "SKIP", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The misfire_policy of this Schedule.
        :rtype: str
        )r   r   r   r   r   r      r   zSchedule.misfire_policyc                 C   s    g d}t ||sd}|| _dS )z
        Sets the misfire_policy of this Schedule.
        Schedule misfire retry policy.


        :param misfire_policy: The misfire_policy of this Schedule.
        :type: str
        )r	   r
   r   r   N)r   r   )r   r   r   r   r   r   r      r   c                 C   r   )aD  
        Gets the time_of_first_execution of this Schedule.
        The date and time the scheduled task should execute first time after create or update;
        thereafter the task will execute as specified in the schedule.


        :return: The time_of_first_execution of this Schedule.
        :rtype: datetime
        r   r   r   r   r   r      s   z Schedule.time_of_first_executionc                 C   s
   || _ dS )aZ  
        Sets the time_of_first_execution of this Schedule.
        The date and time the scheduled task should execute first time after create or update;
        thereafter the task will execute as specified in the schedule.


        :param time_of_first_execution: The time_of_first_execution of this Schedule.
        :type: datetime
        Nr    )r   r   r   r   r   r      s   
c                 C   s   t | S N)r   r   r   r   r   __repr__   s   zSchedule.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r   otherr   r   r   __eq__   s   zSchedule.__eq__c                 C   s
   | |k S r!   r   r$   r   r   r   __ne__   s   
zSchedule.__ne__N)__name__
__module____qualname____doc__ZTYPE_FIXED_FREQUENCYZ	TYPE_CRONZMISFIRE_POLICY_RETRY_ONCEZ!MISFIRE_POLICY_RETRY_INDEFINITELYZMISFIRE_POLICY_SKIPr   staticmethodr   propertyr   setterr   r   r"   r&   r'   r   r   r   r   r      s2    +






r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r   r   r   r   <module>   s   