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

from .batch_task_execution_details import BatchTaskExecutionDetails
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 ComputeTaskExecutionDetails(BatchTaskExecutionDetails):
    """
    Execution details for a compute task.
    """

    def __init__(self, **kwargs):
        """
        Initializes a new ComputeTaskExecutionDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.batch.models.ComputeTaskExecutionDetails.type` attribute
        of this class is ``COMPUTE_TASK_EXECUTION_DETAILS`` and it should not be changed.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param type:
            The value to assign to the type property of this ComputeTaskExecutionDetails.
            Allowed values for this property are: "COMPUTE_TASK_EXECUTION_DETAILS"
        :type type: str

        :param execution_id:
            The value to assign to the execution_id property of this ComputeTaskExecutionDetails.
        :type execution_id: str

        :param time_transitioned_to_waiting_dependencies:
            The value to assign to the time_transitioned_to_waiting_dependencies property of this ComputeTaskExecutionDetails.
        :type time_transitioned_to_waiting_dependencies: datetime

        :param time_transitioned_to_waiting_queued:
            The value to assign to the time_transitioned_to_waiting_queued property of this ComputeTaskExecutionDetails.
        :type time_transitioned_to_waiting_queued: datetime

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

        :param time_completed:
            The value to assign to the time_completed property of this ComputeTaskExecutionDetails.
        :type time_completed: datetime

        :param fleet_shape:
            The value to assign to the fleet_shape property of this ComputeTaskExecutionDetails.
        :type fleet_shape: oci.batch.models.FleetShapeExecutionDetails

        :param completion_lifecycle_state:
            The value to assign to the completion_lifecycle_state property of this ComputeTaskExecutionDetails.
        :type completion_lifecycle_state: str

        :param errors:
            The value to assign to the errors property of this ComputeTaskExecutionDetails.
        :type errors: list[str]

        """
        self.swagger_types = {
            'type': 'str',
            'execution_id': 'str',
            'time_transitioned_to_waiting_dependencies': 'datetime',
            'time_transitioned_to_waiting_queued': 'datetime',
            'time_started': 'datetime',
            'time_completed': 'datetime',
            'fleet_shape': 'FleetShapeExecutionDetails',
            'completion_lifecycle_state': 'str',
            'errors': 'list[str]'
        }
        self.attribute_map = {
            'type': 'type',
            'execution_id': 'executionId',
            'time_transitioned_to_waiting_dependencies': 'timeTransitionedToWaitingDependencies',
            'time_transitioned_to_waiting_queued': 'timeTransitionedToWaitingQueued',
            'time_started': 'timeStarted',
            'time_completed': 'timeCompleted',
            'fleet_shape': 'fleetShape',
            'completion_lifecycle_state': 'completionLifecycleState',
            'errors': 'errors'
        }
        self._type = None
        self._execution_id = None
        self._time_transitioned_to_waiting_dependencies = None
        self._time_transitioned_to_waiting_queued = None
        self._time_started = None
        self._time_completed = None
        self._fleet_shape = None
        self._completion_lifecycle_state = None
        self._errors = None
        self._type = 'COMPUTE_TASK_EXECUTION_DETAILS'

    @property
    def execution_id(self):
        """
        Gets the execution_id of this ComputeTaskExecutionDetails.
        A unique identifier for the task execution. Created as \"taskId:taskVersion:runNumber\".


        :return: The execution_id of this ComputeTaskExecutionDetails.
        :rtype: str
        """
        return self._execution_id

    @execution_id.setter
    def execution_id(self, execution_id):
        """
        Sets the execution_id of this ComputeTaskExecutionDetails.
        A unique identifier for the task execution. Created as \"taskId:taskVersion:runNumber\".


        :param execution_id: The execution_id of this ComputeTaskExecutionDetails.
        :type: str
        """
        self._execution_id = execution_id

    @property
    def time_transitioned_to_waiting_dependencies(self):
        """
        Gets the time_transitioned_to_waiting_dependencies of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState was changed to Waiting, and it is waiting for its dependencies to run, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :return: The time_transitioned_to_waiting_dependencies of this ComputeTaskExecutionDetails.
        :rtype: datetime
        """
        return self._time_transitioned_to_waiting_dependencies

    @time_transitioned_to_waiting_dependencies.setter
    def time_transitioned_to_waiting_dependencies(self, time_transitioned_to_waiting_dependencies):
        """
        Sets the time_transitioned_to_waiting_dependencies of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState was changed to Waiting, and it is waiting for its dependencies to run, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :param time_transitioned_to_waiting_dependencies: The time_transitioned_to_waiting_dependencies of this ComputeTaskExecutionDetails.
        :type: datetime
        """
        self._time_transitioned_to_waiting_dependencies = time_transitioned_to_waiting_dependencies

    @property
    def time_transitioned_to_waiting_queued(self):
        """
        Gets the time_transitioned_to_waiting_queued of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState was changed to Waiting, and it is queued to be executed, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :return: The time_transitioned_to_waiting_queued of this ComputeTaskExecutionDetails.
        :rtype: datetime
        """
        return self._time_transitioned_to_waiting_queued

    @time_transitioned_to_waiting_queued.setter
    def time_transitioned_to_waiting_queued(self, time_transitioned_to_waiting_queued):
        """
        Sets the time_transitioned_to_waiting_queued of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState was changed to Waiting, and it is queued to be executed, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :param time_transitioned_to_waiting_queued: The time_transitioned_to_waiting_queued of this ComputeTaskExecutionDetails.
        :type: datetime
        """
        self._time_transitioned_to_waiting_queued = time_transitioned_to_waiting_queued

    @property
    def time_started(self):
        """
        Gets the time_started of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState was changed to In_Progress, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


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

    @time_started.setter
    def time_started(self, time_started):
        """
        Sets the time_started of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState was changed to In_Progress, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


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

    @property
    def time_completed(self):
        """
        Gets the time_completed of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState changed to Succeeded, or Failed, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :return: The time_completed of this ComputeTaskExecutionDetails.
        :rtype: datetime
        """
        return self._time_completed

    @time_completed.setter
    def time_completed(self, time_completed):
        """
        Sets the time_completed of this ComputeTaskExecutionDetails.
        The date and time when the lifecycleState changed to Succeeded, or Failed, in the format defined by `RFC 3339`__.
        Example: `2016-08-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :param time_completed: The time_completed of this ComputeTaskExecutionDetails.
        :type: datetime
        """
        self._time_completed = time_completed

    @property
    def fleet_shape(self):
        """
        Gets the fleet_shape of this ComputeTaskExecutionDetails.

        :return: The fleet_shape of this ComputeTaskExecutionDetails.
        :rtype: oci.batch.models.FleetShapeExecutionDetails
        """
        return self._fleet_shape

    @fleet_shape.setter
    def fleet_shape(self, fleet_shape):
        """
        Sets the fleet_shape of this ComputeTaskExecutionDetails.

        :param fleet_shape: The fleet_shape of this ComputeTaskExecutionDetails.
        :type: oci.batch.models.FleetShapeExecutionDetails
        """
        self._fleet_shape = fleet_shape

    @property
    def completion_lifecycle_state(self):
        """
        Gets the completion_lifecycle_state of this ComputeTaskExecutionDetails.
        The terminal lifecycle state of the task for this execution. Valid values are: SUCCEEDED, NEEDS_ATTENTION, CANCELED, or FAILED.


        :return: The completion_lifecycle_state of this ComputeTaskExecutionDetails.
        :rtype: str
        """
        return self._completion_lifecycle_state

    @completion_lifecycle_state.setter
    def completion_lifecycle_state(self, completion_lifecycle_state):
        """
        Sets the completion_lifecycle_state of this ComputeTaskExecutionDetails.
        The terminal lifecycle state of the task for this execution. Valid values are: SUCCEEDED, NEEDS_ATTENTION, CANCELED, or FAILED.


        :param completion_lifecycle_state: The completion_lifecycle_state of this ComputeTaskExecutionDetails.
        :type: str
        """
        self._completion_lifecycle_state = completion_lifecycle_state

    @property
    def errors(self):
        """
        Gets the errors of this ComputeTaskExecutionDetails.
        List of error messages related to this task execution. Be aware that the maximum number of items returned may change in the future.


        :return: The errors of this ComputeTaskExecutionDetails.
        :rtype: list[str]
        """
        return self._errors

    @errors.setter
    def errors(self, errors):
        """
        Sets the errors of this ComputeTaskExecutionDetails.
        List of error messages related to this task execution. Be aware that the maximum number of items returned may change in the future.


        :param errors: The errors of this ComputeTaskExecutionDetails.
        :type: list[str]
        """
        self._errors = errors

    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
