# 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 PublicActionDefinitionEgg(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 = {
        "input_fields": "list[InputFieldDefinition]",
        "output_fields": "list[OutputFieldDefinition]",
        "archived_at": "int",
        "functions": "list[PublicActionFunction]",
        "action_url": "str",
        "input_field_dependencies": "list[PublicActionDefinitionInputFieldDependenciesInner]",
        "published": "bool",
        "execution_rules": "list[PublicExecutionTranslationRule]",
        "object_types": "list[str]",
        "object_request_options": "PublicObjectRequestOptions",
        "labels": "dict[str, PublicActionLabels]",
    }

    attribute_map = {
        "input_fields": "inputFields",
        "output_fields": "outputFields",
        "archived_at": "archivedAt",
        "functions": "functions",
        "action_url": "actionUrl",
        "input_field_dependencies": "inputFieldDependencies",
        "published": "published",
        "execution_rules": "executionRules",
        "object_types": "objectTypes",
        "object_request_options": "objectRequestOptions",
        "labels": "labels",
    }

    def __init__(
        self,
        input_fields=None,
        output_fields=None,
        archived_at=None,
        functions=None,
        action_url=None,
        input_field_dependencies=None,
        published=None,
        execution_rules=None,
        object_types=None,
        object_request_options=None,
        labels=None,
        local_vars_configuration=None,
    ):  # noqa: E501
        """PublicActionDefinitionEgg - 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._input_fields = None
        self._output_fields = None
        self._archived_at = None
        self._functions = None
        self._action_url = None
        self._input_field_dependencies = None
        self._published = None
        self._execution_rules = None
        self._object_types = None
        self._object_request_options = None
        self._labels = None
        self.discriminator = None

        self.input_fields = input_fields
        if output_fields is not None:
            self.output_fields = output_fields
        if archived_at is not None:
            self.archived_at = archived_at
        self.functions = functions
        self.action_url = action_url
        if input_field_dependencies is not None:
            self.input_field_dependencies = input_field_dependencies
        self.published = published
        if execution_rules is not None:
            self.execution_rules = execution_rules
        self.object_types = object_types
        if object_request_options is not None:
            self.object_request_options = object_request_options
        self.labels = labels

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


        :return: The input_fields of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: list[InputFieldDefinition]
        """
        return self._input_fields

    @input_fields.setter
    def input_fields(self, input_fields):
        """Sets the input_fields of this PublicActionDefinitionEgg.


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

        self._input_fields = input_fields

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


        :return: The output_fields of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: list[OutputFieldDefinition]
        """
        return self._output_fields

    @output_fields.setter
    def output_fields(self, output_fields):
        """Sets the output_fields of this PublicActionDefinitionEgg.


        :param output_fields: The output_fields of this PublicActionDefinitionEgg.  # noqa: E501
        :type output_fields: list[OutputFieldDefinition]
        """

        self._output_fields = output_fields

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


        :return: The archived_at of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: int
        """
        return self._archived_at

    @archived_at.setter
    def archived_at(self, archived_at):
        """Sets the archived_at of this PublicActionDefinitionEgg.


        :param archived_at: The archived_at of this PublicActionDefinitionEgg.  # noqa: E501
        :type archived_at: int
        """

        self._archived_at = archived_at

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


        :return: The functions of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: list[PublicActionFunction]
        """
        return self._functions

    @functions.setter
    def functions(self, functions):
        """Sets the functions of this PublicActionDefinitionEgg.


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

        self._functions = functions

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


        :return: The action_url of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: str
        """
        return self._action_url

    @action_url.setter
    def action_url(self, action_url):
        """Sets the action_url of this PublicActionDefinitionEgg.


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

        self._action_url = action_url

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


        :return: The input_field_dependencies of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: list[PublicActionDefinitionInputFieldDependenciesInner]
        """
        return self._input_field_dependencies

    @input_field_dependencies.setter
    def input_field_dependencies(self, input_field_dependencies):
        """Sets the input_field_dependencies of this PublicActionDefinitionEgg.


        :param input_field_dependencies: The input_field_dependencies of this PublicActionDefinitionEgg.  # noqa: E501
        :type input_field_dependencies: list[PublicActionDefinitionInputFieldDependenciesInner]
        """

        self._input_field_dependencies = input_field_dependencies

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


        :return: The published of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: bool
        """
        return self._published

    @published.setter
    def published(self, published):
        """Sets the published of this PublicActionDefinitionEgg.


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

        self._published = published

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


        :return: The execution_rules of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: list[PublicExecutionTranslationRule]
        """
        return self._execution_rules

    @execution_rules.setter
    def execution_rules(self, execution_rules):
        """Sets the execution_rules of this PublicActionDefinitionEgg.


        :param execution_rules: The execution_rules of this PublicActionDefinitionEgg.  # noqa: E501
        :type execution_rules: list[PublicExecutionTranslationRule]
        """

        self._execution_rules = execution_rules

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


        :return: The object_types of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: list[str]
        """
        return self._object_types

    @object_types.setter
    def object_types(self, object_types):
        """Sets the object_types of this PublicActionDefinitionEgg.


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

        self._object_types = object_types

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


        :return: The object_request_options of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: PublicObjectRequestOptions
        """
        return self._object_request_options

    @object_request_options.setter
    def object_request_options(self, object_request_options):
        """Sets the object_request_options of this PublicActionDefinitionEgg.


        :param object_request_options: The object_request_options of this PublicActionDefinitionEgg.  # noqa: E501
        :type object_request_options: PublicObjectRequestOptions
        """

        self._object_request_options = object_request_options

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


        :return: The labels of this PublicActionDefinitionEgg.  # noqa: E501
        :rtype: dict[str, PublicActionLabels]
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this PublicActionDefinitionEgg.


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

        self._labels = labels

    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, PublicActionDefinitionEgg):
            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, PublicActionDefinitionEgg):
            return True

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