# coding: utf-8

"""
    AristaFlowREST/WorklistManager

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 6.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from af_worklist_manager.models.time_trigger import TimeTrigger  # noqa: F401,E501

class TimedProcessTrigger(TimeTrigger):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'template': 'ProcessTemplateRef',
        'started_insts': 'list[str]',
        'on_rule': 'str',
        'off_rule': 'str'
    }
    if hasattr(TimeTrigger, "swagger_types"):
        swagger_types.update(TimeTrigger.swagger_types)

    attribute_map = {
        'template': 'template',
        'started_insts': 'startedInsts',
        'on_rule': 'onRule',
        'off_rule': 'offRule'
    }
    if hasattr(TimeTrigger, "attribute_map"):
        attribute_map.update(TimeTrigger.attribute_map)

    def __init__(self, template=None, started_insts=None, on_rule=None, off_rule=None, *args, **kwargs):  # noqa: E501
        """TimedProcessTrigger - a model defined in Swagger"""  # noqa: E501
        self._template = None
        self._started_insts = None
        self._on_rule = None
        self._off_rule = None
        if not(hasattr(self, "discriminator")) or not(self.discriminator):
            self.discriminator = None
        self.template = template
        if started_insts is not None:
            self.started_insts = started_insts
        self.on_rule = on_rule
        if off_rule is not None:
            self.off_rule = off_rule
        TimeTrigger.__init__(self, *args, **kwargs)

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


        :return: The template of this TimedProcessTrigger.  # noqa: E501
        :rtype: ProcessTemplateRef
        """
        return self._template

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


        :param template: The template of this TimedProcessTrigger.  # noqa: E501
        :type: ProcessTemplateRef
        """
        if template is None:
            raise ValueError("Invalid value for `template`, must not be `None`")  # noqa: E501

        self._template = template

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


        :return: The started_insts of this TimedProcessTrigger.  # noqa: E501
        :rtype: list[str]
        """
        return self._started_insts

    @started_insts.setter
    def started_insts(self, started_insts):
        """Sets the started_insts of this TimedProcessTrigger.


        :param started_insts: The started_insts of this TimedProcessTrigger.  # noqa: E501
        :type: list[str]
        """

        self._started_insts = started_insts

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


        :return: The on_rule of this TimedProcessTrigger.  # noqa: E501
        :rtype: str
        """
        return self._on_rule

    @on_rule.setter
    def on_rule(self, on_rule):
        """Sets the on_rule of this TimedProcessTrigger.


        :param on_rule: The on_rule of this TimedProcessTrigger.  # noqa: E501
        :type: str
        """
        if on_rule is None:
            raise ValueError("Invalid value for `on_rule`, must not be `None`")  # noqa: E501

        self._on_rule = on_rule

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


        :return: The off_rule of this TimedProcessTrigger.  # noqa: E501
        :rtype: str
        """
        return self._off_rule

    @off_rule.setter
    def off_rule(self, off_rule):
        """Sets the off_rule of this TimedProcessTrigger.


        :param off_rule: The off_rule of this TimedProcessTrigger.  # noqa: E501
        :type: str
        """

        self._off_rule = off_rule

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(TimedProcessTrigger, dict):
            for key, value in self.items():
                result[key] = 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, TimedProcessTrigger):
            return False

        return self.__dict__ == other.__dict__

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