# coding: utf-8

"""
    Camunda Platform REST API

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

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


import pprint
import re  # noqa: F401

import six

from generic_camunda_client.configuration import Configuration


class HistoricVariableInstanceQueryDto(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 = {
        'variable_name': 'str',
        'variable_name_like': 'str',
        'variable_value': 'object',
        'variable_names_ignore_case': 'bool',
        'variable_values_ignore_case': 'bool',
        'variable_type_in': 'list[str]',
        'include_deleted': 'bool',
        'process_instance_id': 'str',
        'process_instance_id_in': 'list[str]',
        'process_definition_id': 'str',
        'process_definition_key': 'str',
        'execution_id_in': 'list[str]',
        'case_instance_id': 'str',
        'case_execution_id_in': 'list[str]',
        'case_activity_id_in': 'list[str]',
        'task_id_in': 'list[str]',
        'activity_instance_id_in': 'list[str]',
        'tenant_id_in': 'list[str]',
        'without_tenant_id': 'bool',
        'sorting': 'list[HistoricVariableInstanceQueryDtoSorting]'
    }

    attribute_map = {
        'variable_name': 'variableName',
        'variable_name_like': 'variableNameLike',
        'variable_value': 'variableValue',
        'variable_names_ignore_case': 'variableNamesIgnoreCase',
        'variable_values_ignore_case': 'variableValuesIgnoreCase',
        'variable_type_in': 'variableTypeIn',
        'include_deleted': 'includeDeleted',
        'process_instance_id': 'processInstanceId',
        'process_instance_id_in': 'processInstanceIdIn',
        'process_definition_id': 'processDefinitionId',
        'process_definition_key': 'processDefinitionKey',
        'execution_id_in': 'executionIdIn',
        'case_instance_id': 'caseInstanceId',
        'case_execution_id_in': 'caseExecutionIdIn',
        'case_activity_id_in': 'caseActivityIdIn',
        'task_id_in': 'taskIdIn',
        'activity_instance_id_in': 'activityInstanceIdIn',
        'tenant_id_in': 'tenantIdIn',
        'without_tenant_id': 'withoutTenantId',
        'sorting': 'sorting'
    }

    def __init__(self, variable_name=None, variable_name_like=None, variable_value=None, variable_names_ignore_case=None, variable_values_ignore_case=None, variable_type_in=None, include_deleted=None, process_instance_id=None, process_instance_id_in=None, process_definition_id=None, process_definition_key=None, execution_id_in=None, case_instance_id=None, case_execution_id_in=None, case_activity_id_in=None, task_id_in=None, activity_instance_id_in=None, tenant_id_in=None, without_tenant_id=None, sorting=None, local_vars_configuration=None):  # noqa: E501
        """HistoricVariableInstanceQueryDto - 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._variable_name = None
        self._variable_name_like = None
        self._variable_value = None
        self._variable_names_ignore_case = None
        self._variable_values_ignore_case = None
        self._variable_type_in = None
        self._include_deleted = None
        self._process_instance_id = None
        self._process_instance_id_in = None
        self._process_definition_id = None
        self._process_definition_key = None
        self._execution_id_in = None
        self._case_instance_id = None
        self._case_execution_id_in = None
        self._case_activity_id_in = None
        self._task_id_in = None
        self._activity_instance_id_in = None
        self._tenant_id_in = None
        self._without_tenant_id = None
        self._sorting = None
        self.discriminator = None

        self.variable_name = variable_name
        self.variable_name_like = variable_name_like
        if variable_value is not None:
            self.variable_value = variable_value
        self.variable_names_ignore_case = variable_names_ignore_case
        self.variable_values_ignore_case = variable_values_ignore_case
        self.variable_type_in = variable_type_in
        self.include_deleted = include_deleted
        self.process_instance_id = process_instance_id
        self.process_instance_id_in = process_instance_id_in
        self.process_definition_id = process_definition_id
        self.process_definition_key = process_definition_key
        self.execution_id_in = execution_id_in
        self.case_instance_id = case_instance_id
        self.case_execution_id_in = case_execution_id_in
        self.case_activity_id_in = case_activity_id_in
        self.task_id_in = task_id_in
        self.activity_instance_id_in = activity_instance_id_in
        self.tenant_id_in = tenant_id_in
        self.without_tenant_id = without_tenant_id
        self.sorting = sorting

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

        Filter by variable name.  # noqa: E501

        :return: The variable_name of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: str
        """
        return self._variable_name

    @variable_name.setter
    def variable_name(self, variable_name):
        """Sets the variable_name of this HistoricVariableInstanceQueryDto.

        Filter by variable name.  # noqa: E501

        :param variable_name: The variable_name of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: str
        """

        self._variable_name = variable_name

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

        Restrict to variables with a name like the parameter.  # noqa: E501

        :return: The variable_name_like of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: str
        """
        return self._variable_name_like

    @variable_name_like.setter
    def variable_name_like(self, variable_name_like):
        """Sets the variable_name_like of this HistoricVariableInstanceQueryDto.

        Restrict to variables with a name like the parameter.  # noqa: E501

        :param variable_name_like: The variable_name_like of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: str
        """

        self._variable_name_like = variable_name_like

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

        Filter by variable value. May be `String`, `Number` or `Boolean`.  # noqa: E501

        :return: The variable_value of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: object
        """
        return self._variable_value

    @variable_value.setter
    def variable_value(self, variable_value):
        """Sets the variable_value of this HistoricVariableInstanceQueryDto.

        Filter by variable value. May be `String`, `Number` or `Boolean`.  # noqa: E501

        :param variable_value: The variable_value of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: object
        """

        self._variable_value = variable_value

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

        Match the variable name provided in `variableName` and `variableNameLike` case- insensitively. If set to `true` **variableName** and **variablename** are treated as equal.  # noqa: E501

        :return: The variable_names_ignore_case of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: bool
        """
        return self._variable_names_ignore_case

    @variable_names_ignore_case.setter
    def variable_names_ignore_case(self, variable_names_ignore_case):
        """Sets the variable_names_ignore_case of this HistoricVariableInstanceQueryDto.

        Match the variable name provided in `variableName` and `variableNameLike` case- insensitively. If set to `true` **variableName** and **variablename** are treated as equal.  # noqa: E501

        :param variable_names_ignore_case: The variable_names_ignore_case of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: bool
        """

        self._variable_names_ignore_case = variable_names_ignore_case

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

        Match the variable value provided in `variableValue` case-insensitively. If set to `true` **variableValue** and **variablevalue** are treated as equal.  # noqa: E501

        :return: The variable_values_ignore_case of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: bool
        """
        return self._variable_values_ignore_case

    @variable_values_ignore_case.setter
    def variable_values_ignore_case(self, variable_values_ignore_case):
        """Sets the variable_values_ignore_case of this HistoricVariableInstanceQueryDto.

        Match the variable value provided in `variableValue` case-insensitively. If set to `true` **variableValue** and **variablevalue** are treated as equal.  # noqa: E501

        :param variable_values_ignore_case: The variable_values_ignore_case of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: bool
        """

        self._variable_values_ignore_case = variable_values_ignore_case

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

        Only include historic variable instances which belong to one of the passed and comma- separated variable types. A list of all supported variable types can be found [here](https://docs.camunda.org/manual/7.16/user-guide/process-engine/variables/#supported-variable-values). **Note:** All non-primitive variables are associated with the type 'serializable'.  # noqa: E501

        :return: The variable_type_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._variable_type_in

    @variable_type_in.setter
    def variable_type_in(self, variable_type_in):
        """Sets the variable_type_in of this HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed and comma- separated variable types. A list of all supported variable types can be found [here](https://docs.camunda.org/manual/7.16/user-guide/process-engine/variables/#supported-variable-values). **Note:** All non-primitive variables are associated with the type 'serializable'.  # noqa: E501

        :param variable_type_in: The variable_type_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._variable_type_in = variable_type_in

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

        Include variables that has already been deleted during the execution.  # noqa: E501

        :return: The include_deleted of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: bool
        """
        return self._include_deleted

    @include_deleted.setter
    def include_deleted(self, include_deleted):
        """Sets the include_deleted of this HistoricVariableInstanceQueryDto.

        Include variables that has already been deleted during the execution.  # noqa: E501

        :param include_deleted: The include_deleted of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: bool
        """

        self._include_deleted = include_deleted

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

        Filter by the process instance the variable belongs to.  # noqa: E501

        :return: The process_instance_id of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: str
        """
        return self._process_instance_id

    @process_instance_id.setter
    def process_instance_id(self, process_instance_id):
        """Sets the process_instance_id of this HistoricVariableInstanceQueryDto.

        Filter by the process instance the variable belongs to.  # noqa: E501

        :param process_instance_id: The process_instance_id of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: str
        """

        self._process_instance_id = process_instance_id

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

        Only include historic variable instances which belong to one of the passed  process instance ids.  # noqa: E501

        :return: The process_instance_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._process_instance_id_in

    @process_instance_id_in.setter
    def process_instance_id_in(self, process_instance_id_in):
        """Sets the process_instance_id_in of this HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed  process instance ids.  # noqa: E501

        :param process_instance_id_in: The process_instance_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._process_instance_id_in = process_instance_id_in

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

        Filter by the process definition the variable belongs to.  # noqa: E501

        :return: The process_definition_id of this HistoricVariableInstanceQueryDto.  # 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 HistoricVariableInstanceQueryDto.

        Filter by the process definition the variable belongs to.  # noqa: E501

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

        self._process_definition_id = process_definition_id

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

        Filter by a key of the process definition the variable belongs to.  # noqa: E501

        :return: The process_definition_key of this HistoricVariableInstanceQueryDto.  # 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 HistoricVariableInstanceQueryDto.

        Filter by a key of the process definition the variable belongs to.  # noqa: E501

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

        self._process_definition_key = process_definition_key

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

        Only include historic variable instances which belong to one of the passed and  execution ids.  # noqa: E501

        :return: The execution_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._execution_id_in

    @execution_id_in.setter
    def execution_id_in(self, execution_id_in):
        """Sets the execution_id_in of this HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed and  execution ids.  # noqa: E501

        :param execution_id_in: The execution_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._execution_id_in = execution_id_in

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

        Filter by the case instance the variable belongs to.  # noqa: E501

        :return: The case_instance_id of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: str
        """
        return self._case_instance_id

    @case_instance_id.setter
    def case_instance_id(self, case_instance_id):
        """Sets the case_instance_id of this HistoricVariableInstanceQueryDto.

        Filter by the case instance the variable belongs to.  # noqa: E501

        :param case_instance_id: The case_instance_id of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: str
        """

        self._case_instance_id = case_instance_id

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

        Only include historic variable instances which belong to one of the passed and  case execution ids.  # noqa: E501

        :return: The case_execution_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._case_execution_id_in

    @case_execution_id_in.setter
    def case_execution_id_in(self, case_execution_id_in):
        """Sets the case_execution_id_in of this HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed and  case execution ids.  # noqa: E501

        :param case_execution_id_in: The case_execution_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._case_execution_id_in = case_execution_id_in

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

        Only include historic variable instances which belong to one of the passed and  case activity ids.  # noqa: E501

        :return: The case_activity_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._case_activity_id_in

    @case_activity_id_in.setter
    def case_activity_id_in(self, case_activity_id_in):
        """Sets the case_activity_id_in of this HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed and  case activity ids.  # noqa: E501

        :param case_activity_id_in: The case_activity_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._case_activity_id_in = case_activity_id_in

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

        Only include historic variable instances which belong to one of the passed and  task ids.  # noqa: E501

        :return: The task_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._task_id_in

    @task_id_in.setter
    def task_id_in(self, task_id_in):
        """Sets the task_id_in of this HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed and  task ids.  # noqa: E501

        :param task_id_in: The task_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._task_id_in = task_id_in

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

        Only include historic variable instances which belong to one of the passed and  activity instance ids.  # noqa: E501

        :return: The activity_instance_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._activity_instance_id_in

    @activity_instance_id_in.setter
    def activity_instance_id_in(self, activity_instance_id_in):
        """Sets the activity_instance_id_in of this HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed and  activity instance ids.  # noqa: E501

        :param activity_instance_id_in: The activity_instance_id_in of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._activity_instance_id_in = activity_instance_id_in

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

        Only include historic variable instances which belong to one of the passed and comma- separated tenant ids.  # noqa: E501

        :return: The tenant_id_in of this HistoricVariableInstanceQueryDto.  # 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 HistoricVariableInstanceQueryDto.

        Only include historic variable instances which belong to one of the passed and comma- separated tenant ids.  # noqa: E501

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

        self._tenant_id_in = tenant_id_in

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

        Only include historic variable instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior.  # noqa: E501

        :return: The without_tenant_id of this HistoricVariableInstanceQueryDto.  # 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 HistoricVariableInstanceQueryDto.

        Only include historic variable instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior.  # noqa: E501

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

        self._without_tenant_id = without_tenant_id

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

        An array of criteria to sort the result by. Each element of the array is                      an object that specifies one ordering. The position in the array                      identifies the rank of an ordering, i.e., whether it is primary, secondary,                      etc. Sorting has no effect for `count` endpoints  # noqa: E501

        :return: The sorting of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :rtype: list[HistoricVariableInstanceQueryDtoSorting]
        """
        return self._sorting

    @sorting.setter
    def sorting(self, sorting):
        """Sets the sorting of this HistoricVariableInstanceQueryDto.

        An array of criteria to sort the result by. Each element of the array is                      an object that specifies one ordering. The position in the array                      identifies the rank of an ordering, i.e., whether it is primary, secondary,                      etc. Sorting has no effect for `count` endpoints  # noqa: E501

        :param sorting: The sorting of this HistoricVariableInstanceQueryDto.  # noqa: E501
        :type: list[HistoricVariableInstanceQueryDtoSorting]
        """

        self._sorting = sorting

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

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