# coding: utf-8

"""
    Camunda BPM REST API

    OpenApi Spec for Camunda BPM REST API.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from generic_camunda_client.configuration import Configuration


class FetchExternalTaskTopicDto(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 = {
        'topic_name': 'str',
        'lock_duration': 'int',
        'variables': 'list[str]',
        'local_variables': 'bool',
        'business_key': 'str',
        'process_definition_id': 'str',
        'process_definition_id_in': 'list[str]',
        'process_definition_key': 'str',
        'process_definition_key_in': 'list[str]',
        'process_definition_version_tag': 'str',
        'without_tenant_id': 'bool',
        'tenant_id_in': 'list[str]',
        'process_variables': 'dict(str, object)',
        'deserialize_values': 'bool',
        'include_extension_properties': 'bool'
    }

    attribute_map = {
        'topic_name': 'topicName',
        'lock_duration': 'lockDuration',
        'variables': 'variables',
        'local_variables': 'localVariables',
        'business_key': 'businessKey',
        'process_definition_id': 'processDefinitionId',
        'process_definition_id_in': 'processDefinitionIdIn',
        'process_definition_key': 'processDefinitionKey',
        'process_definition_key_in': 'processDefinitionKeyIn',
        'process_definition_version_tag': 'processDefinitionVersionTag',
        'without_tenant_id': 'withoutTenantId',
        'tenant_id_in': 'tenantIdIn',
        'process_variables': 'processVariables',
        'deserialize_values': 'deserializeValues',
        'include_extension_properties': 'includeExtensionProperties'
    }

    def __init__(self, topic_name=None, lock_duration=None, variables=None, local_variables=False, business_key=None, process_definition_id=None, process_definition_id_in=None, process_definition_key=None, process_definition_key_in=None, process_definition_version_tag=None, without_tenant_id=False, tenant_id_in=None, process_variables=None, deserialize_values=False, include_extension_properties=False, local_vars_configuration=None):  # noqa: E501
        """FetchExternalTaskTopicDto - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._topic_name = None
        self._lock_duration = None
        self._variables = None
        self._local_variables = None
        self._business_key = None
        self._process_definition_id = None
        self._process_definition_id_in = None
        self._process_definition_key = None
        self._process_definition_key_in = None
        self._process_definition_version_tag = None
        self._without_tenant_id = None
        self._tenant_id_in = None
        self._process_variables = None
        self._deserialize_values = None
        self._include_extension_properties = None
        self.discriminator = None

        self.topic_name = topic_name
        self.lock_duration = lock_duration
        if variables is not None:
            self.variables = variables
        self.local_variables = local_variables
        if business_key is not None:
            self.business_key = business_key
        if process_definition_id is not None:
            self.process_definition_id = process_definition_id
        if process_definition_id_in is not None:
            self.process_definition_id_in = process_definition_id_in
        if process_definition_key is not None:
            self.process_definition_key = process_definition_key
        if process_definition_key_in is not None:
            self.process_definition_key_in = process_definition_key_in
        if process_definition_version_tag is not None:
            self.process_definition_version_tag = process_definition_version_tag
        self.without_tenant_id = without_tenant_id
        if tenant_id_in is not None:
            self.tenant_id_in = tenant_id_in
        if process_variables is not None:
            self.process_variables = process_variables
        self.deserialize_values = deserialize_values
        self.include_extension_properties = include_extension_properties

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

        **Mandatory.** The topic's name.  # noqa: E501

        :return: The topic_name of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: str
        """
        return self._topic_name

    @topic_name.setter
    def topic_name(self, topic_name):
        """Sets the topic_name of this FetchExternalTaskTopicDto.

        **Mandatory.** The topic's name.  # noqa: E501

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

        self._topic_name = topic_name

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

        **Mandatory.** The duration to lock the external tasks for in milliseconds.  # noqa: E501

        :return: The lock_duration of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: int
        """
        return self._lock_duration

    @lock_duration.setter
    def lock_duration(self, lock_duration):
        """Sets the lock_duration of this FetchExternalTaskTopicDto.

        **Mandatory.** The duration to lock the external tasks for in milliseconds.  # noqa: E501

        :param lock_duration: The lock_duration of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: int
        """

        self._lock_duration = lock_duration

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

        A JSON array of `String` values that represent variable names. For each result task belonging to this topic, the given variables are returned as well if they are accessible from the external task's execution. If not provided - all variables will be fetched.  # noqa: E501

        :return: The variables of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._variables

    @variables.setter
    def variables(self, variables):
        """Sets the variables of this FetchExternalTaskTopicDto.

        A JSON array of `String` values that represent variable names. For each result task belonging to this topic, the given variables are returned as well if they are accessible from the external task's execution. If not provided - all variables will be fetched.  # noqa: E501

        :param variables: The variables of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: list[str]
        """

        self._variables = variables

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

        If `true` only local variables will be fetched.  # noqa: E501

        :return: The local_variables of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: bool
        """
        return self._local_variables

    @local_variables.setter
    def local_variables(self, local_variables):
        """Sets the local_variables of this FetchExternalTaskTopicDto.

        If `true` only local variables will be fetched.  # noqa: E501

        :param local_variables: The local_variables of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: bool
        """

        self._local_variables = local_variables

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

        A `String` value which enables the filtering of tasks based on process instance business key.  # noqa: E501

        :return: The business_key of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: str
        """
        return self._business_key

    @business_key.setter
    def business_key(self, business_key):
        """Sets the business_key of this FetchExternalTaskTopicDto.

        A `String` value which enables the filtering of tasks based on process instance business key.  # noqa: E501

        :param business_key: The business_key of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: str
        """

        self._business_key = business_key

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

        Filter tasks based on process definition id.  # noqa: E501

        :return: The process_definition_id of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: str
        """
        return self._process_definition_id

    @process_definition_id.setter
    def process_definition_id(self, process_definition_id):
        """Sets the process_definition_id of this FetchExternalTaskTopicDto.

        Filter tasks based on process definition id.  # noqa: E501

        :param process_definition_id: The process_definition_id of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: str
        """

        self._process_definition_id = process_definition_id

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

        Filter tasks based on process definition ids.  # noqa: E501

        :return: The process_definition_id_in of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._process_definition_id_in

    @process_definition_id_in.setter
    def process_definition_id_in(self, process_definition_id_in):
        """Sets the process_definition_id_in of this FetchExternalTaskTopicDto.

        Filter tasks based on process definition ids.  # noqa: E501

        :param process_definition_id_in: The process_definition_id_in of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: list[str]
        """

        self._process_definition_id_in = process_definition_id_in

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

        Filter tasks based on process definition key.  # noqa: E501

        :return: The process_definition_key of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: str
        """
        return self._process_definition_key

    @process_definition_key.setter
    def process_definition_key(self, process_definition_key):
        """Sets the process_definition_key of this FetchExternalTaskTopicDto.

        Filter tasks based on process definition key.  # noqa: E501

        :param process_definition_key: The process_definition_key of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: str
        """

        self._process_definition_key = process_definition_key

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

        Filter tasks based on process definition keys.  # noqa: E501

        :return: The process_definition_key_in of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._process_definition_key_in

    @process_definition_key_in.setter
    def process_definition_key_in(self, process_definition_key_in):
        """Sets the process_definition_key_in of this FetchExternalTaskTopicDto.

        Filter tasks based on process definition keys.  # noqa: E501

        :param process_definition_key_in: The process_definition_key_in of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: list[str]
        """

        self._process_definition_key_in = process_definition_key_in

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

        Filter tasks based on process definition version tag.  # noqa: E501

        :return: The process_definition_version_tag of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: str
        """
        return self._process_definition_version_tag

    @process_definition_version_tag.setter
    def process_definition_version_tag(self, process_definition_version_tag):
        """Sets the process_definition_version_tag of this FetchExternalTaskTopicDto.

        Filter tasks based on process definition version tag.  # noqa: E501

        :param process_definition_version_tag: The process_definition_version_tag of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: str
        """

        self._process_definition_version_tag = process_definition_version_tag

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

        Filter tasks without tenant id.  # noqa: E501

        :return: The without_tenant_id of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: bool
        """
        return self._without_tenant_id

    @without_tenant_id.setter
    def without_tenant_id(self, without_tenant_id):
        """Sets the without_tenant_id of this FetchExternalTaskTopicDto.

        Filter tasks without tenant id.  # noqa: E501

        :param without_tenant_id: The without_tenant_id of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: bool
        """

        self._without_tenant_id = without_tenant_id

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

        Filter tasks based on tenant ids.  # noqa: E501

        :return: The tenant_id_in of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._tenant_id_in

    @tenant_id_in.setter
    def tenant_id_in(self, tenant_id_in):
        """Sets the tenant_id_in of this FetchExternalTaskTopicDto.

        Filter tasks based on tenant ids.  # noqa: E501

        :param tenant_id_in: The tenant_id_in of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: list[str]
        """

        self._tenant_id_in = tenant_id_in

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

        A `JSON` object used for filtering tasks based on process instance variable values. A property name of the object represents a process variable name, while the property value represents the process variable value to filter tasks by.  # noqa: E501

        :return: The process_variables of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._process_variables

    @process_variables.setter
    def process_variables(self, process_variables):
        """Sets the process_variables of this FetchExternalTaskTopicDto.

        A `JSON` object used for filtering tasks based on process instance variable values. A property name of the object represents a process variable name, while the property value represents the process variable value to filter tasks by.  # noqa: E501

        :param process_variables: The process_variables of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: dict(str, object)
        """

        self._process_variables = process_variables

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

        Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on server side (default `false`).  If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath.  If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML.  # noqa: E501

        :return: The deserialize_values of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: bool
        """
        return self._deserialize_values

    @deserialize_values.setter
    def deserialize_values(self, deserialize_values):
        """Sets the deserialize_values of this FetchExternalTaskTopicDto.

        Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on server side (default `false`).  If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath.  If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML.  # noqa: E501

        :param deserialize_values: The deserialize_values of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: bool
        """

        self._deserialize_values = deserialize_values

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

        Determines whether custom extension properties defined in the BPMN activity of the external task (e.g. via the Extensions tab in the Camunda modeler) should be included in the response. Default: false  # noqa: E501

        :return: The include_extension_properties of this FetchExternalTaskTopicDto.  # noqa: E501
        :rtype: bool
        """
        return self._include_extension_properties

    @include_extension_properties.setter
    def include_extension_properties(self, include_extension_properties):
        """Sets the include_extension_properties of this FetchExternalTaskTopicDto.

        Determines whether custom extension properties defined in the BPMN activity of the external task (e.g. via the Extensions tab in the Camunda modeler) should be included in the response. Default: false  # noqa: E501

        :param include_extension_properties: The include_extension_properties of this FetchExternalTaskTopicDto.  # noqa: E501
        :type: bool
        """

        self._include_extension_properties = include_extension_properties

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

        for attr, _ in six.iteritems(self.openapi_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 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, FetchExternalTaskTopicDto):
            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, FetchExternalTaskTopicDto):
            return True

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