# coding: utf-8

"""
    Seeq REST API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

from pprint import pformat
from six import iteritems
import re


class ConfigFieldV1(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 = {
        'allow_null': 'bool',
        'description': 'str',
        'name': 'str',
        'path': 'str',
        'type': 'str',
        'value': 'object'
    }

    attribute_map = {
        'allow_null': 'allowNull',
        'description': 'description',
        'name': 'name',
        'path': 'path',
        'type': 'type',
        'value': 'value'
    }

    def __init__(self, allow_null=None, description=None, name=None, path=None, type=None, value=None):
        """
        ConfigFieldV1 - a model defined in Swagger
        """

        self._allow_null = None
        self._description = None
        self._name = None
        self._path = None
        self._type = None
        self._value = None

        if allow_null is not None:
          self.allow_null = allow_null
        if description is not None:
          self.description = description
        if name is not None:
          self.name = name
        if path is not None:
          self.path = path
        if type is not None:
          self.type = type
        if value is not None:
          self.value = value

    @property
    def allow_null(self):
        """
        Gets the allow_null of this ConfigFieldV1.
        Whether a null value is allowed

        :return: The allow_null of this ConfigFieldV1.
        :rtype: bool
        """
        return self._allow_null

    @allow_null.setter
    def allow_null(self, allow_null):
        """
        Sets the allow_null of this ConfigFieldV1.
        Whether a null value is allowed

        :param allow_null: The allow_null of this ConfigFieldV1.
        :type: bool
        """
        if allow_null is None:
            raise ValueError("Invalid value for `allow_null`, must not be `None`")

        self._allow_null = allow_null

    @property
    def description(self):
        """
        Gets the description of this ConfigFieldV1.
        Description of the field to be used in connection configuration interface

        :return: The description of this ConfigFieldV1.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this ConfigFieldV1.
        Description of the field to be used in connection configuration interface

        :param description: The description of this ConfigFieldV1.
        :type: str
        """

        self._description = description

    @property
    def name(self):
        """
        Gets the name of this ConfigFieldV1.
        The name of the field.  It is set to the last component of the Path

        :return: The name of this ConfigFieldV1.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this ConfigFieldV1.
        The name of the field.  It is set to the last component of the Path

        :param name: The name of this ConfigFieldV1.
        :type: str
        """

        self._name = name

    @property
    def path(self):
        """
        Gets the path of this ConfigFieldV1.
        JSON Path to the configuration parameter, omitting array indices

        :return: The path of this ConfigFieldV1.
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """
        Sets the path of this ConfigFieldV1.
        JSON Path to the configuration parameter, omitting array indices

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

        self._path = path

    @property
    def type(self):
        """
        Gets the type of this ConfigFieldV1.
        Field configuration type

        :return: The type of this ConfigFieldV1.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this ConfigFieldV1.
        Field configuration type

        :param type: The type of this ConfigFieldV1.
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")
        allowed_values = ["SecretConfigFieldV1", "StringConfigFieldV1", "DoubleConfigFieldV1", "LongConfigFieldV1", "BooleanConfigFieldV1", "RegexConfigFieldV1", "DurationConfigFieldV1", "ListConfigFieldV1", "EnumConfigFieldV1"]
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"
                .format(type, allowed_values)
            )

        self._type = type

    @property
    def value(self):
        """
        Gets the value of this ConfigFieldV1.
        Configuration field value

        :return: The value of this ConfigFieldV1.
        :rtype: object
        """
        return self._value

    @value.setter
    def value(self, value):
        """
        Sets the value of this ConfigFieldV1.
        Configuration field value

        :param value: The value of this ConfigFieldV1.
        :type: object
        """

        self._value = value

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, ConfigFieldV1):
            return False

        return self.__dict__ == other.__dict__

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