# 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 TaggingprofileSchemaWhenExists(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 = {
        'field': 'str',
        'path': 'str',
        'in_memory': 'bool'
    }

    attribute_map = {
        'field': 'field',
        'path': 'path',
        'in_memory': 'in-memory'
    }

    def __init__(self, field=None, path=None, in_memory=None):  # noqa: E501
        """TaggingprofileSchemaWhenExists - a model defined in Swagger"""  # noqa: E501

        self._field = None
        self._path = None
        self._in_memory = None
        self.discriminator = None

        self.field = field
        if path is not None:
            self.path = path
        if in_memory is not None:
            self.in_memory = in_memory

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

        This is the string that we need to look for within path when in-memory is set to True, else this contains the field-name that we need to look for in TSDB  # noqa: E501

        :return: The field of this TaggingprofileSchemaWhenExists.  # noqa: E501
        :rtype: str
        """
        return self._field

    @field.setter
    def field(self, field):
        """Sets the field of this TaggingprofileSchemaWhenExists.

        This is the string that we need to look for within path when in-memory is set to True, else this contains the field-name that we need to look for in TSDB  # noqa: E501

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

        self._field = field

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

        Look for the field value in the given path, if it exist as key in dict or value in list if in-memory is set to true  # noqa: E501

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

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

        Look for the field value in the given path, if it exist as key in dict or value in list if in-memory is set to true  # noqa: E501

        :param path: The path of this TaggingprofileSchemaWhenExists.  # noqa: E501
        :type: str
        """

        self._path = path

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

        Look for field in internal cache path  # noqa: E501

        :return: The in_memory of this TaggingprofileSchemaWhenExists.  # noqa: E501
        :rtype: bool
        """
        return self._in_memory

    @in_memory.setter
    def in_memory(self, in_memory):
        """Sets the in_memory of this TaggingprofileSchemaWhenExists.

        Look for field in internal cache path  # noqa: E501

        :param in_memory: The in_memory of this TaggingprofileSchemaWhenExists.  # noqa: E501
        :type: bool
        """

        self._in_memory = in_memory

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

        return self.__dict__ == other.__dict__

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