o
    ɶdA                     @   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                   @   sD  e Zd ZdZdZdZdZdZ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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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e	d#d$ Zejd%d$ Zd&d' Zd(d) Zd*d+ Zd,S )-MaintenanceWindowz
    The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
    NO_PREFERENCECUSTOM_PREFERENCEROLLING
NONROLLINGc                 K   sx   ddddddddddd
| _ dd	d
dddddddd
| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d| _dS )a%	  
        Initializes a new MaintenanceWindow object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

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

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

        :param is_custom_action_timeout_enabled:
            The value to assign to the is_custom_action_timeout_enabled property of this MaintenanceWindow.
        :type is_custom_action_timeout_enabled: bool

        :param custom_action_timeout_in_mins:
            The value to assign to the custom_action_timeout_in_mins property of this MaintenanceWindow.
        :type custom_action_timeout_in_mins: int

        :param is_monthly_patching_enabled:
            The value to assign to the is_monthly_patching_enabled property of this MaintenanceWindow.
        :type is_monthly_patching_enabled: bool

        :param months:
            The value to assign to the months property of this MaintenanceWindow.
        :type months: list[oci.database.models.Month]

        :param weeks_of_month:
            The value to assign to the weeks_of_month property of this MaintenanceWindow.
        :type weeks_of_month: list[int]

        :param days_of_week:
            The value to assign to the days_of_week property of this MaintenanceWindow.
        :type days_of_week: list[oci.database.models.DayOfWeek]

        :param hours_of_day:
            The value to assign to the hours_of_day property of this MaintenanceWindow.
        :type hours_of_day: list[int]

        :param lead_time_in_weeks:
            The value to assign to the lead_time_in_weeks property of this MaintenanceWindow.
        :type lead_time_in_weeks: int

        strboolintzlist[Month]z	list[int]zlist[DayOfWeek])

preferencepatching_mode is_custom_action_timeout_enabledcustom_action_timeout_in_minsis_monthly_patching_enabledmonthsweeks_of_monthdays_of_weekhours_of_daylead_time_in_weeksr   ZpatchingModeZisCustomActionTimeoutEnabledZcustomActionTimeoutInMinsZisMonthlyPatchingEnabledr   ZweeksOfMonthZ
daysOfWeekZ
hoursOfDayZleadTimeInWeeksN)Zswagger_typesZattribute_map_preference_patching_mode!_is_custom_action_timeout_enabled_custom_action_timeout_in_mins_is_monthly_patching_enabled_months_weeks_of_month_days_of_week_hours_of_day_lead_time_in_weeks)selfkwargs r$   Jusr/lib/python3.10/site-packages/oci/database/models/maintenance_window.py__init__"   s@   3
zMaintenanceWindow.__init__c                 C      | j S )a  
        Gets the preference of this MaintenanceWindow.
        The maintenance window scheduling preference.

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


        :return: The preference of this MaintenanceWindow.
        :rtype: str
        )r   r"   r$   r$   r%   r   y   s   zMaintenanceWindow.preferencec                 C       ddg}t ||sd}|| _dS )z
        Sets the preference of this MaintenanceWindow.
        The maintenance window scheduling preference.


        :param preference: The preference of this MaintenanceWindow.
        :type: str
        r   r   UNKNOWN_ENUM_VALUEN)r   r   )r"   r   allowed_valuesr$   r$   r%   r      s   


c                 C   r'   )a  
        Gets the patching_mode of this MaintenanceWindow.
        Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING.

        *IMPORTANT*: Non-rolling infrastructure patching involves system down time. See `Oracle-Managed Infrastructure Maintenance Updates`__ for more information.

        __ https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/examaintenance.htm#Oracle

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


        :return: The patching_mode of this MaintenanceWindow.
        :rtype: str
        )r   r(   r$   r$   r%   r      s   zMaintenanceWindow.patching_modec                 C   r)   )a"  
        Sets the patching_mode of this MaintenanceWindow.
        Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING.

        *IMPORTANT*: Non-rolling infrastructure patching involves system down time. See `Oracle-Managed Infrastructure Maintenance Updates`__ for more information.

        __ https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/examaintenance.htm#Oracle


        :param patching_mode: The patching_mode of this MaintenanceWindow.
        :type: str
        r	   r
   r*   N)r   r   )r"   r   r+   r$   r$   r%   r      s   

c                 C   r'   )aB  
        Gets the is_custom_action_timeout_enabled of this MaintenanceWindow.
        If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.


        :return: The is_custom_action_timeout_enabled of this MaintenanceWindow.
        :rtype: bool
        r   r(   r$   r$   r%   r         
z2MaintenanceWindow.is_custom_action_timeout_enabledc                 C   
   || _ dS )aa  
        Sets the is_custom_action_timeout_enabled of this MaintenanceWindow.
        If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.


        :param is_custom_action_timeout_enabled: The is_custom_action_timeout_enabled of this MaintenanceWindow.
        :type: bool
        Nr,   )r"   r   r$   r$   r%   r         

c                 C   r'   )a  
        Gets the custom_action_timeout_in_mins of this MaintenanceWindow.
        Determines the amount of time the system will wait before the start of each database server patching operation.
        Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).


        :return: The custom_action_timeout_in_mins of this MaintenanceWindow.
        :rtype: int
        r   r(   r$   r$   r%   r         z/MaintenanceWindow.custom_action_timeout_in_minsc                 C   r.   )a  
        Sets the custom_action_timeout_in_mins of this MaintenanceWindow.
        Determines the amount of time the system will wait before the start of each database server patching operation.
        Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).


        :param custom_action_timeout_in_mins: The custom_action_timeout_in_mins of this MaintenanceWindow.
        :type: int
        Nr0   )r"   r   r$   r$   r%   r         
c                 C   r'   )z
        Gets the is_monthly_patching_enabled of this MaintenanceWindow.
        If true, enables the monthly patching option.


        :return: The is_monthly_patching_enabled of this MaintenanceWindow.
        :rtype: bool
        r   r(   r$   r$   r%   r      r-   z-MaintenanceWindow.is_monthly_patching_enabledc                 C   r.   )a  
        Sets the is_monthly_patching_enabled of this MaintenanceWindow.
        If true, enables the monthly patching option.


        :param is_monthly_patching_enabled: The is_monthly_patching_enabled of this MaintenanceWindow.
        :type: bool
        Nr3   )r"   r   r$   r$   r%   r      r/   c                 C   r'   )z
        Gets the months of this MaintenanceWindow.
        Months during the year when maintenance should be performed.


        :return: The months of this MaintenanceWindow.
        :rtype: list[oci.database.models.Month]
        r   r(   r$   r$   r%   r     r-   zMaintenanceWindow.monthsc                 C   r.   )z
        Sets the months of this MaintenanceWindow.
        Months during the year when maintenance should be performed.


        :param months: The months of this MaintenanceWindow.
        :type: list[oci.database.models.Month]
        Nr4   )r"   r   r$   r$   r%   r     r/   c                 C   r'   )a4  
        Gets the weeks_of_month of this MaintenanceWindow.
        Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week.
        For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days.
        Note that this parameter works in conjunction with the  daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed.


        :return: The weeks_of_month of this MaintenanceWindow.
        :rtype: list[int]
        r   r(   r$   r$   r%   r     s   z MaintenanceWindow.weeks_of_monthc                 C   r.   )aA  
        Sets the weeks_of_month of this MaintenanceWindow.
        Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week.
        For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days.
        Note that this parameter works in conjunction with the  daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed.


        :param weeks_of_month: The weeks_of_month of this MaintenanceWindow.
        :type: list[int]
        Nr5   )r"   r   r$   r$   r%   r   -  s   
c                 C   r'   )z
        Gets the days_of_week of this MaintenanceWindow.
        Days during the week when maintenance should be performed.


        :return: The days_of_week of this MaintenanceWindow.
        :rtype: list[oci.database.models.DayOfWeek]
        r   r(   r$   r$   r%   r   ;  r-   zMaintenanceWindow.days_of_weekc                 C   r.   )a  
        Sets the days_of_week of this MaintenanceWindow.
        Days during the week when maintenance should be performed.


        :param days_of_week: The days_of_week of this MaintenanceWindow.
        :type: list[oci.database.models.DayOfWeek]
        Nr6   )r"   r   r$   r$   r%   r   G  r/   c                 C   r'   )a.  
        Gets the hours_of_day of this MaintenanceWindow.
        The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are
        - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC


        :return: The hours_of_day of this MaintenanceWindow.
        :rtype: list[int]
        r    r(   r$   r$   r%   r   S  r1   zMaintenanceWindow.hours_of_dayc                 C   r.   )a9  
        Sets the hours_of_day of this MaintenanceWindow.
        The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are
        - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC


        :param hours_of_day: The hours_of_day of this MaintenanceWindow.
        :type: list[int]
        Nr7   )r"   r   r$   r$   r%   r   `  r2   c                 C   r'   )a2  
        Gets the lead_time_in_weeks of this MaintenanceWindow.
        Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4.


        :return: The lead_time_in_weeks of this MaintenanceWindow.
        :rtype: int
        r!   r(   r$   r$   r%   r   m  r-   z$MaintenanceWindow.lead_time_in_weeksc                 C   r.   )aC  
        Sets the lead_time_in_weeks of this MaintenanceWindow.
        Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4.


        :param lead_time_in_weeks: The lead_time_in_weeks of this MaintenanceWindow.
        :type: int
        Nr8   )r"   r   r$   r$   r%   r   y  r/   c                 C   s   t | S N)r   r(   r$   r$   r%   __repr__  s   zMaintenanceWindow.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r"   otherr$   r$   r%   __eq__  s   zMaintenanceWindow.__eq__c                 C   s
   | |k S r9   r$   r<   r$   r$   r%   __ne__  s   
zMaintenanceWindow.__ne__N)__name__
__module____qualname____doc__ZPREFERENCE_NO_PREFERENCEZPREFERENCE_CUSTOM_PREFERENCEZPATCHING_MODE_ROLLINGZPATCHING_MODE_NONROLLINGr&   propertyr   setterr   r   r   r   r   r   r   r   r   r:   r>   r?   r$   r$   r$   r%   r      sd    W



















r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r$   r$   r$   r%   <module>   s   