# 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 VariableInstanceQueryDto(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',
        'process_instance_id_in': 'list[str]',
        'execution_id_in': 'list[str]',
        'case_instance_id_in': 'list[str]',
        'case_execution_id_in': 'list[str]',
        'task_id_in': 'list[str]',
        'batch_id_in': 'list[str]',
        'activity_instance_id_in': 'list[str]',
        'tenant_id_in': 'list[str]',
        'variable_values': 'list[VariableQueryParameterDto]',
        'variable_names_ignore_case': 'bool',
        'variable_values_ignore_case': 'bool',
        'variable_scope_id_in': 'list[str]',
        'sorting': 'list[VariableInstanceQueryDtoSorting]'
    }

    attribute_map = {
        'variable_name': 'variableName',
        'variable_name_like': 'variableNameLike',
        'process_instance_id_in': 'processInstanceIdIn',
        'execution_id_in': 'executionIdIn',
        'case_instance_id_in': 'caseInstanceIdIn',
        'case_execution_id_in': 'caseExecutionIdIn',
        'task_id_in': 'taskIdIn',
        'batch_id_in': 'batchIdIn',
        'activity_instance_id_in': 'activityInstanceIdIn',
        'tenant_id_in': 'tenantIdIn',
        'variable_values': 'variableValues',
        'variable_names_ignore_case': 'variableNamesIgnoreCase',
        'variable_values_ignore_case': 'variableValuesIgnoreCase',
        'variable_scope_id_in': 'variableScopeIdIn',
        'sorting': 'sorting'
    }

    def __init__(self, variable_name=None, variable_name_like=None, process_instance_id_in=None, execution_id_in=None, case_instance_id_in=None, case_execution_id_in=None, task_id_in=None, batch_id_in=None, activity_instance_id_in=None, tenant_id_in=None, variable_values=None, variable_names_ignore_case=None, variable_values_ignore_case=None, variable_scope_id_in=None, sorting=None, local_vars_configuration=None):  # noqa: E501
        """VariableInstanceQueryDto - 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._process_instance_id_in = None
        self._execution_id_in = None
        self._case_instance_id_in = None
        self._case_execution_id_in = None
        self._task_id_in = None
        self._batch_id_in = None
        self._activity_instance_id_in = None
        self._tenant_id_in = None
        self._variable_values = None
        self._variable_names_ignore_case = None
        self._variable_values_ignore_case = None
        self._variable_scope_id_in = None
        self._sorting = None
        self.discriminator = None

        self.variable_name = variable_name
        self.variable_name_like = variable_name_like
        self.process_instance_id_in = process_instance_id_in
        self.execution_id_in = execution_id_in
        self.case_instance_id_in = case_instance_id_in
        self.case_execution_id_in = case_execution_id_in
        self.task_id_in = task_id_in
        self.batch_id_in = batch_id_in
        self.activity_instance_id_in = activity_instance_id_in
        self.tenant_id_in = tenant_id_in
        self.variable_values = variable_values
        self.variable_names_ignore_case = variable_names_ignore_case
        self.variable_values_ignore_case = variable_values_ignore_case
        self.variable_scope_id_in = variable_scope_id_in
        self.sorting = sorting

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

        Filter by variable instance name.  # noqa: E501

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

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

        Filter by variable instance name.  # noqa: E501

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

        self._variable_name = variable_name

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

        Filter by the variable instance name. The parameter can include the wildcard `%` to express like-strategy such as: starts with (`%`name), ends with (name`%`) or contains (`%`name`%`).  # noqa: E501

        :return: The variable_name_like of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

        Filter by the variable instance name. The parameter can include the wildcard `%` to express like-strategy such as: starts with (`%`name), ends with (name`%`) or contains (`%`name`%`).  # noqa: E501

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

        self._variable_name_like = variable_name_like

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

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

        :return: The process_instance_id_in of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

        Only include 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 VariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._process_instance_id_in = process_instance_id_in

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

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

        :return: The execution_id_in of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

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

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

        self._execution_id_in = execution_id_in

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

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

        :return: The case_instance_id_in of this VariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._case_instance_id_in

    @case_instance_id_in.setter
    def case_instance_id_in(self, case_instance_id_in):
        """Sets the case_instance_id_in of this VariableInstanceQueryDto.

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

        :param case_instance_id_in: The case_instance_id_in of this VariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._case_instance_id_in = case_instance_id_in

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

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

        :return: The case_execution_id_in of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

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

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

        self._case_execution_id_in = case_execution_id_in

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

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

        :return: The task_id_in of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

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

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

        self._task_id_in = task_id_in

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

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

        :return: The batch_id_in of this VariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._batch_id_in

    @batch_id_in.setter
    def batch_id_in(self, batch_id_in):
        """Sets the batch_id_in of this VariableInstanceQueryDto.

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

        :param batch_id_in: The batch_id_in of this VariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._batch_id_in = batch_id_in

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

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

        :return: The activity_instance_id_in of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

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

        :param activity_instance_id_in: The activity_instance_id_in of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.  # noqa: E501

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

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

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

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

        self._tenant_id_in = tenant_id_in

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

        An array to only include variable instances that have the certain values. The array consists of objects with the three properties `name`, `operator` and `value`. `name (String)` is the variable name, `operator (String)` is the comparison operator to be used and `value` the variable value. `value` may be `String`, `Number` or `Boolean`.  Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`  # noqa: E501

        :return: The variable_values of this VariableInstanceQueryDto.  # noqa: E501
        :rtype: list[VariableQueryParameterDto]
        """
        return self._variable_values

    @variable_values.setter
    def variable_values(self, variable_values):
        """Sets the variable_values of this VariableInstanceQueryDto.

        An array to only include variable instances that have the certain values. The array consists of objects with the three properties `name`, `operator` and `value`. `name (String)` is the variable name, `operator (String)` is the comparison operator to be used and `value` the variable value. `value` may be `String`, `Number` or `Boolean`.  Valid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`  # noqa: E501

        :param variable_values: The variable_values of this VariableInstanceQueryDto.  # noqa: E501
        :type: list[VariableQueryParameterDto]
        """

        self._variable_values = variable_values

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

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

        :return: The variable_names_ignore_case of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

        Match all variable names provided in `variableValues` 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 VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.  # noqa: E501

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

        :return: The variable_values_ignore_case of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.

        Match all variable values provided in `variableValues` 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 VariableInstanceQueryDto.  # noqa: E501
        :type: bool
        """

        self._variable_values_ignore_case = variable_values_ignore_case

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

        Only include variable instances which belong to one of passed scope ids.  # noqa: E501

        :return: The variable_scope_id_in of this VariableInstanceQueryDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._variable_scope_id_in

    @variable_scope_id_in.setter
    def variable_scope_id_in(self, variable_scope_id_in):
        """Sets the variable_scope_id_in of this VariableInstanceQueryDto.

        Only include variable instances which belong to one of passed scope ids.  # noqa: E501

        :param variable_scope_id_in: The variable_scope_id_in of this VariableInstanceQueryDto.  # noqa: E501
        :type: list[str]
        """

        self._variable_scope_id_in = variable_scope_id_in

    @property
    def sorting(self):
        """Gets the sorting of this VariableInstanceQueryDto.  # 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 VariableInstanceQueryDto.  # noqa: E501
        :rtype: list[VariableInstanceQueryDtoSorting]
        """
        return self._sorting

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

        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 VariableInstanceQueryDto.  # noqa: E501
        :type: list[VariableInstanceQueryDtoSorting]
        """

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

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