# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ServiceRestartPolicyChild(object):
    """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 = {
        'condition': 'str',
        'delay': 'str',
        'max_attempts': 'int',
        'window': 'str'
    }

    attribute_map = {
        'condition': 'Condition',
        'delay': 'Delay',
        'max_attempts': 'MaxAttempts',
        'window': 'Window'
    }

    def __init__(self, condition=None, delay=None, max_attempts=None, window=None):  # noqa: E501
        """ServiceRestartPolicyChild - a model defined in Swagger"""  # noqa: E501
        self._condition = None
        self._delay = None
        self._max_attempts = None
        self._window = None
        self.discriminator = None
        if condition is not None:
            self.condition = condition
        if delay is not None:
            self.delay = delay
        if max_attempts is not None:
            self.max_attempts = max_attempts
        if window is not None:
            self.window = window

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


        :return: The condition of this ServiceRestartPolicyChild.  # noqa: E501
        :rtype: str
        """
        return self._condition

    @condition.setter
    def condition(self, condition):
        """Sets the condition of this ServiceRestartPolicyChild.


        :param condition: The condition of this ServiceRestartPolicyChild.  # noqa: E501
        :type: str
        """

        self._condition = condition

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


        :return: The delay of this ServiceRestartPolicyChild.  # noqa: E501
        :rtype: str
        """
        return self._delay

    @delay.setter
    def delay(self, delay):
        """Sets the delay of this ServiceRestartPolicyChild.


        :param delay: The delay of this ServiceRestartPolicyChild.  # noqa: E501
        :type: str
        """

        self._delay = delay

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


        :return: The max_attempts of this ServiceRestartPolicyChild.  # noqa: E501
        :rtype: int
        """
        return self._max_attempts

    @max_attempts.setter
    def max_attempts(self, max_attempts):
        """Sets the max_attempts of this ServiceRestartPolicyChild.


        :param max_attempts: The max_attempts of this ServiceRestartPolicyChild.  # noqa: E501
        :type: int
        """

        self._max_attempts = max_attempts

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


        :return: The window of this ServiceRestartPolicyChild.  # noqa: E501
        :rtype: str
        """
        return self._window

    @window.setter
    def window(self, window):
        """Sets the window of this ServiceRestartPolicyChild.


        :param window: The window of this ServiceRestartPolicyChild.  # noqa: E501
        :type: str
        """

        self._window = window

    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(ServiceRestartPolicyChild, 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, ServiceRestartPolicyChild):
            return False

        return self.__dict__ == other.__dict__

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