# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918


from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel  # noqa: F401
from oci.decorators import init_model_state_from_kwargs


@init_model_state_from_kwargs
class ManagedSoftwareUpdatePreferenceDetails(object):
    """
    Oracle Managed Database Software Updates schedule will be created based on the provided update preferences
    """

    #: A constant which can be used with the update_mode property of a ManagedSoftwareUpdatePreferenceDetails.
    #: This constant has a value of "ROLLING"
    UPDATE_MODE_ROLLING = "ROLLING"

    #: A constant which can be used with the update_mode property of a ManagedSoftwareUpdatePreferenceDetails.
    #: This constant has a value of "NONROLLING"
    UPDATE_MODE_NONROLLING = "NONROLLING"

    def __init__(self, **kwargs):
        """
        Initializes a new ManagedSoftwareUpdatePreferenceDetails object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

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

        :param hour_of_day:
            The value to assign to the hour_of_day property of this ManagedSoftwareUpdatePreferenceDetails.
        :type hour_of_day: int

        :param update_mode:
            The value to assign to the update_mode property of this ManagedSoftwareUpdatePreferenceDetails.
            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 update_mode: str

        :param version_scheme_details:
            The value to assign to the version_scheme_details property of this ManagedSoftwareUpdatePreferenceDetails.
        :type version_scheme_details: oci.database.models.VersionSchemeDetails

        """
        self.swagger_types = {
            'days_of_week': 'list[ManagedSoftwareUpdateDayOfWeek]',
            'hour_of_day': 'int',
            'update_mode': 'str',
            'version_scheme_details': 'VersionSchemeDetails'
        }
        self.attribute_map = {
            'days_of_week': 'daysOfWeek',
            'hour_of_day': 'hourOfDay',
            'update_mode': 'updateMode',
            'version_scheme_details': 'versionSchemeDetails'
        }
        self._days_of_week = None
        self._hour_of_day = None
        self._update_mode = None
        self._version_scheme_details = None

    @property
    def days_of_week(self):
        """
        **[Required]** Gets the days_of_week of this ManagedSoftwareUpdatePreferenceDetails.
        The update should be applied on the database for the selected days of the week.


        :return: The days_of_week of this ManagedSoftwareUpdatePreferenceDetails.
        :rtype: list[oci.database.models.ManagedSoftwareUpdateDayOfWeek]
        """
        return self._days_of_week

    @days_of_week.setter
    def days_of_week(self, days_of_week):
        """
        Sets the days_of_week of this ManagedSoftwareUpdatePreferenceDetails.
        The update should be applied on the database for the selected days of the week.


        :param days_of_week: The days_of_week of this ManagedSoftwareUpdatePreferenceDetails.
        :type: list[oci.database.models.ManagedSoftwareUpdateDayOfWeek]
        """
        self._days_of_week = days_of_week

    @property
    def hour_of_day(self):
        """
        **[Required]** Gets the hour_of_day of this ManagedSoftwareUpdatePreferenceDetails.
        The update should be applied on the database for the selected hour of the day.


        :return: The hour_of_day of this ManagedSoftwareUpdatePreferenceDetails.
        :rtype: int
        """
        return self._hour_of_day

    @hour_of_day.setter
    def hour_of_day(self, hour_of_day):
        """
        Sets the hour_of_day of this ManagedSoftwareUpdatePreferenceDetails.
        The update should be applied on the database for the selected hour of the day.


        :param hour_of_day: The hour_of_day of this ManagedSoftwareUpdatePreferenceDetails.
        :type: int
        """
        self._hour_of_day = hour_of_day

    @property
    def update_mode(self):
        """
        Gets the update_mode of this ManagedSoftwareUpdatePreferenceDetails.
        Oracle Managed Database Software update method, either \"ROLLING\" or \"NONROLLING\". Default value is ROLLING.
        *IMPORTANT*: Non-rolling Database Software update update involves system down time.

        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 update_mode of this ManagedSoftwareUpdatePreferenceDetails.
        :rtype: str
        """
        return self._update_mode

    @update_mode.setter
    def update_mode(self, update_mode):
        """
        Sets the update_mode of this ManagedSoftwareUpdatePreferenceDetails.
        Oracle Managed Database Software update method, either \"ROLLING\" or \"NONROLLING\". Default value is ROLLING.
        *IMPORTANT*: Non-rolling Database Software update update involves system down time.


        :param update_mode: The update_mode of this ManagedSoftwareUpdatePreferenceDetails.
        :type: str
        """
        allowed_values = ["ROLLING", "NONROLLING"]
        if not value_allowed_none_or_none_sentinel(update_mode, allowed_values):
            update_mode = 'UNKNOWN_ENUM_VALUE'
        self._update_mode = update_mode

    @property
    def version_scheme_details(self):
        """
        **[Required]** Gets the version_scheme_details of this ManagedSoftwareUpdatePreferenceDetails.

        :return: The version_scheme_details of this ManagedSoftwareUpdatePreferenceDetails.
        :rtype: oci.database.models.VersionSchemeDetails
        """
        return self._version_scheme_details

    @version_scheme_details.setter
    def version_scheme_details(self, version_scheme_details):
        """
        Sets the version_scheme_details of this ManagedSoftwareUpdatePreferenceDetails.

        :param version_scheme_details: The version_scheme_details of this ManagedSoftwareUpdatePreferenceDetails.
        :type: oci.database.models.VersionSchemeDetails
        """
        self._version_scheme_details = version_scheme_details

    def __repr__(self):
        return formatted_flat_dict(self)

    def __eq__(self, other):
        if other is None:
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not self == other
