# 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 ExadataLiveImageVersionDetails(object):
    """
    Details about the most recent live image version applied on the VM Cluster, if any. If a full OS update was applied, the fields would be blank.
    """

    #: A constant which can be used with the update_mode property of a ExadataLiveImageVersionDetails.
    #: This constant has a value of "ONLINE_HIGHCVSS"
    UPDATE_MODE_ONLINE_HIGHCVSS = "ONLINE_HIGHCVSS"

    #: A constant which can be used with the update_mode property of a ExadataLiveImageVersionDetails.
    #: This constant has a value of "ONLINE_ALLCVSS"
    UPDATE_MODE_ONLINE_ALLCVSS = "ONLINE_ALLCVSS"

    #: A constant which can be used with the update_mode property of a ExadataLiveImageVersionDetails.
    #: This constant has a value of "ONLINE_ALL_UPDATES"
    UPDATE_MODE_ONLINE_ALL_UPDATES = "ONLINE_ALL_UPDATES"

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

        :param update_mode:
            The value to assign to the update_mode property of this ExadataLiveImageVersionDetails.
            Allowed values for this property are: "ONLINE_HIGHCVSS", "ONLINE_ALLCVSS", "ONLINE_ALL_UPDATES", '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 ExadataLiveImageVersionDetails.
        :type version: str

        :param has_pending_updates:
            The value to assign to the has_pending_updates property of this ExadataLiveImageVersionDetails.
        :type has_pending_updates: bool

        :param time_released:
            The value to assign to the time_released property of this ExadataLiveImageVersionDetails.
        :type time_released: datetime

        """
        self.swagger_types = {
            'update_mode': 'str',
            'version': 'str',
            'has_pending_updates': 'bool',
            'time_released': 'datetime'
        }
        self.attribute_map = {
            'update_mode': 'updateMode',
            'version': 'version',
            'has_pending_updates': 'hasPendingUpdates',
            'time_released': 'timeReleased'
        }
        self._update_mode = None
        self._version = None
        self._has_pending_updates = None
        self._time_released = None

    @property
    def update_mode(self):
        """
        Gets the update_mode of this ExadataLiveImageVersionDetails.
        The OS live update mode performed most recently on the VM Cluster.

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


        :return: The update_mode of this ExadataLiveImageVersionDetails.
        :rtype: str
        """
        return self._update_mode

    @update_mode.setter
    def update_mode(self, update_mode):
        """
        Sets the update_mode of this ExadataLiveImageVersionDetails.
        The OS live update mode performed most recently on the VM Cluster.


        :param update_mode: The update_mode of this ExadataLiveImageVersionDetails.
        :type: str
        """
        allowed_values = ["ONLINE_HIGHCVSS", "ONLINE_ALLCVSS", "ONLINE_ALL_UPDATES"]
        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):
        """
        Gets the version of this ExadataLiveImageVersionDetails.
        Live Exadata Image Version of the Guest OS Update applied.


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

    @version.setter
    def version(self, version):
        """
        Sets the version of this ExadataLiveImageVersionDetails.
        Live Exadata Image Version of the Guest OS Update applied.


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

    @property
    def has_pending_updates(self):
        """
        Gets the has_pending_updates of this ExadataLiveImageVersionDetails.
        Indicates whether OS updates that require node reboot are pending after the previous online update was applied.


        :return: The has_pending_updates of this ExadataLiveImageVersionDetails.
        :rtype: bool
        """
        return self._has_pending_updates

    @has_pending_updates.setter
    def has_pending_updates(self, has_pending_updates):
        """
        Sets the has_pending_updates of this ExadataLiveImageVersionDetails.
        Indicates whether OS updates that require node reboot are pending after the previous online update was applied.


        :param has_pending_updates: The has_pending_updates of this ExadataLiveImageVersionDetails.
        :type: bool
        """
        self._has_pending_updates = has_pending_updates

    @property
    def time_released(self):
        """
        Gets the time_released of this ExadataLiveImageVersionDetails.
        The release date and time for the applied Live Exadata Image OS version.


        :return: The time_released of this ExadataLiveImageVersionDetails.
        :rtype: datetime
        """
        return self._time_released

    @time_released.setter
    def time_released(self, time_released):
        """
        Sets the time_released of this ExadataLiveImageVersionDetails.
        The release date and time for the applied Live Exadata Image OS version.


        :param time_released: The time_released of this ExadataLiveImageVersionDetails.
        :type: datetime
        """
        self._time_released = time_released

    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
