# 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 RuleSchemaIAgent(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 = {
        'args': 'list[RuleSchemaIAgentArgs]',
        'file': 'str',
        'frequency': 'str',
        'table': 'str',
        'target': 'str'
    }

    attribute_map = {
        'args': 'args',
        'file': 'file',
        'frequency': 'frequency',
        'table': 'table',
        'target': 'target'
    }

    def __init__(self, args=None, file=None, frequency=None, table=None, target=None):  # noqa: E501
        """RuleSchemaIAgent - a model defined in Swagger"""  # noqa: E501

        self._args = None
        self._file = None
        self._frequency = None
        self._table = None
        self._target = None
        self.discriminator = None

        if args is not None:
            self.args = args
        self.file = file
        self.frequency = frequency
        self.table = table
        if target is not None:
            self.target = target

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


        :return: The args of this RuleSchemaIAgent.  # noqa: E501
        :rtype: list[RuleSchemaIAgentArgs]
        """
        return self._args

    @args.setter
    def args(self, args):
        """Sets the args of this RuleSchemaIAgent.


        :param args: The args of this RuleSchemaIAgent.  # noqa: E501
        :type: list[RuleSchemaIAgentArgs]
        """

        self._args = args

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

        File where table and views are defined  # noqa: E501

        :return: The file of this RuleSchemaIAgent.  # noqa: E501
        :rtype: str
        """
        return self._file

    @file.setter
    def file(self, file):
        """Sets the file of this RuleSchemaIAgent.

        File where table and views are defined  # noqa: E501

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

        self._file = file

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

        Frequency at which the iagent should execute the commands and extract the data. Specify positive integer followed by s/m/h/d/w/y representing seconds/minutes/hours/days/weeks/years. Eg: 2s  # noqa: E501

        :return: The frequency of this RuleSchemaIAgent.  # noqa: E501
        :rtype: str
        """
        return self._frequency

    @frequency.setter
    def frequency(self, frequency):
        """Sets the frequency of this RuleSchemaIAgent.

        Frequency at which the iagent should execute the commands and extract the data. Specify positive integer followed by s/m/h/d/w/y representing seconds/minutes/hours/days/weeks/years. Eg: 2s  # noqa: E501

        :param frequency: The frequency of this RuleSchemaIAgent.  # noqa: E501
        :type: str
        """
        if frequency is None:
            raise ValueError("Invalid value for `frequency`, must not be `None`")  # noqa: E501
        if frequency is not None and not re.search(r'^[1-9][0-9]*[smhdwy]$', frequency):  # noqa: E501
            raise ValueError(r"Invalid value for `frequency`, must be a follow pattern or equal to `/^[1-9][0-9]*[smhdwy]$/`")  # noqa: E501

        self._frequency = frequency

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

        Table which needs to be used to extract the data  # noqa: E501

        :return: The table of this RuleSchemaIAgent.  # noqa: E501
        :rtype: str
        """
        return self._table

    @table.setter
    def table(self, table):
        """Sets the table of this RuleSchemaIAgent.

        Table which needs to be used to extract the data  # noqa: E501

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

        self._table = table

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

        To run command on FPC, specifiy FPC target (optional)  # noqa: E501

        :return: The target of this RuleSchemaIAgent.  # noqa: E501
        :rtype: str
        """
        return self._target

    @target.setter
    def target(self, target):
        """Sets the target of this RuleSchemaIAgent.

        To run command on FPC, specifiy FPC target (optional)  # noqa: E501

        :param target: The target of this RuleSchemaIAgent.  # noqa: E501
        :type: str
        """

        self._target = target

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

        return self.__dict__ == other.__dict__

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