# 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 TopicSchemaFunction(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 = {
        'argument': 'list[TopicSchemaArgument]',
        'description': 'str',
        'function_name': 'str',
        'method': 'str',
        'path': 'str'
    }

    attribute_map = {
        'argument': 'argument',
        'description': 'description',
        'function_name': 'function-name',
        'method': 'method',
        'path': 'path'
    }

    def __init__(self, argument=None, description=None, function_name=None, method=None, path=None):  # noqa: E501
        """TopicSchemaFunction - a model defined in Swagger"""  # noqa: E501

        self._argument = None
        self._description = None
        self._function_name = None
        self._method = None
        self._path = None
        self.discriminator = None

        if argument is not None:
            self.argument = argument
        if description is not None:
            self.description = description
        self.function_name = function_name
        self.method = method
        self.path = path

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


        :return: The argument of this TopicSchemaFunction.  # noqa: E501
        :rtype: list[TopicSchemaArgument]
        """
        return self._argument

    @argument.setter
    def argument(self, argument):
        """Sets the argument of this TopicSchemaFunction.


        :param argument: The argument of this TopicSchemaFunction.  # noqa: E501
        :type: list[TopicSchemaArgument]
        """

        self._argument = argument

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

        Description of the function  # noqa: E501

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

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

        Description of the function  # noqa: E501

        :param description: The description of this TopicSchemaFunction.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Name of the function. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

        :return: The function_name of this TopicSchemaFunction.  # noqa: E501
        :rtype: str
        """
        return self._function_name

    @function_name.setter
    def function_name(self, function_name):
        """Sets the function_name of this TopicSchemaFunction.

        Name of the function. Should be of pattern [a-zA-Z][a-zA-Z0-9_-]*  # noqa: E501

        :param function_name: The function_name of this TopicSchemaFunction.  # noqa: E501
        :type: str
        """
        if function_name is None:
            raise ValueError("Invalid value for `function_name`, must not be `None`")  # noqa: E501
        if function_name is not None and len(function_name) > 64:
            raise ValueError("Invalid value for `function_name`, length must be less than or equal to `64`")  # noqa: E501
        if function_name is not None and len(function_name) < 1:
            raise ValueError("Invalid value for `function_name`, length must be greater than or equal to `1`")  # noqa: E501
        if function_name is not None and not re.search(r'^[a-zA-Z][a-zA-Z0-9_-]*$', function_name):  # noqa: E501
            raise ValueError(r"Invalid value for `function_name`, must be a follow pattern or equal to `/^[a-zA-Z][a-zA-Z0-9_-]*$/`")  # noqa: E501

        self._function_name = function_name

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

        Function to be called  # noqa: E501

        :return: The method of this TopicSchemaFunction.  # noqa: E501
        :rtype: str
        """
        return self._method

    @method.setter
    def method(self, method):
        """Sets the method of this TopicSchemaFunction.

        Function to be called  # noqa: E501

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

        self._method = method

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

        File in which function is defined. This is relative path to the data directory  # noqa: E501

        :return: The path of this TopicSchemaFunction.  # noqa: E501
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """Sets the path of this TopicSchemaFunction.

        File in which function is defined. This is relative path to the data directory  # noqa: E501

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

        self._path = path

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

        return self.__dict__ == other.__dict__

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