# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class WorkflowCommandSchema(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 = {
        'command_tag': 'str',
        'commands': 'list[WorkflowCommandSchemaCommands]',
        'ignore': 'list[object]',
        'delay': 'str',
        'repeat': 'float',
        'type': 'str',
        'arguments': 'list[str]',
        'environment': 'list[str]',
        'device': 'list[str]',
        'device_group': 'list[str]'
    }

    attribute_map = {
        'command_tag': 'command-tag',
        'commands': 'commands',
        'ignore': 'ignore',
        'delay': 'delay',
        'repeat': 'repeat',
        'type': 'type',
        'arguments': 'arguments',
        'environment': 'environment',
        'device': 'device',
        'device_group': 'device-group'
    }

    def __init__(self, command_tag=None, commands=None, ignore=None, delay='10s', repeat=None, type=None, arguments=None, environment=None, device=None, device_group=None):  # noqa: E501
        """WorkflowCommandSchema - a model defined in Swagger"""  # noqa: E501

        self._command_tag = None
        self._commands = None
        self._ignore = None
        self._delay = None
        self._repeat = None
        self._type = None
        self._arguments = None
        self._environment = None
        self._device = None
        self._device_group = None
        self.discriminator = None

        self.command_tag = command_tag
        if commands is not None:
            self.commands = commands
        if ignore is not None:
            self.ignore = ignore
        if delay is not None:
            self.delay = delay
        if repeat is not None:
            self.repeat = repeat
        if type is not None:
            self.type = type
        if arguments is not None:
            self.arguments = arguments
        if environment is not None:
            self.environment = environment
        if device is not None:
            self.device = device
        if device_group is not None:
            self.device_group = device_group

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

        Command tag  # noqa: E501

        :return: The command_tag of this WorkflowCommandSchema.  # noqa: E501
        :rtype: str
        """
        return self._command_tag

    @command_tag.setter
    def command_tag(self, command_tag):
        """Sets the command_tag of this WorkflowCommandSchema.

        Command tag  # noqa: E501

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

        self._command_tag = command_tag

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

        List of commands to execute  # noqa: E501

        :return: The commands of this WorkflowCommandSchema.  # noqa: E501
        :rtype: list[WorkflowCommandSchemaCommands]
        """
        return self._commands

    @commands.setter
    def commands(self, commands):
        """Sets the commands of this WorkflowCommandSchema.

        List of commands to execute  # noqa: E501

        :param commands: The commands of this WorkflowCommandSchema.  # noqa: E501
        :type: list[WorkflowCommandSchemaCommands]
        """

        self._commands = commands

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

        Ignore if this command fails  # noqa: E501

        :return: The ignore of this WorkflowCommandSchema.  # noqa: E501
        :rtype: list[object]
        """
        return self._ignore

    @ignore.setter
    def ignore(self, ignore):
        """Sets the ignore of this WorkflowCommandSchema.

        Ignore if this command fails  # noqa: E501

        :param ignore: The ignore of this WorkflowCommandSchema.  # noqa: E501
        :type: list[object]
        """

        self._ignore = ignore

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

        Delay between this command's repeated attempts  # noqa: E501

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

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

        Delay between this command's repeated attempts  # noqa: E501

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

        self._delay = delay

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

        Repeat this command on failure  # noqa: E501

        :return: The repeat of this WorkflowCommandSchema.  # noqa: E501
        :rtype: float
        """
        return self._repeat

    @repeat.setter
    def repeat(self, repeat):
        """Sets the repeat of this WorkflowCommandSchema.

        Repeat this command on failure  # noqa: E501

        :param repeat: The repeat of this WorkflowCommandSchema.  # noqa: E501
        :type: float
        """

        self._repeat = repeat

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

        Type of the data produced or consumed  # noqa: E501

        :return: The type of this WorkflowCommandSchema.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this WorkflowCommandSchema.

        Type of the data produced or consumed  # noqa: E501

        :param type: The type of this WorkflowCommandSchema.  # noqa: E501
        :type: str
        """
        allowed_values = ["data-xml", "json", "text"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The arguments of this WorkflowCommandSchema.  # noqa: E501
        :rtype: list[str]
        """
        return self._arguments

    @arguments.setter
    def arguments(self, arguments):
        """Sets the arguments of this WorkflowCommandSchema.


        :param arguments: The arguments of this WorkflowCommandSchema.  # noqa: E501
        :type: list[str]
        """

        self._arguments = arguments

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


        :return: The environment of this WorkflowCommandSchema.  # noqa: E501
        :rtype: list[str]
        """
        return self._environment

    @environment.setter
    def environment(self, environment):
        """Sets the environment of this WorkflowCommandSchema.


        :param environment: The environment of this WorkflowCommandSchema.  # noqa: E501
        :type: list[str]
        """

        self._environment = environment

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


        :return: The device of this WorkflowCommandSchema.  # noqa: E501
        :rtype: list[str]
        """
        return self._device

    @device.setter
    def device(self, device):
        """Sets the device of this WorkflowCommandSchema.


        :param device: The device of this WorkflowCommandSchema.  # noqa: E501
        :type: list[str]
        """

        self._device = device

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


        :return: The device_group of this WorkflowCommandSchema.  # noqa: E501
        :rtype: list[str]
        """
        return self._device_group

    @device_group.setter
    def device_group(self, device_group):
        """Sets the device_group of this WorkflowCommandSchema.


        :param device_group: The device_group of this WorkflowCommandSchema.  # noqa: E501
        :type: list[str]
        """

        self._device_group = device_group

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

        return self.__dict__ == other.__dict__

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