# 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 ManagedSoftwareUpdateMaintenanceDetails(object):
    """
    Provides details about actual Oracle Managed Database Software Updates scheduled time and version.
    """

    #: A constant which can be used with the update_readiness_status property of a ManagedSoftwareUpdateMaintenanceDetails.
    #: This constant has a value of "SCHEDULED"
    UPDATE_READINESS_STATUS_SCHEDULED = "SCHEDULED"

    #: A constant which can be used with the update_readiness_status property of a ManagedSoftwareUpdateMaintenanceDetails.
    #: This constant has a value of "SUCCEEDED"
    UPDATE_READINESS_STATUS_SUCCEEDED = "SUCCEEDED"

    #: A constant which can be used with the update_readiness_status property of a ManagedSoftwareUpdateMaintenanceDetails.
    #: This constant has a value of "READY_FOR_MANAGED_UPDATE"
    UPDATE_READINESS_STATUS_READY_FOR_MANAGED_UPDATE = "READY_FOR_MANAGED_UPDATE"

    #: A constant which can be used with the update_readiness_status property of a ManagedSoftwareUpdateMaintenanceDetails.
    #: This constant has a value of "NOT_READY_FOR_MANAGED_UPDATE"
    UPDATE_READINESS_STATUS_NOT_READY_FOR_MANAGED_UPDATE = "NOT_READY_FOR_MANAGED_UPDATE"

    #: A constant which can be used with the update_readiness_status property of a ManagedSoftwareUpdateMaintenanceDetails.
    #: This constant has a value of "IN_PROGRESS"
    UPDATE_READINESS_STATUS_IN_PROGRESS = "IN_PROGRESS"

    #: A constant which can be used with the update_readiness_status property of a ManagedSoftwareUpdateMaintenanceDetails.
    #: This constant has a value of "NEEDS_ATTENTION"
    UPDATE_READINESS_STATUS_NEEDS_ATTENTION = "NEEDS_ATTENTION"

    #: A constant which can be used with the update_readiness_status property of a ManagedSoftwareUpdateMaintenanceDetails.
    #: This constant has a value of "AWAITING_RESOLUTION"
    UPDATE_READINESS_STATUS_AWAITING_RESOLUTION = "AWAITING_RESOLUTION"

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

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

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

        :param time_scheduled:
            The value to assign to the time_scheduled property of this ManagedSoftwareUpdateMaintenanceDetails.
        :type time_scheduled: datetime

        :param update_readiness_status:
            The value to assign to the update_readiness_status property of this ManagedSoftwareUpdateMaintenanceDetails.
            Allowed values for this property are: "SCHEDULED", "SUCCEEDED", "READY_FOR_MANAGED_UPDATE", "NOT_READY_FOR_MANAGED_UPDATE", "IN_PROGRESS", "NEEDS_ATTENTION", "AWAITING_RESOLUTION", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type update_readiness_status: str

        :param update_readiness_status_details:
            The value to assign to the update_readiness_status_details property of this ManagedSoftwareUpdateMaintenanceDetails.
        :type update_readiness_status_details: str

        :param time_of_status_update:
            The value to assign to the time_of_status_update property of this ManagedSoftwareUpdateMaintenanceDetails.
        :type time_of_status_update: datetime

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

        :param time_of_last_readiness_check:
            The value to assign to the time_of_last_readiness_check property of this ManagedSoftwareUpdateMaintenanceDetails.
        :type time_of_last_readiness_check: datetime

        """
        self.swagger_types = {
            'time_scheduled': 'datetime',
            'update_readiness_status': 'str',
            'update_readiness_status_details': 'str',
            'time_of_status_update': 'datetime',
            'update_mode': 'str',
            'version': 'str',
            'time_of_last_readiness_check': 'datetime'
        }
        self.attribute_map = {
            'time_scheduled': 'timeScheduled',
            'update_readiness_status': 'updateReadinessStatus',
            'update_readiness_status_details': 'updateReadinessStatusDetails',
            'time_of_status_update': 'timeOfStatusUpdate',
            'update_mode': 'updateMode',
            'version': 'version',
            'time_of_last_readiness_check': 'timeOfLastReadinessCheck'
        }
        self._time_scheduled = None
        self._update_readiness_status = None
        self._update_readiness_status_details = None
        self._time_of_status_update = None
        self._update_mode = None
        self._version = None
        self._time_of_last_readiness_check = None

    @property
    def time_scheduled(self):
        """
        **[Required]** Gets the time_scheduled of this ManagedSoftwareUpdateMaintenanceDetails.
        The date and time of the database was scheduled for update.


        :return: The time_scheduled of this ManagedSoftwareUpdateMaintenanceDetails.
        :rtype: datetime
        """
        return self._time_scheduled

    @time_scheduled.setter
    def time_scheduled(self, time_scheduled):
        """
        Sets the time_scheduled of this ManagedSoftwareUpdateMaintenanceDetails.
        The date and time of the database was scheduled for update.


        :param time_scheduled: The time_scheduled of this ManagedSoftwareUpdateMaintenanceDetails.
        :type: datetime
        """
        self._time_scheduled = time_scheduled

    @property
    def update_readiness_status(self):
        """
        Gets the update_readiness_status of this ManagedSoftwareUpdateMaintenanceDetails.
        The managed software update readiness status

        Allowed values for this property are: "SCHEDULED", "SUCCEEDED", "READY_FOR_MANAGED_UPDATE", "NOT_READY_FOR_MANAGED_UPDATE", "IN_PROGRESS", "NEEDS_ATTENTION", "AWAITING_RESOLUTION", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The update_readiness_status of this ManagedSoftwareUpdateMaintenanceDetails.
        :rtype: str
        """
        return self._update_readiness_status

    @update_readiness_status.setter
    def update_readiness_status(self, update_readiness_status):
        """
        Sets the update_readiness_status of this ManagedSoftwareUpdateMaintenanceDetails.
        The managed software update readiness status


        :param update_readiness_status: The update_readiness_status of this ManagedSoftwareUpdateMaintenanceDetails.
        :type: str
        """
        allowed_values = ["SCHEDULED", "SUCCEEDED", "READY_FOR_MANAGED_UPDATE", "NOT_READY_FOR_MANAGED_UPDATE", "IN_PROGRESS", "NEEDS_ATTENTION", "AWAITING_RESOLUTION"]
        if not value_allowed_none_or_none_sentinel(update_readiness_status, allowed_values):
            update_readiness_status = 'UNKNOWN_ENUM_VALUE'
        self._update_readiness_status = update_readiness_status

    @property
    def update_readiness_status_details(self):
        """
        Gets the update_readiness_status_details of this ManagedSoftwareUpdateMaintenanceDetails.
        This field will contain actual cause of update readiness state.


        :return: The update_readiness_status_details of this ManagedSoftwareUpdateMaintenanceDetails.
        :rtype: str
        """
        return self._update_readiness_status_details

    @update_readiness_status_details.setter
    def update_readiness_status_details(self, update_readiness_status_details):
        """
        Sets the update_readiness_status_details of this ManagedSoftwareUpdateMaintenanceDetails.
        This field will contain actual cause of update readiness state.


        :param update_readiness_status_details: The update_readiness_status_details of this ManagedSoftwareUpdateMaintenanceDetails.
        :type: str
        """
        self._update_readiness_status_details = update_readiness_status_details

    @property
    def time_of_status_update(self):
        """
        Gets the time_of_status_update of this ManagedSoftwareUpdateMaintenanceDetails.
        The date and time of when the status was updated.


        :return: The time_of_status_update of this ManagedSoftwareUpdateMaintenanceDetails.
        :rtype: datetime
        """
        return self._time_of_status_update

    @time_of_status_update.setter
    def time_of_status_update(self, time_of_status_update):
        """
        Sets the time_of_status_update of this ManagedSoftwareUpdateMaintenanceDetails.
        The date and time of when the status was updated.


        :param time_of_status_update: The time_of_status_update of this ManagedSoftwareUpdateMaintenanceDetails.
        :type: datetime
        """
        self._time_of_status_update = time_of_status_update

    @property
    def update_mode(self):
        """
        Gets the update_mode of this ManagedSoftwareUpdateMaintenanceDetails.
        Oracle Managed Database Software update method, either \"ROLLING\" or \"NONROLLING\"

        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 ManagedSoftwareUpdateMaintenanceDetails.
        :rtype: str
        """
        return self._update_mode

    @update_mode.setter
    def update_mode(self, update_mode):
        """
        Sets the update_mode of this ManagedSoftwareUpdateMaintenanceDetails.
        Oracle Managed Database Software update method, either \"ROLLING\" or \"NONROLLING\"


        :param update_mode: The update_mode of this ManagedSoftwareUpdateMaintenanceDetails.
        :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(self):
        """
        **[Required]** Gets the version of this ManagedSoftwareUpdateMaintenanceDetails.
        The version of the database was scheduled for update.


        :return: The version of this ManagedSoftwareUpdateMaintenanceDetails.
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """
        Sets the version of this ManagedSoftwareUpdateMaintenanceDetails.
        The version of the database was scheduled for update.


        :param version: The version of this ManagedSoftwareUpdateMaintenanceDetails.
        :type: str
        """
        self._version = version

    @property
    def time_of_last_readiness_check(self):
        """
        Gets the time_of_last_readiness_check of this ManagedSoftwareUpdateMaintenanceDetails.
        The date and time of the last readiness check.


        :return: The time_of_last_readiness_check of this ManagedSoftwareUpdateMaintenanceDetails.
        :rtype: datetime
        """
        return self._time_of_last_readiness_check

    @time_of_last_readiness_check.setter
    def time_of_last_readiness_check(self, time_of_last_readiness_check):
        """
        Sets the time_of_last_readiness_check of this ManagedSoftwareUpdateMaintenanceDetails.
        The date and time of the last readiness check.


        :param time_of_last_readiness_check: The time_of_last_readiness_check of this ManagedSoftwareUpdateMaintenanceDetails.
        :type: datetime
        """
        self._time_of_last_readiness_check = time_of_last_readiness_check

    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
