# coding: utf-8

"""
    Kubernetes

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1.24.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from dragonk8s.dragon.configuration import Configuration


class IoDragonAppsV1JobSpec(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'active_deadline_seconds': 'int',
        'backoff_limit': 'int',
        'completion_mode': 'str',
        'completions': 'int',
        'manual_selector': 'bool',
        'parallelism': 'int',
        'selector': 'IoDragonAppsV1JobSpecSelector',
        'suspend': 'bool',
        'template': 'IoDragonAppsV1JobSpecTemplate',
        'ttl_seconds_after_finished': 'int'
    }

    attribute_map = {
        'active_deadline_seconds': 'activeDeadlineSeconds',
        'backoff_limit': 'backoffLimit',
        'completion_mode': 'completionMode',
        'completions': 'completions',
        'manual_selector': 'manualSelector',
        'parallelism': 'parallelism',
        'selector': 'selector',
        'suspend': 'suspend',
        'template': 'template',
        'ttl_seconds_after_finished': 'ttlSecondsAfterFinished'
    }

    def __init__(self, active_deadline_seconds=None, backoff_limit=None, completion_mode=None, completions=None, manual_selector=None, parallelism=None, selector=None, suspend=None, template=None, ttl_seconds_after_finished=None, local_vars_configuration=None):  # noqa: E501
        """IoDragonAppsV1JobSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._active_deadline_seconds = None
        self._backoff_limit = None
        self._completion_mode = None
        self._completions = None
        self._manual_selector = None
        self._parallelism = None
        self._selector = None
        self._suspend = None
        self._template = None
        self._ttl_seconds_after_finished = None
        self.discriminator = None

        if active_deadline_seconds is not None:
            self.active_deadline_seconds = active_deadline_seconds
        if backoff_limit is not None:
            self.backoff_limit = backoff_limit
        if completion_mode is not None:
            self.completion_mode = completion_mode
        if completions is not None:
            self.completions = completions
        if manual_selector is not None:
            self.manual_selector = manual_selector
        if parallelism is not None:
            self.parallelism = parallelism
        if selector is not None:
            self.selector = selector
        if suspend is not None:
            self.suspend = suspend
        self.template = template
        if ttl_seconds_after_finished is not None:
            self.ttl_seconds_after_finished = ttl_seconds_after_finished

    @property
    def active_deadline_seconds(self):
        """Gets the active_deadline_seconds of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The active_deadline_seconds of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: int
        """
        return self._active_deadline_seconds

    @active_deadline_seconds.setter
    def active_deadline_seconds(self, active_deadline_seconds):
        """Sets the active_deadline_seconds of this IoDragonAppsV1JobSpec.


        :param active_deadline_seconds: The active_deadline_seconds of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: int
        """

        self._active_deadline_seconds = active_deadline_seconds

    @property
    def backoff_limit(self):
        """Gets the backoff_limit of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The backoff_limit of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: int
        """
        return self._backoff_limit

    @backoff_limit.setter
    def backoff_limit(self, backoff_limit):
        """Sets the backoff_limit of this IoDragonAppsV1JobSpec.


        :param backoff_limit: The backoff_limit of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: int
        """

        self._backoff_limit = backoff_limit

    @property
    def completion_mode(self):
        """Gets the completion_mode of this IoDragonAppsV1JobSpec.  # noqa: E501

        CompletionMode specifies how Pod completions of a Job are tracked.  # noqa: E501

        :return: The completion_mode of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: str
        """
        return self._completion_mode

    @completion_mode.setter
    def completion_mode(self, completion_mode):
        """Sets the completion_mode of this IoDragonAppsV1JobSpec.

        CompletionMode specifies how Pod completions of a Job are tracked.  # noqa: E501

        :param completion_mode: The completion_mode of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: str
        """

        self._completion_mode = completion_mode

    @property
    def completions(self):
        """Gets the completions of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The completions of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: int
        """
        return self._completions

    @completions.setter
    def completions(self, completions):
        """Sets the completions of this IoDragonAppsV1JobSpec.


        :param completions: The completions of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: int
        """

        self._completions = completions

    @property
    def manual_selector(self):
        """Gets the manual_selector of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The manual_selector of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: bool
        """
        return self._manual_selector

    @manual_selector.setter
    def manual_selector(self, manual_selector):
        """Sets the manual_selector of this IoDragonAppsV1JobSpec.


        :param manual_selector: The manual_selector of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: bool
        """

        self._manual_selector = manual_selector

    @property
    def parallelism(self):
        """Gets the parallelism of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The parallelism of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: int
        """
        return self._parallelism

    @parallelism.setter
    def parallelism(self, parallelism):
        """Sets the parallelism of this IoDragonAppsV1JobSpec.


        :param parallelism: The parallelism of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: int
        """

        self._parallelism = parallelism

    @property
    def selector(self):
        """Gets the selector of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The selector of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: IoDragonAppsV1JobSpecSelector
        """
        return self._selector

    @selector.setter
    def selector(self, selector):
        """Sets the selector of this IoDragonAppsV1JobSpec.


        :param selector: The selector of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: IoDragonAppsV1JobSpecSelector
        """

        self._selector = selector

    @property
    def suspend(self):
        """Gets the suspend of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The suspend of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: bool
        """
        return self._suspend

    @suspend.setter
    def suspend(self, suspend):
        """Sets the suspend of this IoDragonAppsV1JobSpec.


        :param suspend: The suspend of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: bool
        """

        self._suspend = suspend

    @property
    def template(self):
        """Gets the template of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The template of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: IoDragonAppsV1JobSpecTemplate
        """
        return self._template

    @template.setter
    def template(self, template):
        """Sets the template of this IoDragonAppsV1JobSpec.


        :param template: The template of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: IoDragonAppsV1JobSpecTemplate
        """
        if self.local_vars_configuration.client_side_validation and template is None:  # noqa: E501
            raise ValueError("Invalid value for `template`, must not be `None`")  # noqa: E501

        self._template = template

    @property
    def ttl_seconds_after_finished(self):
        """Gets the ttl_seconds_after_finished of this IoDragonAppsV1JobSpec.  # noqa: E501


        :return: The ttl_seconds_after_finished of this IoDragonAppsV1JobSpec.  # noqa: E501
        :rtype: int
        """
        return self._ttl_seconds_after_finished

    @ttl_seconds_after_finished.setter
    def ttl_seconds_after_finished(self, ttl_seconds_after_finished):
        """Sets the ttl_seconds_after_finished of this IoDragonAppsV1JobSpec.


        :param ttl_seconds_after_finished: The ttl_seconds_after_finished of this IoDragonAppsV1JobSpec.  # noqa: E501
        :type: int
        """

        self._ttl_seconds_after_finished = ttl_seconds_after_finished

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, IoDragonAppsV1JobSpec):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, IoDragonAppsV1JobSpec):
            return True

        return self.to_dict() != other.to_dict()
