# coding: utf-8

"""
    Pulp 3 API

    Fetch, Upload, Organize, and Distribute Software Packages  # noqa: E501

    The version of the OpenAPI document: v3
    Contact: pulp-list@redhat.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from pulpcore.client.pulpcore.configuration import Configuration


class TaskScheduleResponse(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 = {
        'pulp_href': 'str',
        'pulp_created': 'datetime',
        'name': 'str',
        'task_name': 'str',
        'dispatch_interval': 'str',
        'next_dispatch': 'datetime',
        'last_task': 'str'
    }

    attribute_map = {
        'pulp_href': 'pulp_href',
        'pulp_created': 'pulp_created',
        'name': 'name',
        'task_name': 'task_name',
        'dispatch_interval': 'dispatch_interval',
        'next_dispatch': 'next_dispatch',
        'last_task': 'last_task'
    }

    def __init__(self, pulp_href=None, pulp_created=None, name=None, task_name=None, dispatch_interval=None, next_dispatch=None, last_task=None, local_vars_configuration=None):  # noqa: E501
        """TaskScheduleResponse - 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._pulp_href = None
        self._pulp_created = None
        self._name = None
        self._task_name = None
        self._dispatch_interval = None
        self._next_dispatch = None
        self._last_task = None
        self.discriminator = None

        if pulp_href is not None:
            self.pulp_href = pulp_href
        if pulp_created is not None:
            self.pulp_created = pulp_created
        self.name = name
        self.task_name = task_name
        self.dispatch_interval = dispatch_interval
        if next_dispatch is not None:
            self.next_dispatch = next_dispatch
        if last_task is not None:
            self.last_task = last_task

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


        :return: The pulp_href of this TaskScheduleResponse.  # noqa: E501
        :rtype: str
        """
        return self._pulp_href

    @pulp_href.setter
    def pulp_href(self, pulp_href):
        """Sets the pulp_href of this TaskScheduleResponse.


        :param pulp_href: The pulp_href of this TaskScheduleResponse.  # noqa: E501
        :type: str
        """

        self._pulp_href = pulp_href

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

        Timestamp of creation.  # noqa: E501

        :return: The pulp_created of this TaskScheduleResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._pulp_created

    @pulp_created.setter
    def pulp_created(self, pulp_created):
        """Sets the pulp_created of this TaskScheduleResponse.

        Timestamp of creation.  # noqa: E501

        :param pulp_created: The pulp_created of this TaskScheduleResponse.  # noqa: E501
        :type: datetime
        """

        self._pulp_created = pulp_created

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

        The name of the task schedule.  # noqa: E501

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

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

        The name of the task schedule.  # noqa: E501

        :param name: The name of this TaskScheduleResponse.  # noqa: E501
        :type: 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 task_name(self):
        """Gets the task_name of this TaskScheduleResponse.  # noqa: E501

        The name of the task to be scheduled.  # noqa: E501

        :return: The task_name of this TaskScheduleResponse.  # noqa: E501
        :rtype: str
        """
        return self._task_name

    @task_name.setter
    def task_name(self, task_name):
        """Sets the task_name of this TaskScheduleResponse.

        The name of the task to be scheduled.  # noqa: E501

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

        self._task_name = task_name

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

        Periodicity of the schedule.  # noqa: E501

        :return: The dispatch_interval of this TaskScheduleResponse.  # noqa: E501
        :rtype: str
        """
        return self._dispatch_interval

    @dispatch_interval.setter
    def dispatch_interval(self, dispatch_interval):
        """Sets the dispatch_interval of this TaskScheduleResponse.

        Periodicity of the schedule.  # noqa: E501

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

        self._dispatch_interval = dispatch_interval

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

        Timestamp of the next time the task will be dispatched.  # noqa: E501

        :return: The next_dispatch of this TaskScheduleResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._next_dispatch

    @next_dispatch.setter
    def next_dispatch(self, next_dispatch):
        """Sets the next_dispatch of this TaskScheduleResponse.

        Timestamp of the next time the task will be dispatched.  # noqa: E501

        :param next_dispatch: The next_dispatch of this TaskScheduleResponse.  # noqa: E501
        :type: datetime
        """

        self._next_dispatch = next_dispatch

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

        The last task dispatched by this schedule.  # noqa: E501

        :return: The last_task of this TaskScheduleResponse.  # noqa: E501
        :rtype: str
        """
        return self._last_task

    @last_task.setter
    def last_task(self, last_task):
        """Sets the last_task of this TaskScheduleResponse.

        The last task dispatched by this schedule.  # noqa: E501

        :param last_task: The last_task of this TaskScheduleResponse.  # noqa: E501
        :type: str
        """

        self._last_task = last_task

    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, TaskScheduleResponse):
            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, TaskScheduleResponse):
            return True

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