# coding: utf-8

"""
    Automation Actions V4

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v4
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from hubspot.automation.actions.configuration import Configuration


class PublicConditionalSingleFieldDependency(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {"dependency_type": "str", "controlling_field_name": "str", "controlling_field_value": "str", "dependent_field_names": "list[str]"}

    attribute_map = {
        "dependency_type": "dependencyType",
        "controlling_field_name": "controllingFieldName",
        "controlling_field_value": "controllingFieldValue",
        "dependent_field_names": "dependentFieldNames",
    }

    def __init__(self, dependency_type="CONDITIONAL_SINGLE_FIELD", controlling_field_name=None, controlling_field_value=None, dependent_field_names=None, local_vars_configuration=None):  # noqa: E501
        """PublicConditionalSingleFieldDependency - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._dependency_type = None
        self._controlling_field_name = None
        self._controlling_field_value = None
        self._dependent_field_names = None
        self.discriminator = None

        self.dependency_type = dependency_type
        self.controlling_field_name = controlling_field_name
        self.controlling_field_value = controlling_field_value
        self.dependent_field_names = dependent_field_names

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


        :return: The dependency_type of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :rtype: str
        """
        return self._dependency_type

    @dependency_type.setter
    def dependency_type(self, dependency_type):
        """Sets the dependency_type of this PublicConditionalSingleFieldDependency.


        :param dependency_type: The dependency_type of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :type dependency_type: str
        """
        if self.local_vars_configuration.client_side_validation and dependency_type is None:  # noqa: E501
            raise ValueError("Invalid value for `dependency_type`, must not be `None`")  # noqa: E501
        allowed_values = ["CONDITIONAL_SINGLE_FIELD"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and dependency_type not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `dependency_type` ({0}), must be one of {1}".format(dependency_type, allowed_values))  # noqa: E501

        self._dependency_type = dependency_type

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


        :return: The controlling_field_name of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :rtype: str
        """
        return self._controlling_field_name

    @controlling_field_name.setter
    def controlling_field_name(self, controlling_field_name):
        """Sets the controlling_field_name of this PublicConditionalSingleFieldDependency.


        :param controlling_field_name: The controlling_field_name of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :type controlling_field_name: str
        """
        if self.local_vars_configuration.client_side_validation and controlling_field_name is None:  # noqa: E501
            raise ValueError("Invalid value for `controlling_field_name`, must not be `None`")  # noqa: E501

        self._controlling_field_name = controlling_field_name

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


        :return: The controlling_field_value of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :rtype: str
        """
        return self._controlling_field_value

    @controlling_field_value.setter
    def controlling_field_value(self, controlling_field_value):
        """Sets the controlling_field_value of this PublicConditionalSingleFieldDependency.


        :param controlling_field_value: The controlling_field_value of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :type controlling_field_value: str
        """
        if self.local_vars_configuration.client_side_validation and controlling_field_value is None:  # noqa: E501
            raise ValueError("Invalid value for `controlling_field_value`, must not be `None`")  # noqa: E501

        self._controlling_field_value = controlling_field_value

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


        :return: The dependent_field_names of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :rtype: list[str]
        """
        return self._dependent_field_names

    @dependent_field_names.setter
    def dependent_field_names(self, dependent_field_names):
        """Sets the dependent_field_names of this PublicConditionalSingleFieldDependency.


        :param dependent_field_names: The dependent_field_names of this PublicConditionalSingleFieldDependency.  # noqa: E501
        :type dependent_field_names: list[str]
        """
        if self.local_vars_configuration.client_side_validation and dependent_field_names is None:  # noqa: E501
            raise ValueError("Invalid value for `dependent_field_names`, must not be `None`")  # noqa: E501

        self._dependent_field_names = dependent_field_names

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(lambda x: convert(x), value))
            elif isinstance(value, dict):
                result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items()))
            else:
                result[attr] = convert(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, PublicConditionalSingleFieldDependency):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
