# 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 .create_batch_task_details import CreateBatchTaskDetails
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 CreateGroupTaskDetails(CreateBatchTaskDetails):
    """
    Group task is a construct that represents a container of tasks for execution.
    """

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

        :param name:
            The value to assign to the name property of this CreateGroupTaskDetails.
        :type name: str

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

        :param type:
            The value to assign to the type property of this CreateGroupTaskDetails.
            Allowed values for this property are: "COMPUTE", "GROUP"
        :type type: str

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

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

        :param environment_variables:
            The value to assign to the environment_variables property of this CreateGroupTaskDetails.
        :type environment_variables: list[oci.batch.models.EnvironmentVariable]

        :param tasks:
            The value to assign to the tasks property of this CreateGroupTaskDetails.
        :type tasks: list[oci.batch.models.CreateBatchTaskDetails]

        """
        self.swagger_types = {
            'name': 'str',
            'description': 'str',
            'type': 'str',
            'entitlement_claims': 'list[str]',
            'dependencies': 'list[str]',
            'environment_variables': 'list[EnvironmentVariable]',
            'tasks': 'list[CreateBatchTaskDetails]'
        }
        self.attribute_map = {
            'name': 'name',
            'description': 'description',
            'type': 'type',
            'entitlement_claims': 'entitlementClaims',
            'dependencies': 'dependencies',
            'environment_variables': 'environmentVariables',
            'tasks': 'tasks'
        }
        self._name = None
        self._description = None
        self._type = None
        self._entitlement_claims = None
        self._dependencies = None
        self._environment_variables = None
        self._tasks = None
        self._type = 'GROUP'

    @property
    def tasks(self):
        """
        **[Required]** Gets the tasks of this CreateGroupTaskDetails.
        A list of tasks to be executed within this group task.


        :return: The tasks of this CreateGroupTaskDetails.
        :rtype: list[oci.batch.models.CreateBatchTaskDetails]
        """
        return self._tasks

    @tasks.setter
    def tasks(self, tasks):
        """
        Sets the tasks of this CreateGroupTaskDetails.
        A list of tasks to be executed within this group task.


        :param tasks: The tasks of this CreateGroupTaskDetails.
        :type: list[oci.batch.models.CreateBatchTaskDetails]
        """
        self._tasks = tasks

    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
