# 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: 20251101


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 MaintenanceExecution(object):
    """
    Details of a maintenance executions.
    """

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "CREATING"
    LIFECYCLE_STATE_CREATING = "CREATING"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "SCHEDULED"
    LIFECYCLE_STATE_SCHEDULED = "SCHEDULED"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "IN_PROGRESS"
    LIFECYCLE_STATE_IN_PROGRESS = "IN_PROGRESS"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "SUCCEEDED"
    LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "SKIPPED"
    LIFECYCLE_STATE_SKIPPED = "SKIPPED"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "FAILED"
    LIFECYCLE_STATE_FAILED = "FAILED"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "UPDATING"
    LIFECYCLE_STATE_UPDATING = "UPDATING"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "DELETING"
    LIFECYCLE_STATE_DELETING = "DELETING"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "DELETED"
    LIFECYCLE_STATE_DELETED = "DELETED"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "CANCELED"
    LIFECYCLE_STATE_CANCELED = "CANCELED"

    #: A constant which can be used with the lifecycle_state property of a MaintenanceExecution.
    #: This constant has a value of "PARTIAL_SUCCESS"
    LIFECYCLE_STATE_PARTIAL_SUCCESS = "PARTIAL_SUCCESS"

    #: A constant which can be used with the target_resource_type property of a MaintenanceExecution.
    #: This constant has a value of "DB_CC_INFRASTRUCTURE"
    TARGET_RESOURCE_TYPE_DB_CC_INFRASTRUCTURE = "DB_CC_INFRASTRUCTURE"

    #: A constant which can be used with the maintenance_type property of a MaintenanceExecution.
    #: This constant has a value of "PLANNED"
    MAINTENANCE_TYPE_PLANNED = "PLANNED"

    #: A constant which can be used with the maintenance_type property of a MaintenanceExecution.
    #: This constant has a value of "UNPLANNED"
    MAINTENANCE_TYPE_UNPLANNED = "UNPLANNED"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "YEARLY"
    MAINTENANCE_SUBTYPE_YEARLY = "YEARLY"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "HALFYEARLY"
    MAINTENANCE_SUBTYPE_HALFYEARLY = "HALFYEARLY"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "QUARTERLY"
    MAINTENANCE_SUBTYPE_QUARTERLY = "QUARTERLY"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "MONTHLY"
    MAINTENANCE_SUBTYPE_MONTHLY = "MONTHLY"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "DAILY"
    MAINTENANCE_SUBTYPE_DAILY = "DAILY"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "HARDWARE"
    MAINTENANCE_SUBTYPE_HARDWARE = "HARDWARE"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "CRITICAL"
    MAINTENANCE_SUBTYPE_CRITICAL = "CRITICAL"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "INFRA_UPDATE"
    MAINTENANCE_SUBTYPE_INFRA_UPDATE = "INFRA_UPDATE"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "CPS_SERVICES_UPDATE"
    MAINTENANCE_SUBTYPE_CPS_SERVICES_UPDATE = "CPS_SERVICES_UPDATE"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "CPS_VM_UPDATE"
    MAINTENANCE_SUBTYPE_CPS_VM_UPDATE = "CPS_VM_UPDATE"

    #: A constant which can be used with the maintenance_subtype property of a MaintenanceExecution.
    #: This constant has a value of "SECURITY_MONTHLY"
    MAINTENANCE_SUBTYPE_SECURITY_MONTHLY = "SECURITY_MONTHLY"

    #: A constant which can be used with the patching_mode property of a MaintenanceExecution.
    #: This constant has a value of "ROLLING"
    PATCHING_MODE_ROLLING = "ROLLING"

    #: A constant which can be used with the patching_mode property of a MaintenanceExecution.
    #: This constant has a value of "NONROLLING"
    PATCHING_MODE_NONROLLING = "NONROLLING"

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

        :param id:
            The value to assign to the id property of this MaintenanceExecution.
        :type id: str

        :param compartment_id:
            The value to assign to the compartment_id property of this MaintenanceExecution.
        :type compartment_id: str

        :param display_name:
            The value to assign to the display_name property of this MaintenanceExecution.
        :type display_name: str

        :param description:
            The value to assign to the description property of this MaintenanceExecution.
        :type description: str

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this MaintenanceExecution.
            Allowed values for this property are: "CREATING", "SCHEDULED", "IN_PROGRESS", "SUCCEEDED", "SKIPPED", "FAILED", "UPDATING", "DELETING", "DELETED", "CANCELED", "PARTIAL_SUCCESS", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        :param lifecycle_details:
            The value to assign to the lifecycle_details property of this MaintenanceExecution.
        :type lifecycle_details: str

        :param time_started:
            The value to assign to the time_started property of this MaintenanceExecution.
        :type time_started: datetime

        :param time_ended:
            The value to assign to the time_ended property of this MaintenanceExecution.
        :type time_ended: datetime

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

        :param infrastructure_id:
            The value to assign to the infrastructure_id property of this MaintenanceExecution.
        :type infrastructure_id: str

        :param maintenance_run_id:
            The value to assign to the maintenance_run_id property of this MaintenanceExecution.
        :type maintenance_run_id: str

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

        :param maintenance_subtype:
            The value to assign to the maintenance_subtype property of this MaintenanceExecution.
            Allowed values for this property are: "YEARLY", "HALFYEARLY", "QUARTERLY", "MONTHLY", "DAILY", "HARDWARE", "CRITICAL", "INFRA_UPDATE", "CPS_SERVICES_UPDATE", "CPS_VM_UPDATE", "SECURITY_MONTHLY", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type maintenance_subtype: str

        :param patching_mode:
            The value to assign to the patching_mode property of this MaintenanceExecution.
            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 source_version:
            The value to assign to the source_version property of this MaintenanceExecution.
        :type source_version: str

        :param target_version:
            The value to assign to the target_version property of this MaintenanceExecution.
        :type target_version: str

        :param is_custom_action_timeout_enabled:
            The value to assign to the is_custom_action_timeout_enabled property of this MaintenanceExecution.
        :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 MaintenanceExecution.
        :type custom_action_timeout_in_mins: int

        :param workflow_id:
            The value to assign to the workflow_id property of this MaintenanceExecution.
        :type workflow_id: str

        :param system_tags:
            The value to assign to the system_tags property of this MaintenanceExecution.
        :type system_tags: dict(str, dict(str, object))

        :param defined_tags:
            The value to assign to the defined_tags property of this MaintenanceExecution.
        :type defined_tags: dict(str, dict(str, object))

        :param freeform_tags:
            The value to assign to the freeform_tags property of this MaintenanceExecution.
        :type freeform_tags: dict(str, str)

        :param total_time_taken_in_mins:
            The value to assign to the total_time_taken_in_mins property of this MaintenanceExecution.
        :type total_time_taken_in_mins: int

        """
        self.swagger_types = {
            'id': 'str',
            'compartment_id': 'str',
            'display_name': 'str',
            'description': 'str',
            'lifecycle_state': 'str',
            'lifecycle_details': 'str',
            'time_started': 'datetime',
            'time_ended': 'datetime',
            'target_resource_type': 'str',
            'infrastructure_id': 'str',
            'maintenance_run_id': 'str',
            'maintenance_type': 'str',
            'maintenance_subtype': 'str',
            'patching_mode': 'str',
            'source_version': 'str',
            'target_version': 'str',
            'is_custom_action_timeout_enabled': 'bool',
            'custom_action_timeout_in_mins': 'int',
            'workflow_id': 'str',
            'system_tags': 'dict(str, dict(str, object))',
            'defined_tags': 'dict(str, dict(str, object))',
            'freeform_tags': 'dict(str, str)',
            'total_time_taken_in_mins': 'int'
        }
        self.attribute_map = {
            'id': 'id',
            'compartment_id': 'compartmentId',
            'display_name': 'displayName',
            'description': 'description',
            'lifecycle_state': 'lifecycleState',
            'lifecycle_details': 'lifecycleDetails',
            'time_started': 'timeStarted',
            'time_ended': 'timeEnded',
            'target_resource_type': 'targetResourceType',
            'infrastructure_id': 'infrastructureId',
            'maintenance_run_id': 'maintenanceRunId',
            'maintenance_type': 'maintenanceType',
            'maintenance_subtype': 'maintenanceSubtype',
            'patching_mode': 'patchingMode',
            'source_version': 'sourceVersion',
            'target_version': 'targetVersion',
            'is_custom_action_timeout_enabled': 'isCustomActionTimeoutEnabled',
            'custom_action_timeout_in_mins': 'customActionTimeoutInMins',
            'workflow_id': 'workflowId',
            'system_tags': 'systemTags',
            'defined_tags': 'definedTags',
            'freeform_tags': 'freeformTags',
            'total_time_taken_in_mins': 'totalTimeTakenInMins'
        }
        self._id = None
        self._compartment_id = None
        self._display_name = None
        self._description = None
        self._lifecycle_state = None
        self._lifecycle_details = None
        self._time_started = None
        self._time_ended = None
        self._target_resource_type = None
        self._infrastructure_id = None
        self._maintenance_run_id = None
        self._maintenance_type = None
        self._maintenance_subtype = None
        self._patching_mode = None
        self._source_version = None
        self._target_version = None
        self._is_custom_action_timeout_enabled = None
        self._custom_action_timeout_in_mins = None
        self._workflow_id = None
        self._system_tags = None
        self._defined_tags = None
        self._freeform_tags = None
        self._total_time_taken_in_mins = None

    @property
    def id(self):
        """
        **[Required]** Gets the id of this MaintenanceExecution.
        The `OCID`__ of the maintenance run execution.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The id of this MaintenanceExecution.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this MaintenanceExecution.
        The `OCID`__ of the maintenance run execution.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param id: The id of this MaintenanceExecution.
        :type: str
        """
        self._id = id

    @property
    def compartment_id(self):
        """
        Gets the compartment_id of this MaintenanceExecution.
        The `OCID`__ of the compartment.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The compartment_id of this MaintenanceExecution.
        :rtype: str
        """
        return self._compartment_id

    @compartment_id.setter
    def compartment_id(self, compartment_id):
        """
        Sets the compartment_id of this MaintenanceExecution.
        The `OCID`__ of the compartment.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param compartment_id: The compartment_id of this MaintenanceExecution.
        :type: str
        """
        self._compartment_id = compartment_id

    @property
    def display_name(self):
        """
        **[Required]** Gets the display_name of this MaintenanceExecution.
        The user-friendly name for the maintenance run execution.


        :return: The display_name of this MaintenanceExecution.
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """
        Sets the display_name of this MaintenanceExecution.
        The user-friendly name for the maintenance run execution.


        :param display_name: The display_name of this MaintenanceExecution.
        :type: str
        """
        self._display_name = display_name

    @property
    def description(self):
        """
        Gets the description of this MaintenanceExecution.
        Description of the maintenance run execution.


        :return: The description of this MaintenanceExecution.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this MaintenanceExecution.
        Description of the maintenance run execution.


        :param description: The description of this MaintenanceExecution.
        :type: str
        """
        self._description = description

    @property
    def lifecycle_state(self):
        """
        **[Required]** Gets the lifecycle_state of this MaintenanceExecution.
        The state of the maintenance run execution.

        Allowed values for this property are: "CREATING", "SCHEDULED", "IN_PROGRESS", "SUCCEEDED", "SKIPPED", "FAILED", "UPDATING", "DELETING", "DELETED", "CANCELED", "PARTIAL_SUCCESS", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this MaintenanceExecution.
        :rtype: str
        """
        return self._lifecycle_state

    @lifecycle_state.setter
    def lifecycle_state(self, lifecycle_state):
        """
        Sets the lifecycle_state of this MaintenanceExecution.
        The state of the maintenance run execution.


        :param lifecycle_state: The lifecycle_state of this MaintenanceExecution.
        :type: str
        """
        allowed_values = ["CREATING", "SCHEDULED", "IN_PROGRESS", "SUCCEEDED", "SKIPPED", "FAILED", "UPDATING", "DELETING", "DELETED", "CANCELED", "PARTIAL_SUCCESS"]
        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
        self._lifecycle_state = lifecycle_state

    @property
    def lifecycle_details(self):
        """
        Gets the lifecycle_details of this MaintenanceExecution.
        Additional information about the current lifecycle state.


        :return: The lifecycle_details of this MaintenanceExecution.
        :rtype: str
        """
        return self._lifecycle_details

    @lifecycle_details.setter
    def lifecycle_details(self, lifecycle_details):
        """
        Sets the lifecycle_details of this MaintenanceExecution.
        Additional information about the current lifecycle state.


        :param lifecycle_details: The lifecycle_details of this MaintenanceExecution.
        :type: str
        """
        self._lifecycle_details = lifecycle_details

    @property
    def time_started(self):
        """
        Gets the time_started of this MaintenanceExecution.
        The date and time the maintenance run execution started.


        :return: The time_started of this MaintenanceExecution.
        :rtype: datetime
        """
        return self._time_started

    @time_started.setter
    def time_started(self, time_started):
        """
        Sets the time_started of this MaintenanceExecution.
        The date and time the maintenance run execution started.


        :param time_started: The time_started of this MaintenanceExecution.
        :type: datetime
        """
        self._time_started = time_started

    @property
    def time_ended(self):
        """
        Gets the time_ended of this MaintenanceExecution.
        The date and time the maintenance run was completed.


        :return: The time_ended of this MaintenanceExecution.
        :rtype: datetime
        """
        return self._time_ended

    @time_ended.setter
    def time_ended(self, time_ended):
        """
        Sets the time_ended of this MaintenanceExecution.
        The date and time the maintenance run was completed.


        :param time_ended: The time_ended of this MaintenanceExecution.
        :type: datetime
        """
        self._time_ended = time_ended

    @property
    def target_resource_type(self):
        """
        Gets the target_resource_type of this MaintenanceExecution.
        The type of the target resource on which the maintenance run execution occurred.

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


        :return: The target_resource_type of this MaintenanceExecution.
        :rtype: str
        """
        return self._target_resource_type

    @target_resource_type.setter
    def target_resource_type(self, target_resource_type):
        """
        Sets the target_resource_type of this MaintenanceExecution.
        The type of the target resource on which the maintenance run execution occurred.


        :param target_resource_type: The target_resource_type of this MaintenanceExecution.
        :type: str
        """
        allowed_values = ["DB_CC_INFRASTRUCTURE"]
        if not value_allowed_none_or_none_sentinel(target_resource_type, allowed_values):
            target_resource_type = 'UNKNOWN_ENUM_VALUE'
        self._target_resource_type = target_resource_type

    @property
    def infrastructure_id(self):
        """
        Gets the infrastructure_id of this MaintenanceExecution.
        The `OCID`__ of the Database Infrastructure on which the maintenance run execution occurred.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The infrastructure_id of this MaintenanceExecution.
        :rtype: str
        """
        return self._infrastructure_id

    @infrastructure_id.setter
    def infrastructure_id(self, infrastructure_id):
        """
        Sets the infrastructure_id of this MaintenanceExecution.
        The `OCID`__ of the Database Infrastructure on which the maintenance run execution occurred.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param infrastructure_id: The infrastructure_id of this MaintenanceExecution.
        :type: str
        """
        self._infrastructure_id = infrastructure_id

    @property
    def maintenance_run_id(self):
        """
        Gets the maintenance_run_id of this MaintenanceExecution.
        The `OCID`__ of the maintenance run to which this maintenance execution belongs.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The maintenance_run_id of this MaintenanceExecution.
        :rtype: str
        """
        return self._maintenance_run_id

    @maintenance_run_id.setter
    def maintenance_run_id(self, maintenance_run_id):
        """
        Sets the maintenance_run_id of this MaintenanceExecution.
        The `OCID`__ of the maintenance run to which this maintenance execution belongs.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param maintenance_run_id: The maintenance_run_id of this MaintenanceExecution.
        :type: str
        """
        self._maintenance_run_id = maintenance_run_id

    @property
    def maintenance_type(self):
        """
        Gets the maintenance_type of this MaintenanceExecution.
        Maintenance type.

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


        :return: The maintenance_type of this MaintenanceExecution.
        :rtype: str
        """
        return self._maintenance_type

    @maintenance_type.setter
    def maintenance_type(self, maintenance_type):
        """
        Sets the maintenance_type of this MaintenanceExecution.
        Maintenance type.


        :param maintenance_type: The maintenance_type of this MaintenanceExecution.
        :type: str
        """
        allowed_values = ["PLANNED", "UNPLANNED"]
        if not value_allowed_none_or_none_sentinel(maintenance_type, allowed_values):
            maintenance_type = 'UNKNOWN_ENUM_VALUE'
        self._maintenance_type = maintenance_type

    @property
    def maintenance_subtype(self):
        """
        Gets the maintenance_subtype of this MaintenanceExecution.
        Maintenance run execution sub-type.

        Allowed values for this property are: "YEARLY", "HALFYEARLY", "QUARTERLY", "MONTHLY", "DAILY", "HARDWARE", "CRITICAL", "INFRA_UPDATE", "CPS_SERVICES_UPDATE", "CPS_VM_UPDATE", "SECURITY_MONTHLY", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The maintenance_subtype of this MaintenanceExecution.
        :rtype: str
        """
        return self._maintenance_subtype

    @maintenance_subtype.setter
    def maintenance_subtype(self, maintenance_subtype):
        """
        Sets the maintenance_subtype of this MaintenanceExecution.
        Maintenance run execution sub-type.


        :param maintenance_subtype: The maintenance_subtype of this MaintenanceExecution.
        :type: str
        """
        allowed_values = ["YEARLY", "HALFYEARLY", "QUARTERLY", "MONTHLY", "DAILY", "HARDWARE", "CRITICAL", "INFRA_UPDATE", "CPS_SERVICES_UPDATE", "CPS_VM_UPDATE", "SECURITY_MONTHLY"]
        if not value_allowed_none_or_none_sentinel(maintenance_subtype, allowed_values):
            maintenance_subtype = 'UNKNOWN_ENUM_VALUE'
        self._maintenance_subtype = maintenance_subtype

    @property
    def patching_mode(self):
        """
        Gets the patching_mode of this MaintenanceExecution.
        The patching mode for the maintenance run that is being executed.

        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 MaintenanceExecution.
        :rtype: str
        """
        return self._patching_mode

    @patching_mode.setter
    def patching_mode(self, patching_mode):
        """
        Sets the patching_mode of this MaintenanceExecution.
        The patching mode for the maintenance run that is being executed.


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

    @property
    def source_version(self):
        """
        Gets the source_version of this MaintenanceExecution.
        The source software version for the Oracle infrastructure.


        :return: The source_version of this MaintenanceExecution.
        :rtype: str
        """
        return self._source_version

    @source_version.setter
    def source_version(self, source_version):
        """
        Sets the source_version of this MaintenanceExecution.
        The source software version for the Oracle infrastructure.


        :param source_version: The source_version of this MaintenanceExecution.
        :type: str
        """
        self._source_version = source_version

    @property
    def target_version(self):
        """
        Gets the target_version of this MaintenanceExecution.
        The target software version for the Database Infrastructure patching operation.


        :return: The target_version of this MaintenanceExecution.
        :rtype: str
        """
        return self._target_version

    @target_version.setter
    def target_version(self, target_version):
        """
        Sets the target_version of this MaintenanceExecution.
        The target software version for the Database Infrastructure patching operation.


        :param target_version: The target_version of this MaintenanceExecution.
        :type: str
        """
        self._target_version = target_version

    @property
    def is_custom_action_timeout_enabled(self):
        """
        Gets the is_custom_action_timeout_enabled of this MaintenanceExecution.
        At the time of execution whether the custom action time out is enabled for the maintenance run that is being executed.


        :return: The is_custom_action_timeout_enabled of this MaintenanceExecution.
        :rtype: bool
        """
        return self._is_custom_action_timeout_enabled

    @is_custom_action_timeout_enabled.setter
    def is_custom_action_timeout_enabled(self, is_custom_action_timeout_enabled):
        """
        Sets the is_custom_action_timeout_enabled of this MaintenanceExecution.
        At the time of execution whether the custom action time out is enabled for the maintenance run that is being executed.


        :param is_custom_action_timeout_enabled: The is_custom_action_timeout_enabled of this MaintenanceExecution.
        :type: bool
        """
        self._is_custom_action_timeout_enabled = is_custom_action_timeout_enabled

    @property
    def custom_action_timeout_in_mins(self):
        """
        Gets the custom_action_timeout_in_mins of this MaintenanceExecution.
        Determines the amount of time the system will wait before the start of each compute server patching operation.
        Supported values are 15 to 120 minutes.


        :return: The custom_action_timeout_in_mins of this MaintenanceExecution.
        :rtype: int
        """
        return self._custom_action_timeout_in_mins

    @custom_action_timeout_in_mins.setter
    def custom_action_timeout_in_mins(self, custom_action_timeout_in_mins):
        """
        Sets the custom_action_timeout_in_mins of this MaintenanceExecution.
        Determines the amount of time the system will wait before the start of each compute server patching operation.
        Supported values are 15 to 120 minutes.


        :param custom_action_timeout_in_mins: The custom_action_timeout_in_mins of this MaintenanceExecution.
        :type: int
        """
        self._custom_action_timeout_in_mins = custom_action_timeout_in_mins

    @property
    def workflow_id(self):
        """
        Gets the workflow_id of this MaintenanceExecution.
        The `OCID`__ of the work request executed by this execution.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The workflow_id of this MaintenanceExecution.
        :rtype: str
        """
        return self._workflow_id

    @workflow_id.setter
    def workflow_id(self, workflow_id):
        """
        Sets the workflow_id of this MaintenanceExecution.
        The `OCID`__ of the work request executed by this execution.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param workflow_id: The workflow_id of this MaintenanceExecution.
        :type: str
        """
        self._workflow_id = workflow_id

    @property
    def system_tags(self):
        """
        Gets the system_tags of this MaintenanceExecution.
        Usage of system tag keys. These predefined keys are scoped to namespaces.
        Example: `{ \"orcl-cloud\": { \"free-tier-retained\": \"true\" } }`


        :return: The system_tags of this MaintenanceExecution.
        :rtype: dict(str, dict(str, object))
        """
        return self._system_tags

    @system_tags.setter
    def system_tags(self, system_tags):
        """
        Sets the system_tags of this MaintenanceExecution.
        Usage of system tag keys. These predefined keys are scoped to namespaces.
        Example: `{ \"orcl-cloud\": { \"free-tier-retained\": \"true\" } }`


        :param system_tags: The system_tags of this MaintenanceExecution.
        :type: dict(str, dict(str, object))
        """
        self._system_tags = system_tags

    @property
    def defined_tags(self):
        """
        Gets the defined_tags of this MaintenanceExecution.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`


        :return: The defined_tags of this MaintenanceExecution.
        :rtype: dict(str, dict(str, object))
        """
        return self._defined_tags

    @defined_tags.setter
    def defined_tags(self, defined_tags):
        """
        Sets the defined_tags of this MaintenanceExecution.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`


        :param defined_tags: The defined_tags of this MaintenanceExecution.
        :type: dict(str, dict(str, object))
        """
        self._defined_tags = defined_tags

    @property
    def freeform_tags(self):
        """
        Gets the freeform_tags of this MaintenanceExecution.
        Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only.
        Example: `{\"bar-key\": \"value\"}`


        :return: The freeform_tags of this MaintenanceExecution.
        :rtype: dict(str, str)
        """
        return self._freeform_tags

    @freeform_tags.setter
    def freeform_tags(self, freeform_tags):
        """
        Sets the freeform_tags of this MaintenanceExecution.
        Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only.
        Example: `{\"bar-key\": \"value\"}`


        :param freeform_tags: The freeform_tags of this MaintenanceExecution.
        :type: dict(str, str)
        """
        self._freeform_tags = freeform_tags

    @property
    def total_time_taken_in_mins(self):
        """
        Gets the total_time_taken_in_mins of this MaintenanceExecution.
        The total time taken by this execution in minutes.


        :return: The total_time_taken_in_mins of this MaintenanceExecution.
        :rtype: int
        """
        return self._total_time_taken_in_mins

    @total_time_taken_in_mins.setter
    def total_time_taken_in_mins(self, total_time_taken_in_mins):
        """
        Sets the total_time_taken_in_mins of this MaintenanceExecution.
        The total time taken by this execution in minutes.


        :param total_time_taken_in_mins: The total_time_taken_in_mins of this MaintenanceExecution.
        :type: int
        """
        self._total_time_taken_in_mins = total_time_taken_in_mins

    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
