# coding: utf-8

"""
    Aron API

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

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from openapi_client.configuration import Configuration


class ResponsePipeline(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 = {
        'created_dt': 'datetime',
        'description': 'str',
        'last_triggered_dt': 'datetime',
        'last_triggered_reason': 'str',
        'name': 'str',
        'recent_executions': 'list[ResponseReducedPipelineExecution]',
        'spec': 'ResponsePipelineSpec',
        'triggers': 'list[ResponsePipelineTrigger]',
        'updated_dt': 'datetime'
    }

    attribute_map = {
        'created_dt': 'created_dt',
        'description': 'description',
        'last_triggered_dt': 'last_triggered_dt',
        'last_triggered_reason': 'last_triggered_reason',
        'name': 'name',
        'recent_executions': 'recent_executions',
        'spec': 'spec',
        'triggers': 'triggers',
        'updated_dt': 'updated_dt'
    }

    def __init__(self, created_dt=None, description=None, last_triggered_dt=None, last_triggered_reason=None, name=None, recent_executions=None, spec=None, triggers=None, updated_dt=None, local_vars_configuration=None):  # noqa: E501
        """ResponsePipeline - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._created_dt = None
        self._description = None
        self._last_triggered_dt = None
        self._last_triggered_reason = None
        self._name = None
        self._recent_executions = None
        self._spec = None
        self._triggers = None
        self._updated_dt = None
        self.discriminator = None

        self.created_dt = created_dt
        self.description = description
        self.last_triggered_dt = last_triggered_dt
        self.last_triggered_reason = last_triggered_reason
        self.name = name
        self.recent_executions = recent_executions
        if spec is not None:
            self.spec = spec
        self.triggers = triggers
        self.updated_dt = updated_dt

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


        :return: The created_dt of this ResponsePipeline.  # noqa: E501
        :rtype: datetime
        """
        return self._created_dt

    @created_dt.setter
    def created_dt(self, created_dt):
        """Sets the created_dt of this ResponsePipeline.


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

        self._created_dt = created_dt

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


        :return: The description of this ResponsePipeline.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ResponsePipeline.


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

        self._description = description

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


        :return: The last_triggered_dt of this ResponsePipeline.  # noqa: E501
        :rtype: datetime
        """
        return self._last_triggered_dt

    @last_triggered_dt.setter
    def last_triggered_dt(self, last_triggered_dt):
        """Sets the last_triggered_dt of this ResponsePipeline.


        :param last_triggered_dt: The last_triggered_dt of this ResponsePipeline.  # noqa: E501
        :type last_triggered_dt: datetime
        """

        self._last_triggered_dt = last_triggered_dt

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


        :return: The last_triggered_reason of this ResponsePipeline.  # noqa: E501
        :rtype: str
        """
        return self._last_triggered_reason

    @last_triggered_reason.setter
    def last_triggered_reason(self, last_triggered_reason):
        """Sets the last_triggered_reason of this ResponsePipeline.


        :param last_triggered_reason: The last_triggered_reason of this ResponsePipeline.  # noqa: E501
        :type last_triggered_reason: str
        """

        self._last_triggered_reason = last_triggered_reason

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


        :return: The name of this ResponsePipeline.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ResponsePipeline.


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

        self._name = name

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


        :return: The recent_executions of this ResponsePipeline.  # noqa: E501
        :rtype: list[ResponseReducedPipelineExecution]
        """
        return self._recent_executions

    @recent_executions.setter
    def recent_executions(self, recent_executions):
        """Sets the recent_executions of this ResponsePipeline.


        :param recent_executions: The recent_executions of this ResponsePipeline.  # noqa: E501
        :type recent_executions: list[ResponseReducedPipelineExecution]
        """
        if self.local_vars_configuration.client_side_validation and recent_executions is None:  # noqa: E501
            raise ValueError("Invalid value for `recent_executions`, must not be `None`")  # noqa: E501

        self._recent_executions = recent_executions

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


        :return: The spec of this ResponsePipeline.  # noqa: E501
        :rtype: ResponsePipelineSpec
        """
        return self._spec

    @spec.setter
    def spec(self, spec):
        """Sets the spec of this ResponsePipeline.


        :param spec: The spec of this ResponsePipeline.  # noqa: E501
        :type spec: ResponsePipelineSpec
        """

        self._spec = spec

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


        :return: The triggers of this ResponsePipeline.  # noqa: E501
        :rtype: list[ResponsePipelineTrigger]
        """
        return self._triggers

    @triggers.setter
    def triggers(self, triggers):
        """Sets the triggers of this ResponsePipeline.


        :param triggers: The triggers of this ResponsePipeline.  # noqa: E501
        :type triggers: list[ResponsePipelineTrigger]
        """
        if self.local_vars_configuration.client_side_validation and triggers is None:  # noqa: E501
            raise ValueError("Invalid value for `triggers`, must not be `None`")  # noqa: E501

        self._triggers = triggers

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


        :return: The updated_dt of this ResponsePipeline.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_dt

    @updated_dt.setter
    def updated_dt(self, updated_dt):
        """Sets the updated_dt of this ResponsePipeline.


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

        self._updated_dt = updated_dt

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, ResponsePipeline):
            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, ResponsePipeline):
            return True

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